Incoming on PSTN Not Working

I just powered up my PBXIAF a couple of weeks ago and ran all the updates (after the system had been down for several months while I was playing around with Trixbox) and now my inbound PSTN calls drop as soon as they are answered.

Used the tutorial from nerdvittles to config my system:
(nerdvittles.com/index.php?p=65).

========================================

Below is my extensions_custom.conf entry and data pulled from my “full” log file.


;next extension (99) is to handle incoming PSTN calls
exten => 99,1,GotoIf($["${CALLERIDNUM:0:2}" = “00”]?2:3)
exten => 99,2,SetCIDNum(${CALLERIDNUM:2})
exten => 99,3,SetMusicOnHold(default)
exten => 99,4,Answer
exten => 99,5,Wait(1)
exten => 99,6,Background(pls-wait-connect-call)
exten => 99,7,Set(TIMEOUT(digit)=2)
exten => 99,8,Set(TIMEOUT(response)=2)
exten => t,1,Answer
exten => t,2,Wait(1)
exten => t,3,Background(pls-hold-while-try)
exten => t,4,Dial(SIP/2006,20,m)
exten => t,5,VoiceMail(2006@default)
exten => t,6,Hangup
exten => i,1,Answer
exten => i,2,Wait(1)
exten => i,3,Playback(wrong-try-again-smarty)
exten => i,3,Playback(yes-dear)
exten => i,4,Goto(99,5)


root@pbx:/var/log/asterisk $ vi full.3
[Feb 14 15:29:24] VERBOSE[19184] logger.c: – Executing [99@from-internal:1] GotoIf(“SIP/asterisk-08bdb500”, “0?2:3”) in new stack
[Feb 14 15:29:24] VERBOSE[19184] logger.c: – Goto (from-internal,99,3)
[Feb 14 15:29:24] VERBOSE[19184] logger.c: – Executing [99@from-internal:3] SetMusicOnHold(“SIP/asterisk-08bdb500”, “default”) in new stack
[Feb 14 15:29:24] VERBOSE[19184] logger.c: – Executing [99@from-internal:4] Answer(“SIP/asterisk-08bdb500”, “”) in new stack
[Feb 14 15:29:24] VERBOSE[19184] logger.c: – Executing [99@from-internal:5] Wait(“SIP/asterisk-08bdb500”, “1”) in new stack
[Feb 14 15:29:25] VERBOSE[19184] logger.c: – Executing [99@from-internal:6] BackGround(“SIP/asterisk-08bdb500”, “pls-wait-connect-call”) in new stack
[Feb 14 15:29:25] VERBOSE[19184] logger.c: – <SIP/asterisk-08bdb500> Playing ‘pls-wait-connect-call’ (language ‘en’)
[Feb 14 15:29:27] VERBOSE[19184] logger.c: – Executing [99@from-internal:7] Set(“SIP/asterisk-08bdb500”, “TIMEOUT(digit)=2”) in new stack
[Feb 14 15:29:27] VERBOSE[19184] logger.c: – Digit timeout set to 2
[Feb 14 15:29:27] VERBOSE[19184] logger.c: – Executing [99@from-internal:8] Set(“SIP/asterisk-08bdb500”, “TIMEOUT(response)=2”) in new stack
[Feb 14 15:29:27] VERBOSE[19184] logger.c: – Response timeout set to 2
[Feb 14 15:29:27] VERBOSE[19184] logger.c: == Auto fallthrough, channel ‘SIP/asterisk-08bdb500’ status is ‘UNKNOWN’
[Feb 14 15:29:27] VERBOSE[19184] logger.c: – Executing [h@from-internal:1] Macro(“SIP/asterisk-08bdb500”, “hangupcall”) in new stack

==========================================

I’ve spent quite a bit of time trying to fix this. I’m kinda at a loss now. Thanks in advance for any suggestions.

Something’s gone missing! You need something like: -

exten => 99,9,WaitExten(10)

to tell it to wait for the caller to dial something (for 10 secs). Otherwise it will just hangup when it runs out of commands at 99,8. A very old version of asterisk used to wait for exten when you ran out of commands but that is a HUGE security hole and nobody does that these days.

Maybe: -

exten => 99,10,Goto(t,1)

is also needed, probably not since the 10sec is > your 2sec.

I thought that after 99,8 it would just “fall through” and dial 2006 - which is my PSTN line…

My goal is to have it ring extension 2006 if the caller doesn’t enter anything…

