So I have Google Voice integration working pretty well with Asterisk 1.8 and 2.9, both incoming and outgoing. I have a google voice incoming line for each extension, I would like to set it up so that each extension dials out using its own trunk.
So I installed custom-contexts and configured one to restrict the outbound route to the associated GV Trunk. I assigned this to the device and tried, and no go. The log shows me that when the context is from-internal, the steps asterisk is taking is completely different from the custom context. While this makes sense, how do I make the custom context behave like from-internal?
Here are the two log entry sets, 1st from the custom context, second from Allow All
[Jun 4 13:44:32] VERBOSE[58625] netsock2.c: == Using SIP RTP TOS bits 184
[Jun 4 13:44:32] VERBOSE[58625] pbx.c: – Executing [##########@1002:1] Dial(“SIP/1002-00000079”, "Gtalk/1002@.com/+##########@voice.google.com") in new stack
[Jun 4 13:44:32] VERBOSE[58625] chan_gtalk.c: OOOOH domain = 1002
[Jun 4 13:44:32] VERBOSE[58625] app_dial.c: – Called 1002@.com/+##########@voice.google.com
[Jun 4 13:44:32] WARNING[58625] acl.c: Cannot connect
[Jun 4 13:44:32] VERBOSE[58625] app_dial.c: – Gtalk/+##########@voice.google.com-61bf is ringing
[Jun 4 13:44:32] NOTICE[58625] chan_gtalk.c: Remote peer reported an error, trying to establish the call anyway
[Jun 4 13:44:32] NOTICE[58625] chan_gtalk.c: Remote peer reported an error, trying to establish the call anyway
[Jun 4 13:44:52] VERBOSE[58625] pbx.c: == Spawn extension (1002, ##########, 1) exited non-zero on ‘SIP/1002-00000079’
[Jun 4 13:44:52] VERBOSE[58625] pbx.c: – Executing [h@1002:1] Macro(“SIP/1002-00000079”, “hangupcall,”) in new stack
[Jun 4 13:44:52] VERBOSE[58625] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/1002-00000079”, “1?theend”) in new stack
[Jun 4 13:44:52] VERBOSE[58625] pbx.c: – Goto (macro-hangupcall,s,3)
[Jun 4 13:44:52] VERBOSE[58625] pbx.c: – Executing [s@macro-hangupcall:3] Hangup(“SIP/1002-00000079”, “”) in new stack
[Jun 4 13:44:52] VERBOSE[58625] app_macro.c: == Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘SIP/1002-00000079’ in macro ‘hangupcall’
[Jun 4 13:44:52] VERBOSE[58625] pbx.c: == Spawn extension (1002, h, 1) exited non-zero on ‘SIP/1002-00000079’
[Jun 4 13:44:53] NOTICE[58625] chan_gtalk.c: Remote peer reported an error, trying to establish the call anyway
[Jun 4 13:44:53] NOTICE[58625] chan_gtalk.c: Whoa, didn’t find call during hangup!
[Jun 4 13:45:07] VERBOSE[58625] netsock2.c: == Using SIP RTP TOS bits 184
[Jun 4 13:45:07] VERBOSE[58625] pbx.c: – Executing [1##########@1002:1] Dial(“SIP/1002-0000007a”, “Gtalk/1002@*******.com/+1##########@voice.google.com”) in new stack
[Jun 4 13:45:07] VERBOSE[58625] chan_gtalk.c: OOOOH domain = 1002
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [##########@from-internal:1] Macro(“SIP/1002-0000007b”, “user-callerid,LIMIT,”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:1] Set(“SIP/1002-0000007b”, “AMPUSER=1002”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:2] GotoIf(“SIP/1002-0000007b”, “0?report”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:3] ExecIf(“SIP/1002-0000007b”, “1?Set(REALCALLERIDNUM=1002)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:4] Set(“SIP/1002-0000007b”, “AMPUSER=1002”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:5] Set(“SIP/1002-0000007b”, “AMPUSERCIDNAME=ramarnat”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:6] GotoIf(“SIP/1002-0000007b”, “0?report”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:7] Set(“SIP/1002-0000007b”, “AMPUSERCID=1002”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:8] Set(“SIP/1002-0000007b”, “CALLERID(all)=“ramarnat” <1002>”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:9] GotoIf(“SIP/1002-0000007b”, “0?limit”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:10] ExecIf(“SIP/1002-0000007b”, “1?Set(GROUP(concurrency_limit)=1002)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:11] GotoIf(“SIP/1002-0000007b”, “1?continue”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-user-callerid,s,24)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:24] Set(“SIP/1002-0000007b”, “CALLERID(number)=1002”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:25] Set(“SIP/1002-0000007b”, “CALLERID(name)=ramarnat”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-user-callerid:26] Set(“SIP/1002-0000007b”, “CHANNEL(language)=en”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [##########@from-internal:2] Set(“SIP/1002-0000007b”, “MOHCLASS=default”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [##########@from-internal:3] Set(“SIP/1002-0000007b”, “_NODEST=”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [##########@from-internal:4] Macro(“SIP/1002-0000007b”, “record-enable,1002,OUT,”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-record-enable:1] GotoIf(“SIP/1002-0000007b”, “1?check”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-record-enable,s,4)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-record-enable:4] ExecIf(“SIP/1002-0000007b”, “0?MacroExit()”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-record-enable:5] GotoIf(“SIP/1002-0000007b”, “0?Group:OUT”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-record-enable,s,14)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-record-enable:14] GotoIf(“SIP/1002-0000007b”, “0?IN”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-record-enable:15] ExecIf(“SIP/1002-0000007b”, “1?MacroExit()”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [##########@from-internal:5] Macro(“SIP/1002-0000007b”, “dialout-trunk,6,1##########,”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“SIP/1002-0000007b”, “DIAL_TRUNK=6”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/1002-0000007b”, “0?sub-pincheck,s,1”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/1002-0000007b”, “0?disabletrunk,1”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“SIP/1002-0000007b”, “DIAL_NUMBER=1##########”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“SIP/1002-0000007b”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“SIP/1002-0000007b”, “OUTBOUND_GROUP=OUT_6”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/1002-0000007b”, “1?nomax”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-dialout-trunk,s,9)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/1002-0000007b”, “0?skipoutcid”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:10] Set(“SIP/1002-0000007b”, “DIAL_TRUNK_OPTIONS=”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:11] Macro(“SIP/1002-0000007b”, “outbound-callerid,6”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/1002-0000007b”, “0?Set(CALLERPRES()=)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/1002-0000007b”, “0?Set(REALCALLERIDNUM=1002)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/1002-0000007b”, “1?normcid”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-outbound-callerid,s,6)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“SIP/1002-0000007b”, “USEROUTCID=##########”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“SIP/1002-0000007b”, “EMERGENCYCID=”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“SIP/1002-0000007b”, “TRUNKOUTCID=##########”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/1002-0000007b”, “1?trunkcid”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-outbound-callerid,s,12)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/1002-0000007b”, “1?Set(CALLERID(all)=##########)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/1002-0000007b”, “1?Set(CALLERID(all)=##########)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/1002-0000007b”, “0?Set(CALLERID(all)=)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/1002-0000007b”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/1002-0000007b”, “1?sub-flp-6,s,1”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@sub-flp-6:1] ExecIf(“SIP/1002-0000007b”, “0?Set(TARGET_FLP_6=11##########)”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@sub-flp-6:2] GotoIf(“SIP/1002-0000007b”, “0?match”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@sub-flp-6:3] ExecIf(“SIP/1002-0000007b”, “1?Return()”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:13] Set(“SIP/1002-0000007b”, “OUTNUM=1##########”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“SIP/1002-0000007b”, “custom=AMP”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/1002-0000007b”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/1002-0000007b”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:17] Macro(“SIP/1002-0000007b”, “dialout-trunk-predial-hook,”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/1002-0000007b”, “”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/1002-0000007b”, “0?bypass,1”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/1002-0000007b”, “1?customtrunk”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-dialout-trunk,s,23)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:23] Set(“SIP/1002-0000007b”, “pre_num=AMP:gtalk/1002/+”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:24] Set(“SIP/1002-0000007b”, “the_num=OUTNUM”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:25] Set(“SIP/1002-0000007b”, "[email protected]") in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:26] GotoIf(“SIP/1002-0000007b”, “1?outnum:skipoutnum”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Goto (macro-dialout-trunk,s,27)
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:27] Set(“SIP/1002-0000007b”, “the_num=1##########”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] pbx.c: – Executing [s@macro-dialout-trunk:28] Dial(“SIP/1002-0000007b”, “gtalk/1002/+1##########@voice.google.com,300,”) in new stack
[Jun 4 13:47:03] VERBOSE[58625] app_dial.c: – Called 1002/+1##########@voice.google.com