Auto fallthrough channel SIP/8xxx status Is unkown

Hi.
I’m having an Issue with an asterisk configuration that was running without Issue but now am getting the following when trying to make an outbound call.

  • Executing [0035799123456@shipsat:1] Set(“SIP/8551-0000002c”, “gateway=8551”) in new stack
    – Executing [0035799123456@shipsat:2] Answer(“SIP/8551-0000002c”, “”) in new stack
    – Executing [0035799123456@shipsat:3] Set(“SIP/8551-0000002c”, “GW_ID=2”) in new stack
    – Executing [0035799123456@shipsat:4] Set(“SIP/8551-0000002c”, “BOXID=shipsat000C29C6B406”) in new stack
    – Executing [0035799123456@shipsat:5] Set(“SIP/8551-0000002c”, “USERKEY=99998888”) in new stack
    – Executing [0035799563618@shipsat:6] Set(“SIP/8551-0000002c”, “CDR(accountcode)=99998888”) in new stack
    – Executing [0035799123456@shipsat:7] Set(“SIP/8551-0000002c”, “CALLERID(num)=61862053995”) in new stack
    – Auto fallthrough, channel ‘SIP/8551-0000002c’ status is ‘UNKNOWN’

I
Extensions.conf section:

exten => _X./8551,n,Answer
exten => _X./8551,n,Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1})
exten => _X./8551,n,Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)})
exten => _X./8551,n,Set(USERKEY=99998888)
exten => _X./8551,n,Set(CDR(accountcode)=${USERKEY})
exten => _X./8551,n,Set(CALLERID(num)=61862053995)
exten => _X./8551,n,Set(CDR(userfield)=${BOXID}@${GW_ID})
exten => _X./8551,n,AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN})
exten => _X./8551,n,Hangup(18) ;Check script fails

I can provide any further Information required. Just not sure what else to provide at the moment.

Are you missing _ in front of a few of your patterns? If so they would not be treated as pattern matches and would fail.

It’s not appearing with missing _ In the file Itself but I’m not sure why It appeared likes this In the post. It appears normal when I click on edit but preview on the right Is showing the missing _

Strange.

Nope. Nothing missing from the file itself. Just output appeared like that In the post for some reason.

K, just making sure! There’s nothing clear to explain why it is falling through. What does “dialplan show” show for the context in question? If you turn “sip set debug on” do you see anything of note during the call?

‘_X.’ (CID match ‘8551’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
5. Set(USERKEY=99998888) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CALLERID(num)=61862053995) [pbx_config]
8. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18) [pbx_config]

***8552 ( user key retrieved by input )

‘_X.’ (CID match ‘8552’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Read(USERKEY,shipsat/enter-pin-number,10) [pbx_config]
5. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18)

Registering with 8552 where there Is a prompt for a pin, there Is no Issue , commands Set(CDR(userfield)… and AGI(checkUserAuth.agi… execute without Issue.

For some strange reason, If I add any line (could be anything) somewhere after Set(GW_ID=$…
For example, adding exten => _X./8551,n,Answer on line 4 below makes everything proceed as normal and execute the call.

It makes no sense to me why.

exten => _X./8551,1,Set(gateway=${CALLERID(num)})
exten => _X./8551,n,Answer
exten => _X./8551,n,Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1})
exten => _X./8551,n,Answer
exten => _X./8551,n,Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)})
exten => _X./8551,n,Set(USERKEY=99998888)
exten => _X./8551,n,Set(CDR(accountcode)=${USERKEY})
exten => _X./8551,n,Set(CALLERID(num)=61862053995)
exten => _X./8551,n,Set(CDR(userfield)=${BOXID}@${GW_ID})
exten => _X./8551,n,AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN})
exten => _X./8551,n,Hangup(18) ;Check script fails

Or copying line 3 and adding It as a duplicate line underneath also let’s calls through.

exten => _X./8551,n,Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1})
exten => _X./8551,n,Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1})

It may be that you somehow have another part of your dialplan interacting with it causing the execution order to not be what you’d expect. That’s my best guess.

it also works when i remove the callerid line If that helps at all.

If you’d like someone to try to figure it out you’d need to provide the complete dialplan.

;Outbound calling / Authentication
exten => _X.,1,Set(gateway=${CALLERID(num)})
exten => _X.,n,Answer
exten => _X.,n,Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1})
exten => _X.,n,Read(USERKEY,shipsat/enter-pin-number,10)
exten => _X.,n,Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)})
exten => _X.,n,Set(CDR(accountcode)=${USERKEY})
exten => _X.,n,Set(CDR(userfield)=${BOXID}@${GW_ID})
;exten => _X./8554,n,Set(CALLERID(num)=85258192231)
exten => _X.,n,AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN})
exten => _X.,n,Hangup(18) ;Check script fails

commenting out the X/8554 fixed It but I’d like to understand why.

here is the dialplan before commenting out.

[ Context ‘app_dial_gosub_virtual_context’ created by ‘app_dial’ ]
‘s’ => 1. NoOp() [app_dial]

[ Context ‘parkedcalls’ created by ‘features’ ]
‘700’ => 1. Park() [features]

[ Context ‘DirectCall’ created by ‘pbx_config’ ]
‘makecallEMC’ => 1. NoOp( DialOut ${DST1} ) [pbx_config]
2. Dial(SIP/${DST1}@mtnsat-outbound,30,S(${AVALSEC})) [pbx_config]
3. Hangup() [pbx_config]

