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’