Hi,
I’m trying to create a PSTN access point for international calls, so that I dial a local number which connects via DID to my system in England, then routes calls via my ITSP. The other part I’ve added is a check to see the call originates from my cellphone, otherwise I assume someone wants to call me so I forward to the cellphone.
However, I’m having problems with the dialplan, and I guess I’m doing something stupid, please help ???
==== URI registered with my Shanghai ITSP ====
IAX2/fromshanghai@domain.com/20
==== iax.conf ====
[fromshanghai]
type=user
disallow=all
allow=gsm
allow=ilbc
context=shanghai
==== extensions.conf ====
[shanghai]
exten => 20,1,GotoIf($[${CALLERIDNUM:-11} = 55512345678]?200:10)
exten => 20,10,Playback(pls-wait-connect-call)
exten => 20,11,Dial(${trunk_3}/8655512345678,30)
exten => 20,12,VoiceMail(u20@default)
exten => 20,13,Hangup()
exten => 20,112,VoiceMail(b20@default)
exten => 20,113,Hangup()
exten => 20,200,Answer()
exten => 20,201,Set(TIMEOUT(digit)=2)
exten => 20,202,Set(TIMEOUT(response)=15)
exten => 20,203,Background(pls-entr-num-uwish2-call)
exten => _.,204,Goto(my-numberplan,${EXTEN},1)
Unfortunately, when I call the Shanghai DID and hear the prompt, regardless of what I dial, I get put through to extension 20.
I tried changing the Background to Playback and inserting WaitExten but then it tries to connect me to the first digit I dial e.g. “5” instead of “5556789”
Hear’s a trace using “asterisk -cvvv” to show what goes wrong …
Asterisk Ready.
*CLI> Apr 19 17:44:45 NOTICE[21900]: res_musiconhold.c:533 monmp3thread: Request to schedule in the past?!?!
– Accepting UNAUTHENTICATED call from 204.11.194.34:
> requested format = g729,
> requested prefs = (),
> actual format = gsm,
> host prefs = (gsm|ilbc),
> priority = mine
– Executing GotoIf(“IAX2/204.11.194.34:4569-4”, “1?200:10”) in new stack
– Goto (shanghai,20,200)
– Executing Answer(“IAX2/204.11.194.34:4569-4”, “”) in new stack
– Executing Set(“IAX2/204.11.194.34:4569-4”, “TIMEOUT(digit)=2”) in new stack
– Digit timeout set to 2
– Executing Set(“IAX2/204.11.194.34:4569-4”, “TIMEOUT(response)=15”) in new stack
– Response timeout set to 15
– Executing BackGround(“IAX2/204.11.194.34:4569-4”, “pls-entr-num-uwish2-call”) in new stack
– Playing ‘pls-entr-num-uwish2-call’ (language ‘en’)
– Executing Goto(“IAX2/204.11.194.34:4569-4”, “my-numberplan|20|1”) in new stack
– Goto (my-numberplan,20,1)
Despite setting digit timeout to 2 and response timeout to 15, I started pressing digits on my cellphone within less than a second of connection, and the trace showed that Asterisk had already gone on to dail extension 20 before I’d even pressed the first digit !!! (Atleast that’s my perception of the timing)
Please, any ideas?