Custom Extension - strange context

Hi,

Just added a custom extension,

“IAX2/011447973XXXXXX@VoipJet”

I didn’t set a custom context.

When the outgoing call is made I get…

– Executing Macro(“SIP/200-cd1b”, “exten-vm|novm|202”) in new stack
– Executing Macro(“SIP/200-cd1b”, “user-callerid”) in new stack
– Executing NoOp(“SIP/200-cd1b”, “user-callerid device 200”) in new stack
– Executing Set(“SIP/200-cd1b”, “AMPUSER=200”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “0?report”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “0?start”) in new stack
– Executing Set(“SIP/200-cd1b”, “REALCALLERIDNUM=200”) in new stack
– Executing NoOp(“SIP/200-cd1b”, “REALCALLERIDNUM is 200”) in new stack
– Executing Set(“SIP/200-cd1b”, “AMPUSER=200”) in new stack
– Executing Set(“SIP/200-cd1b”, “AMPUSERCIDNAME=Office - WL”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “0?report”) in new stack
– Executing Set(“SIP/200-cd1b”, “AMPUSERCID=200”) in new stack
– Executing Set(“SIP/200-cd1b”, “CALLERID(all)=Office - WL <200>”) in new stack
– Executing Set(“SIP/200-cd1b”, “REALCALLERIDNUM=200”) in new stack
– Executing NoOp(“SIP/200-cd1b”, “TTL ARG1 novm”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “0?continue”) in new stack
– Executing Set(“SIP/200-cd1b”, “__TTL=64”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing NoOp(“SIP/200-cd1b”, “Using CallerID “Office - WL” <200>”) in new stack
– Executing Set(“SIP/200-cd1b”, “FROMCONTEXT=exten-vm”) in new stack
– Executing Set(“SIP/200-cd1b”, “VMBOX=novm”) in new stack
– Executing Set(“SIP/200-cd1b”, “EXTTOCALL=202”) in new stack
– Executing Set(“SIP/200-cd1b”, “CFUEXT=”) in new stack
– Executing Set(“SIP/200-cd1b”, “CFBEXT=”) in new stack
– Executing Set(“SIP/200-cd1b”, “RT=”) in new stack
– Executing Macro(“SIP/200-cd1b”, “record-enable|202|IN”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “0?24”) in new stack
– Goto (macro-record-enable,s,4)
– Executing DeadAGI(“SIP/200-cd1b”, “recordingcheck|20070703-201027|1183493427.185”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20070703-201027|1183493427.185 Inbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/200-cd1b”, “No recording needed”) in new stack
– Executing Macro(“SIP/200-cd1b”, “dial||TtrW|202”) in new stack
– Executing AGI(“SIP/200-cd1b”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi Starting New Dialparties.agi
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi priority is 1
dialparties.agi Caller ID name is ‘Office - WL’ number is ‘200’
> dialparties.agi USE_CONFIRMATION ‘FALSE’
> dialparties.agi RINGGROUP_INDEX ''
dialparties.agi Methodology of ring is ‘none’
– dialparties.agi Added extension 202 to extension map
– dialparties.agi Extension 202 cf is disabled
– dialparties.agi Extension 202 do not disturb is disabled
> dialparties.agi extnum 202
> dialparties.agi exthascw 1
> dialparties.agi exthascfb 0
> dialparties.agi extcfb
> dialparties.agi exthascfu 0
> dialparties.agi extcfu
– dialparties.agi dbset CALLTRACE/202 to 200
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing Dial(“SIP/200-cd1b”, “IAX2/011447973xxxxxx@VoipJet||TtrW”) in new stack
– Called 011447973xxxxxx@VoipJet
– Hungup ‘IAX2/VoipJet-2’
== Everyone is busy/congested at this time (10/0/1)
– Executing Set(“SIP/200-cd1b”, “DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing Set(“SIP/200-cd1b”, “SV_DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing GosubIf(“SIP/200-cd1b”, “0?docfu|1”) in new stack
– Executing GosubIf(“SIP/200-cd1b”, “0?docfb|1”) in new stack
– Executing Set(“SIP/200-cd1b”, “DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing NoOp(“SIP/200-cd1b”, “Voicemail is novm”) in new stack
– Executing GotoIf(“SIP/200-cd1b”, “1?s-CHANUNAVAIL|1”) in new stack
– Goto (macro-exten-vm,s-CHANUNAVAIL,1)
– Executing PlayTones(“SIP/200-cd1b”, “congestion”) in new stack
– Executing Congestion(“SIP/200-cd1b”, “10”) in new stack

This call fails!

Is it due to the context, which looks like its set to “FROMCONTEXT=exten-vm” could this cause the problem?

Why is the context set to this?

If I dial the number normally, and let outbound routes sort it out, it all works…

(macro-outbound-callerid,s,22)
– Executing NoOp(“SIP/200-727a”, “CallerID set to “” <00441827830022>”) in new stack
– Executing GotoIf(“SIP/200-727a”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing AGI(“SIP/200-727a”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix Using pattern 01144+XXXXXXXXXX
== fixlocalprefix Dialpattern 01144+XXXXXXXXXX matched. 7973xxxxxx -> 011447973xxxxxx
– AGI Script fixlocalprefix completed, returning 0
– Executing Set(“SIP/200-727a”, “OUTNUM=011447973xxxxxx”) in new stack
– Executing Set(“SIP/200-727a”, “custom=IAX2/VoipJet”) in new stack
– Executing GotoIf(“SIP/200-727a”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,22)
– Executing GotoIf(“SIP/200-727a”, “0?customtrunk”) in new stack
– Executing Dial(“SIP/200-727a”, “IAX2/VoipJet/011447973xxxxxx|300|WTt”) in new stack
– Called VoipJet/011447973xxxxxx
– Call accepted by 8.11.164.235 (format ulaw)
– Format for call is ulaw
– IAX2/VoipJet-3 is making progress passing it to SIP/200-727a

Any ideas?

Many thanks,

Matthew

yup

Cheers Philippe,

Is this the correct section of the extensions.conf?

[macro-exten-vm]
exten => s,1,Macro(user-callerid)

exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(CFBEXT=${DB(CFB/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!=“novm”] | $[“foo${CFUEXT}”!=“foo”]]?${RINGTIMER}"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)

exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})
exten => s,n,Set(SV_DIALSTATUS=${DIALSTATUS})
exten => s,n,GosubIf($[$["${SV_DIALSTATUS}"=“NOANSWER”] & $[“foo${CFUEXT}”!=“foo”]]?docfu,1) ; check for CFU in use on no answer
exten => s,n,GosubIf($[$["${SV_DIALSTATUS}"=“BUSY”] & $[“foo${CFBEXT}”!=“foo”]]?docfb,1) ; check for CFB in use on busy
exten => s,n,Set(DIALSTATUS=${SV_DIALSTATUS})
exten => s,n,NoOp(Voicemail is ‘${VMBOX}’)
exten => s,n,GotoIf($["${VMBOX}" = “novm”]?s-${DIALSTATUS},1) ; no voicemail in use for this extension
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,Macro(vm,${VMBOX},${DIALSTATUS})

Thanks for your patience!

Matthew

if there is no exten-vm then you FreePBX installation is corrupted somehow. This is core to the FreePBX dialplan, and is in extensions.conf that is shipped iwth FreePBX.

You may want to make sure that it is properly auto-linking this file from /var/www/html/admin/modules/core/etc/extensions.conf.

Just doing some more digging…

asterisk1CLI> show dialplan exten-vm
There is no existence of ‘exten-vm’ context
asterisk1
CLI>

So it’s trying to make calls using exten-vm, but it doesn’t exist…

Hope this helps someone…