Hung up not working while injected sound

Hungup not working while injected sound. Here is the code…

[phones]
exten => 301,1,NoOp(=====SIP 301)
same => n,Dial(SIP/${EXTEN)}
same => n,Verbose(“Call Over…”)
same => n,Hangup()

exten => 302,1,NoOp(=====SIP 302)
same => n,Dial(SIP/${EXTEN},30,G(monitor_1^0^1))
same => n,Verbose(“Call Over…”)
same => n,Hangup()

[monitor_1]
exten => 0,1,NoOp(=====Playing sound)
exten => 0,n(music),Playback(lyrics-louie-louie)

can anyone help me.

G unconditionally transfers control out of the Dial application, so nothing after Dial will get run, if the call is answered. As you haven’t got a g option, that doesn’t differ from normal use of Dial, as the normal behaviour would also not run anything after Dial.

The two legs are separate, so there is no connection between them and one hanging up will not hang up the other. Both are having the music played independently.

Why are you trying to do this?

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