I want to change asterisk’s call monitor filename, which should include the dialed number (for out call) or the incoming number (for in call) in the call filename.
But currently the asterisk call recording filename has the format of
If you mean you want separate files for the ‘in’ leg and the ‘out’ leg - don’t put the ,m at the end.
This will give you ‘whatever-you-want-in.wav’ and ‘whatever-you-want-out.wav’. You would then need something like soxmix to join them together.
It is possible to do it so that you get ‘in’ and ‘out’ the correct way around by making the context part of the file name (eg inbound-rest-of-file.wav). You just have to make sure your dialplan (extensions.conf) have proper contexts defined (ie. not all in one big context - yes, I’ve seen it done).
Now I have created two new contexts. The first context will prefix “OUT” and the second one will prefix “IN”.
I have a “GosubIf” in asterisk’s macro-record-enable context, which should check what type of call it is ( outbound-call or inbound-call) and jumps to the specific context for outbound-call and inbound-call respectively and returns back.
Now my question is, how to find the type of current call (i.e. inbound-call or outbound-call) using GosubIf condition. What condition should i use for “GosubIf” to check whether it is incoming call or outgoing call.
Can you please help me on choosing the condition for GosubIf.