Saving call recording in other directory

Hello,

good day, how do i change the saving directory of call recording per DID, example, if DID number 12345 will save to directory 12345 and DID 67890 will save to directory 67890.

is it possible in extension.conf?

Probably, but DID is a very misused term wrt to Asterisk, and I’m not sure what you mean in terms of its effect on the dialplan.

A true direct in dialling service would have a different extension for each DID line, so one could have different calls to [Mix]Monitor for each line (and different ones for each internal extension that didn’t correspond to a DID number).

I haven’t checked, but I assume the base filename can include a directory.

hello,

what im trying to achieve is that, all calls going to this number 12345 will be save to its specific directory like /var/spool/asterisk/monitor/12345/

thank you

Try this (I haven’t confirmed that it will work, but it should be quick to check):


exten 12345,n,MixMonitor(/var/spool/asterisk/monitor/${EXTEN}/${UNIQUEID}.wav)

exten 12345,n,Dial(…

[quote=“david55”]Try this (I haven’t confirmed that it will work, but it should be quick to check):


exten 12345,n,MixMonitor(/var/spool/asterisk/monitor/${EXTEN}/${UNIQUEID}.wav)

exten 12345,n,Dial(…[/quote]

Hi,

This will only work if the folder for the ${EXTEN} exists in the system. Asterisk informs on CLI for sure if it is not there.

greets.

Create it using system(…), or pre-create it, given that the number of DID numbers will be finite.