[ Context ‘shipsat’ created by ‘pbx_config’ ]
‘19546727881’ => 1. Set(DSTNUM=${EXTEN}) [pbx_config]
2. Set(CALID=${CALLERID(num)}) [pbx_config]
3. Dial(SIP/8556) [pbx_config]
4. Hangup() [pbx_config]
‘600’ => 1. Playback(demo-echotest) [pbx_config]
2. Echo() [pbx_config]
3. Playback(demo-echodone) [pbx_config]
4. Handup(21) [pbx_config]
‘61862053995’ => 1. Set(DSTNUM=${EXTEN}) [pbx_config]
2. Set(CALID=${CALLERID(num)}) [pbx_config]
3. Dial(SIP/8551&SIP/8555&SIP/8558) [pbx_config]
4. Hangup() [pbx_config]
‘625’ => 1. Answer() [pbx_config]
2. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
3. Read(USERPIN,shipsat/enter_account,10) [pbx_config]
4. AGI(checkBalance.agi,${USERPIN},${BOXID},${GW_ID}) [pbx_config]
5. Playback(account-balance-is) [pbx_config]
6. AGI(d2ms.agi,${BALANCE},usd,1) [pbx_config]
‘6531637079’ => 1. Set(DSTNUM=${EXTEN}) [pbx_config]
2. Set(CALID=${CALLERID(num)}) [pbx_config]
3. Dial(SIP/8552&SIP/8556&/SIP/8559) [pbx_config]
4. Hangup() [pbx_config]
‘85258192231’ => 1. Set(DSTNUM=${EXTEN}) [pbx_config]
2. Set(CALID=${CALLERID(num)}) [pbx_config]
3. Dial(SIP/8553&SIP/8557&SIP/8560) [pbx_config]
4. Hangup() [pbx_config]
‘badauth’ => 1. Playback(shipsat/auth-fail) [pbx_config]
2. Hangup(21) [pbx_config]
‘h’ => 1. NoOp(Call data : ${DIALSTATUS} : ${ANSWEREDTIME} : ${CDR(billsec)} : ${STRFTIME(${EPOCH},%Y-%m-%d %H:%M:%S)} ) [pbx_config]
2. AGI(writeCdr.agi, ${DSTNUM}, ${CDR(start)}, ${STRFTIME(${EPOCH},%Y-%m-%d %H:%M:%S)}, ${CDR(duration)}, ${CDR(disposition)}, ${CDR(userfield)}, ${CDR(accountcode)}, ${CDR(billsec)}) [pbx_config]
‘makecall’ => 1. NoOp( DialOut ${DST1} ) [pbx_config]
2. Dial(SIP/${DST1}@mtnsat-outbound,30,S(${AVALSEC})) [pbx_config]
3. Hangup() [pbx_config]
‘makecallMTNSAT’ => 1. NoOp( DialOut ${DST1} ) [pbx_config]
2. Dial(SIP/${DST1}@mtnsat-outbound,30,S(${AVALSEC})) [pbx_config]
3. Hangup() [pbx_config]
‘nomoney’ => 1. Playback(shipsat/no-credits) [pbx_config]
2. Hangup(21) [pbx_config]
‘readbalance’ => 1. Playback(shipsat/account-balance-is) [pbx_config]
2. AGI(d2ms.agi,${BALANCE},usd,1) [pbx_config]
3. Hangup() [pbx_config]
’_ZXXX’ => 1. Dial(SIP/${EXTEN},20,tr) [pbx_config]
’_X.’ (CID match ‘8551’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
5. Set(USERKEY=92976110) [pbx_config]
6. Set(USERKEY=92976110) [pbx_config]
7. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
8. Set(CALLERID(num)=61862053995) [pbx_config]
9. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
10. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
11. Hangup(18) [pbx_config]
’_X.’ (CID match ‘8552’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
5. Set(USERKEY=66665555) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CALLERID(num)=6531637079) [pbx_config]
8. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18) [pbx_config]
’_X.’ (CID match ‘8553’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
5. Set(USERKEY=77778888) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CALLERID(num)=85258192231) [pbx_config]
8. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18) [pbx_config]
’_X.’ (CID match ‘8554’) => 8. Set(CALLERID(num)=85258192231) [pbx_config]
’_X.’ (CID match ‘8555’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
5. Set(USERKEY=88889999) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CALLERID(num)=61862053995) [pbx_config]
8. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18) [pbx_config]

‘_X.’ (CID match ‘8561’) => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
5. Set(USERKEY=88889999) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CALLERID(num)=61862053995) [pbx_config]
8. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18) [pbx_config]
’_X.’ => 1. Set(gateway=${CALLERID(num)}) [pbx_config]
2. Answer() [pbx_config]
3. Set(GW_ID=${SHELL(/storage/asterisk/scripts/getgwid):0:-1}) [pbx_config]
4. Read(USERKEY,shipsat/enter-pin-number,10) [pbx_config]
5. Set(BOXID=${SHELL(/bin/cat /etc/shipsatid)}) [pbx_config]
6. Set(CDR(accountcode)=${USERKEY}) [pbx_config]
7. Set(CDR(userfield)=${BOXID}@${GW_ID}) [pbx_config]
9. AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GW_ID},${EXTEN}) [pbx_config]
10. Hangup(18) [pbx_config]

Because both of these:

;exten => _X./8554,n,Set(CALLERID(num)=85258192231)
exten => X.,n,AGI(checkUserAuth.agi,${USERKEY},${BOXID},${GWID},${EXTEN})

Would become the same priority number when read in. If you want the AGI to be executed afterwards you need to add a NoOp to the non-CALLERID route.

1 Like

Thank you very much for your time and assistance and the explanation !

I was using another extension though , the 8551. Why was it matching the 8554 and jumping to that ?