exten => ${TEST_IN},1,NoOp(## Incoming Call from ${CALLERID(all)} ##)
same => n,Verbose(Call start time: ${CDR(start)})
same => n,Set(CDR(calldate)=${CDR(start)})
same => n,Set(CDR(useragent)=${CALLERID(name)})
same => n,Set(POSTE_EXT=${CALLERID(num)})
same => n,Ringing()
same => n,System(echo "--appel_sortant --- callerid : ${CALLERID(num)} ---- ${STRFTIME(${EPOCH},,%Y/%m/%d %H:%M:%S)} ----" >> /var/spool/asterisk/log/debug.txt)
same => n,Set(REC_FILE_NAME=IN_${NOW}_${EXTEN}_${POSTE_EXT}.wav)
same => n,Set(RETURNED_VALUE=${ODBC_LASTCALL(${CALLERID(num)})})
same => n,MixMonitor(${REC_FILE_NAME},b V(1))
same => n,GotoIf($[${ISNULL(${RETURNED_VALUE})}]?defaultExt:lastcalled)
same => n(defaultExt),Dial(PJSIP/114&PJSIP/115,30)
same => n,Playback(ivr/REPONDEUR_2)
same => n,VoiceMail(${VM_TEST},s)
same => n,Goto(end)
same => n(lastcalled),Dial(PJSIP/${RETURNED_VALUE},30)
same => n,Playback(ivr/REPONDEUR_2)
same => n,VoiceMail(${RETURNED_VALUE}@default)
same => n,Goto(end)
same => n(end),Hangup()
Hi @everyone,
I have a little tricky situation on this part of my syntax, when I make a call to the “TEST_IN”, I do not catch the extension 114 or 115 but in the CLI I have a “PJSIP/bel,30” who is execute. The variable RETURNED_VALUE send me a “bel” extension who do not exist in the pjsip.conf file.
same => n,GotoIf($[${ISNULL(${RETURNED_VALUE})}]?defaultExt:lastcalled)
same => n(defaultExt),Dial(PJSIP/114&PJSIP/115,30)
same => n,Playback(ivr/REPONDEUR_2)
same => n,VoiceMail(${VM_TEST},s)
same => n,Goto(end)
same => n(lastcalled),Dial(PJSIP/${RETURNED_VALUE},30)
same => n,Playback(ivr/REPONDEUR_2)
same => n,VoiceMail(${RETURNED_VALUE}@default)
same => n,Goto(end)
same => n(end),Hangup()
I do not understand how this is happened. Do you know how to fix that ? I try in my cdr table to edit the colunn where I have the PJSIP/bel,30 (lastdata) by one of the extension what they supposed to call(PJSIP/114,30 or PJSIP/115,30). If someone can help me to understand what happen here.
Best regard,
Lordaker.