That’s what I thought you were going for. No, when a call runs out of dialplan “priorities” (exten => exten,priority,command) then it will hangup. There is no automatic jump to anywhere under these conditions. So: -exten => 99,9,WaitExten(10) exten => 99,10,Goto(t,1)
Would likely work for you, the goto is for when the user enters nothing at all. Also: -exten => i,3,Playback(wrong-try-again-smarty) exten => i,3,Playback(yes-dear)
Should be: -exten => i,3,Playback(wrong-try-again-smarty&yes-dear)(you cannot have duplicate priorities)

Sorry it took so long to respond - here is my new extensions_custom entry and the latest trace. It appears that my Sipura may be configed wrong…I’m getting a SIP 302 error now.

;next extension (99) is to handle incoming PSTN calls
exten => 99,1,GotoIf($["${CALLERIDNUM:0:2}" = “00”]?2:3)
exten => 99,2,SetCIDNum(${CALLERIDNUM:2})
exten => 99,3,SetMusicOnHold(default)
exten => 99,4,Answer
exten => 99,5,Wait(1)
exten => 99,6,Background(pls-wait-connect-call)
exten => 99,7,Set(TIMEOUT(digit)=2)
exten => 99,8,Set(TIMEOUT(response)=2)
exten => 99,9,WaitExten(10)
exten => 99,10,Goto(t,1)
exten => t,1,Answer
exten => t,2,Wait(1)
exten => t,3,Background(pls-hold-while-try)
exten => t,4,Dial(SIP/2006,20,m)
exten => t,5,VoiceMail(2006@default)
exten => t,6,Hangup
exten => i,1,Answer
exten => i,2,Wait(1)
exten => i,3,Playback(wrong-try-again-smarty)
exten => i,4,Goto(99,5)

