My plan:
exten => 51,1,Answer
exten => 51,n,Dial(SIP/xxxxxxxxxx @pstn-5665,20,U(atb-sub))
What is the fix?
In addition when I dial the number, the Sub is sending
exten => s,n,SendDTMF(1)
but the phone is not playing it, how to enable sound in “sub” the the phone will play DTMF’s
I forgot to mention, the plan works, except I get that red warning error:
app_stack.c:1079 gosub_run: SIP/pstn-5665-0000000b Abnormal 'Gosub(atb-sub,s,1)
You didn’t provide the full warning message, which led to a wrong guess as to what it meant. I think it actually means that you ran off the end of the subroutine without executing Return().
You are not getting any dialplan steps logged in the subroutine. I’m not completely sure that that isn’t a feature of the way the subroutine is run, but I suspect it does mean that it can’t find the starting point, so I’d suggest using dialplan show on the context, to confirm that the subroutine has loaded.
I would include the Return(), in case the subroutine is getting run but not logged. The lack of the the Return is enough to cause the warning. I’m still not convinced the subroutine is running.
I would suggest playing silence, rather than using Wait.
Thank you David for the suggestion. It worked!
Including:
exten => s,n,Return()
and "Hangup()
solve it.
Is there a way to to play those DTMF tones as it dials it? In previous verions on asterisk I used Macro to dial those sequence, I could hear the automated voice on the other line and my asterisk dialing the DTMF tones. But after “Macro” was discontinued I had to switch to “U” sub and I don’t here a voice on the other line nor my asterisk dialing the numbers, so to insert correct “Wait(6)” is a hit and miss game.
What are the advantages exten => s,1,Playback(silence/6) vs. exten => s,1,Wait(6)
I would rather hear the automated voice from the other line. Is there something like “speaker ON” after dialing the number?
eg.
exten => 5,n,Dial(SIP/ 18886124542@pstn-5665,20,U(atb-sub)) - is working, it executes “U” but no ring tone is generated to calling party
exten => 5,n,Dial(SIP/ 18886124542@pstn-5665,20,r,U(atb-sub)) - generate the ring tone but it doesn’t execute “U” sub