Asterisk 1.8.18.0 on Mipsel chipset. I believe that at one point, pattern matching was workng as intended. Specifically, the use-case where
91(NXX) NXX-XXXX would use a different GTalk channel.
What needs to be changed in the dialplan to correctly implement?
This is what a successful call should look like:
[quote] == Using SIP RTP CoS mark 5
– Executing [18005551212@mario-default:1] Dial(“SIP/101-00000001”, “Gtalk/MyAccount/18005551212@voice.google.com”) in new stack
– Called Gtalk/MyAccount/18005551212@voice.google.com
– Gtalk/18005551212@voice.google.com-667e is ringing
– Gtalk/18005551212@voice.google.com-667e answered SIP/101-00000001
== Spawn extension (mario-default, 18005551212, 1) exited non-zero on ‘SIP/101-00000001’[/quote]
Instead this is what is observed:
[quote] == Using SIP RTP CoS mark 5
[Apr 14 21:25:09] NOTICE[24908]: chan_sip.c:22942 handle_request_invite: Call from ‘101’ (192.168.8.110:5060) to extension ‘19180055512’ rejected because extension not found in context ‘mario-default’.[/quote]
It would seem that the context, labelled gv-out2, is not trapping the attempt to dial 918005551212?
This is the redacted dialplan:
[code]; * Default starting context for internal SIP devices
[mario-default]
include => gv-outbound
include => gv-out2
[gv-outbound]
; Direct Dialing from handset: if no area code, appends (212) area code by default
exten => _411,3,Dial(Gtalk/MyAccount/18005551212@voice.google.com) ; BING 411
; MAP Extension 911 to my local Police
exten => _911,1,Dial(Gtalk/MyAccount/212police#@voice.google.com)
;append an area code if necessary
exten => _NXXXXXX,1,Set(CALLERID(dnid)=1212${CALLERID(dnid)} )
exten => _NXXXXXX,n,Goto(1212${EXTEN},1)
;append a 1 if necessary
exten => _NXXNXXXXXX,1,Set(CALLERID(dnid)=1${CALLERID(dnid)})
exten => _NXXNXXXXXX,n,Goto(1${EXTEN},1)
;do our real dialing
exten => _1NXXNXXXXXX,1,Dial(Gtalk/MyAccount/${EXTEN}@voice.google.com)
;exten => _+1NXXNXXXXXX,1,Dial(Gtalk/MyAccount/${EXTEN}@voice.google.com)
[gv-out2]
; User Dials 9 then number myGtalkAccount account (202)
; Map Extension 911 to my local police
exten => _9911,1,Dial(Gtalk/myGtalkAccount/202police#@voice.google.com)
; Append area code 202 if necessary
exten => _9NXXXXXX,1,Set(CALLERID(dnid)=1202${CALLERID(dnid)})
; {EXTEN:1} is NXXXXXX (everything after the first dialed number, in this case 9)
exten => _9NXXXXXX,n,Goto(91202${EXTEN:1},1)
;append a 1 if necessary
exten => _9NXXNXXXXXX,1,Set(CALLERID(dnid)=1${CALLERID(dnid)})
; {EXTEN:1} is NXXNXXXXXX(everything after the first dialed number, in this case 9)
exten => _9NXXNXXXXXX,n,Goto(91${EXTEN:1},1)
;do our real dialing
exten => _91NXXNXXXXXX,1,Dial(Gtalk/myGtalkAccount/${EXTEN:1}@voice.google.com)
;exten => _+1NXXNXXXXXX,1,Dial(Gtalk/myGtalkAccount/${EXTEN}@voice.google.com)[/code]