Using Aster* 11.15
Am doing an originate in the dialplan
the destination is nominated in the channel parameter (I have made calls to a local and in a separate test over sip channel - eg SIP/trunk-cpe2/1234 - dial plan code below)
the “extn” part of the originate is a local device in the same context as the originate.
The calls work ok -
Afer connection the extn does a monitor. this works ok too
I want the monitor recording file name to contain the “dialled digits”, or some identifier of the call’s destination
I have tried a number of channel variables like ${DIALEDPEERNUMBER} and ${CALLERID(dnid)}.
these do not work. How can I get the calls destination detains from the extn? and can it be generic, so it will work when calls are made over PRI too?
Setting a variable containing the destination details at the point of the originate is an option (even easier hen I move the originate to the AMI), but surely this info is already in there some where?
Thankyou
…Originate(SIP/trunk-cpe2/1234,exten,demo,mon,1)
…
exten => mon,1,noop()
exten => mon,n,Answer()
exten => mon,n,sendDTMF(1)
exten => mon,n,verbose(${DIALEDPEERNUMBER})
exten => mon,n,verbose(${CALLERID(num)})
exten => mon,n,verbose(${CALLERID(dnid)})
exten => mon,n, Monitor(wav,testrecord) ; change to provide file name containing destination details
exten => mon,n,wait(100)
exten => mon,n,Hangup()