App_stack.c:1079 gosub_run: SIP/pstn-5665 Abnormal 'Gosub(atb-sub,s,1)

I’m getting “Warning”
app_stack.c:1079 gosub_run: SIP/pstn-5665-0000000b Abnormal 'Gosub(atb-sub,s,1)

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

Either you haven’t given all your dialplan, or you need to define context atb-sub, and define priority 1 of extension s, in that context.

Also are you aware that you are using a channel driver that is no longer included in Asterisk and, effectively, is unsupported in back versions?

I do have it.
exten => 51,1,Answer
exten => 51,n,Dial(SIP/xxxxxxxxxx @pstn-5665,20,U(atb-sub))

exten => s,1,Wait(6)
exten => s,n,SendDTMF(1)

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().

The full message would have been:

app_stack.c:1079 gosub_run: SIP/pstn-5665-0000000b Abnormal 'Gosub(atb-sub,s,1)' exit. Popping routine return locations.

assuming line 1077 in the current master version is the same as line 1079 in your, unstated, version.

On which channel are you trying to send DTMF?

I see, OK there is the full output.

Executing [s@atb-sub:5] SendDTMF(“SIP/pstn-5665-00000013”, “1”) in new stack
[Jan 20 16:06:51] WARNING[28987][C-00000009]: app_stack.c:1079 gosub_run: SIP/pstn-5665-00000013 Abnormal ‘Gosub(atb-sub,s,1)’ exit. Popping routine return locations.
– Channel SIP/pstn-5665-00000013 joined ‘simple_bridge’ basic-bridge <18618bb3-ce50-4d52-a86b-4e457d89926a>
– Channel SIP/55-00000012 joined ‘simple_bridge’ basic-bridge <18618bb3-ce50-4d52-a86b-4e457d89926a>
> Bridge 18618bb3-ce50-4d52-a86b-4e457d89926a: switching from simple_bridge technology to native_rtp
> Locally RTP bridged ‘SIP/55-00000012’ and ‘SIP/pstn-5665-00000013’ in stack
– Channel SIP/55-00000012 left ‘native_rtp’ basic-bridge <18618bb3-ce50-4d52-a86b-4e457d89926a>
– Channel SIP/pstn-5665-00000013 left ‘native_rtp’ basic-bridge <18618bb3-ce50-4d52-a86b-4e457d89926a>
== Spawn extension (internal, 51, 2) exited non-zero on ‘SIP/55-00000012’

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.

dialplan show atb-sub

Her what I get,

dialplan show atb-sub
[ Context ‘atb-sub’ created by ‘pbx_config’ ]
‘s’ => 1. Wait(6) [extensions.conf:367]
2. SendDTMF(1) [extensions.conf:368]
3. SendDTMF(0040138056179#) [extensions.conf:369]
4. SendDTMF(780450710#) [extensions.conf:370]
5. SendDTMF(1) [extensions.conf:371]

-= 1 extension (5 priorities) in 1 context. =-

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!
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?
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

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.