[2009-03-29 11:32:15] VERBOSE[21362] logger.c: – Executing [99@from-internal:1] GotoIf(“SIP/asterisk-092b6be8”, “0?2:3”) in new stack
[2009-03-29 11:32:15] VERBOSE[21362] logger.c: – Goto (from-internal,99,3)
[2009-03-29 11:32:15] VERBOSE[21362] logger.c: – Executing [99@from-internal:3] SetMusicOnHold(“SIP/asterisk-092b6be8”, “default”) in new stack
[2009-03-29 11:32:15] VERBOSE[21362] logger.c: – Executing [99@from-internal:4] Answer(“SIP/asterisk-092b6be8”, “”) in new stack
[2009-03-29 11:32:15] VERBOSE[21362] logger.c: – Executing [99@from-internal:5] Wait(“SIP/asterisk-092b6be8”, “1”) in new stack
[2009-03-29 11:32:16] VERBOSE[21362] logger.c: – Executing [99@from-internal:6] BackGround(“SIP/asterisk-092b6be8”, “pls-wait-connect-call”) in new stack
[2009-03-29 11:32:16] VERBOSE[21362] logger.c: – <SIP/asterisk-092b6be8> Playing ‘pls-wait-connect-call’ (language ‘en’)
[2009-03-29 11:32:18] VERBOSE[21362] logger.c: – Executing [99@from-internal:7] Set(“SIP/asterisk-092b6be8”, “TIMEOUT(digit)=2”) in new stack
[2009-03-29 11:32:18] VERBOSE[21362] logger.c: – Digit timeout set to 2
[2009-03-29 11:32:18] VERBOSE[21362] logger.c: – Executing [99@from-internal:8] Set(“SIP/asterisk-092b6be8”, “TIMEOUT(response)=2”) in new stack
[2009-03-29 11:32:18] VERBOSE[21362] logger.c: – Response timeout set to 2
[2009-03-29 11:32:18] VERBOSE[21362] logger.c: – Executing [99@from-internal:9] WaitExten(“SIP/asterisk-092b6be8”, “10”) in new stack
[2009-03-29 11:32:29] VERBOSE[21362] logger.c: – Timeout on SIP/asterisk-092b6be8, continuing…
[2009-03-29 11:32:29] VERBOSE[21362] logger.c: – Executing [99@from-internal:10] Goto(“SIP/asterisk-092b6be8”, “t|1”) in new stack
[2009-03-29 11:32:29] VERBOSE[21362] logger.c: – Goto (from-internal,t,1)
[2009-03-29 11:32:29] VERBOSE[21362] logger.c: – Executing [t@from-internal:1] Answer(“SIP/asterisk-092b6be8”, “”) in new stack
[2009-03-29 11:32:29] VERBOSE[21362] logger.c: – Executing [t@from-internal:2] Wait(“SIP/asterisk-092b6be8”, “1”) in new stack
[2009-03-29 11:32:30] VERBOSE[21362] logger.c: – Executing [t@from-internal:3] BackGround(“SIP/asterisk-092b6be8”, “pls-hold-while-try”) in new stack
[2009-03-29 11:32:30] VERBOSE[21362] logger.c: – <SIP/asterisk-092b6be8> Playing ‘pls-hold-while-try’ (language ‘en’)
[2009-03-29 11:32:32] VERBOSE[21362] logger.c: – Executing [t@from-internal:4] Dial(“SIP/asterisk-092b6be8”, “SIP/2006|20|m”) in new stack
[2009-03-29 11:32:32] VERBOSE[21362] logger.c: – Called 2006
[2009-03-29 11:32:32] VERBOSE[21362] logger.c: – Started music on hold, class ‘default’, on SIP/asterisk-092b6be8
[2009-03-29 11:32:32] VERBOSE[3085] logger.c: – Got SIP response 302 “Moved Temporarily” back from 192.168.0.125
[2009-03-29 11:32:32] VERBOSE[21362] logger.c: – Now forwarding SIP/asterisk-092b6be8 to ‘Local/99@from-internal’ (thanks to SIP/2006-092c48a0)
[2009-03-29 11:32:32] VERBOSE[21364] logger.c: – Executing [99@from-internal:1] GotoIf(“Local/99@from-internal-7967,2”, “0?2:3”) in new stack
[2009-03-29 11:32:32] VERBOSE[21364] logger.c: – Goto (from-internal,99,3)
[2009-03-29 11:32:32] VERBOSE[21364] logger.c: – Executing [99@from-internal:3] SetMusicOnHold(“Local/99@from-internal-7967,2”, “default”) in new stack
[2009-03-29 11:32:32] VERBOSE[21364] logger.c: – Executing [99@from-internal:4] Answer(“Local/99@from-internal-7967,2”, “”) in new stack
[2009-03-29 11:32:32] VERBOSE[21364] logger.c: – Executing [99@from-internal:5] Wait(“Local/99@from-internal-7967,2”, “1”) in new stack
[2009-03-29 11:32:32] VERBOSE[21362] logger.c: – Local/99@from-internal-7967,1 answered SIP/asterisk-092b6be8
[2009-03-29 11:32:32] VERBOSE[21362] logger.c: – Stopped music on hold on SIP/asterisk-092b6be8
[2009-03-29 11:32:33] VERBOSE[21364] logger.c: – Executing [99@from-internal:6] BackGround(“Local/99@from-internal-7967,2”, “pls-wait-connect-call”) in new stack
[2009-03-29 11:32:33] VERBOSE[21364] logger.c: – <Local/99@from-internal-7967,2> Playing ‘pls-wait-connect-call’ (language ‘en’)
[2009-03-29 11:32:35] VERBOSE[21364] logger.c: – Executing [99@from-internal:7] Set(“Local/99@from-internal-7967,2”, “TIMEOUT(digit)=2”) in new stack
[2009-03-29 11:32:35] VERBOSE[21364] logger.c: – Digit timeout set to 2
[2009-03-29 11:32:35] VERBOSE[21364] logger.c: – Executing [99@from-internal:8] Set(“Local/99@from-internal-7967,2”, “TIMEOUT(response)=2”) in new stack
[2009-03-29 11:32:35] VERBOSE[21364] logger.c: – Response timeout set to 2
[2009-03-29 11:32:35] VERBOSE[21364] logger.c: – Executing [99@from-internal:9] WaitExten(“Local/99@from-internal-7967,2”, “10”) in new stack
[2009-03-29 11:32:45] VERBOSE[21364] logger.c: – Timeout on Local/99@from-internal-7967,2, continuing…
[2009-03-29 11:32:45] VERBOSE[21364] logger.c: – Executing [99@from-internal:10] Goto(“Local/99@from-internal-7967,2”, “t|1”) in new stack
[2009-03-29 11:32:45] VERBOSE[21364] logger.c: – Goto (from-internal,t,1)
[2009-03-29 11:32:45] VERBOSE[21364] logger.c: – Executing [t@from-internal:1] Answer(“Local/99@from-internal-7967,2”, “”) in new stack
[2009-03-29 11:32:45] VERBOSE[21364] logger.c: – Executing [t@from-internal:2] Wait(“Local/99@from-internal-7967,2”, “1”) in new stack
[2009-03-29 11:32:46] VERBOSE[21364] logger.c: – Executing [t@from-internal:3] BackGround(“Local/99@from-internal-7967,2”, “pls-hold-while-try”) in new stack
[2009-03-29 11:32:46] VERBOSE[21364] logger.c: – <Local/99@from-internal-7967,2> Playing ‘pls-hold-while-try’ (language ‘en’)
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [t@from-internal:4] Dial(“Local/99@from-internal-7967,2”, “SIP/2006|20|m”) in new stack
[2009-03-29 11:32:48] WARNING[21364] app_dial.c: Skipping dialing interface ‘SIP/2006’ again since it has already been dialed
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: == Spawn extension (from-internal, t, 4) exited non-zero on ‘Local/99@from-internal-7967,2’
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [h@from-internal:1] Macro(“Local/99@from-internal-7967,2”, “hangupcall”) in new stack
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [s@macro-hangupcall:1] ResetCDR(“Local/99@from-internal-7967,2”, “w”) in new stack
[2009-03-29 11:32:48] DEBUG[21364] app_macro.c: Executed application: ResetCDR
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [s@macro-hangupcall:2] NoCDR(“Local/99@from-internal-7967,2”, “”) in new stack
[2009-03-29 11:32:48] DEBUG[21364] app_macro.c: Executed application: NoCDR
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [s@macro-hangupcall:3] GotoIf(“Local/99@from-internal-7967,2”, “1?skiprg”) in new stack
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Goto (macro-hangupcall,s,6)
[2009-03-29 11:32:48] DEBUG[21364] app_macro.c: Executed application: GotoIf
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [s@macro-hangupcall:6] GotoIf(“Local/99@from-internal-7967,2”, “1?skipblkvm”) in new stack
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Goto (macro-hangupcall,s,9)
[2009-03-29 11:32:48] DEBUG[21364] app_macro.c: Executed application: GotoIf
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [s@macro-hangupcall:9] GotoIf(“Local/99@from-internal-7967,2”, “1?theend”) in new stack
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Goto (macro-hangupcall,s,11)
[2009-03-29 11:32:48] DEBUG[21364] app_macro.c: Executed application: GotoIf
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: – Executing [s@macro-hangupcall:11] Hangup(“Local/99@from-internal-7967,2”, “”) in new stack
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: == Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘Local/99@from-internal-7967,2’ in macro ‘hangupcall’
[2009-03-29 11:32:48] VERBOSE[21364] logger.c: == Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘Local/99@from-internal-7967,2’
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: == Spawn extension (from-internal, t, 4) exited non-zero on ‘SIP/asterisk-092b6be8’
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [h@from-internal:1] Macro(“SIP/asterisk-092b6be8”, “hangupcall”) in new stack
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [s@macro-hangupcall:1] ResetCDR(“SIP/asterisk-092b6be8”, “w”) in new stack
[2009-03-29 11:32:48] DEBUG[21362] app_macro.c: Executed application: ResetCDR
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [s@macro-hangupcall:2] NoCDR(“SIP/asterisk-092b6be8”, “”) in new stack
[2009-03-29 11:32:48] DEBUG[21362] app_macro.c: Executed application: NoCDR
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [s@macro-hangupcall:3] GotoIf(“SIP/asterisk-092b6be8”, “1?skiprg”) in new stack
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Goto (macro-hangupcall,s,6)
[2009-03-29 11:32:48] DEBUG[21362] app_macro.c: Executed application: GotoIf
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [s@macro-hangupcall:6] GotoIf(“SIP/asterisk-092b6be8”, “1?skipblkvm”) in new stack
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Goto (macro-hangupcall,s,9)
[2009-03-29 11:32:48] DEBUG[21362] app_macro.c: Executed application: GotoIf
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [s@macro-hangupcall:9] GotoIf(“SIP/asterisk-092b6be8”, “1?theend”) in new stack
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Goto (macro-hangupcall,s,11)
[2009-03-29 11:32:48] DEBUG[21362] app_macro.c: Executed application: GotoIf
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: – Executing [s@macro-hangupcall:11] Hangup(“SIP/asterisk-092b6be8”, “”) in new stack
[2009-03-29 11:32:48] VERBOSE[21362] logger.c: == Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/asterisk-092b6be8’ in macro ‘hangupcall’