<div dir="ltr"><div>Sorry about that it's the g option:<br> g: Proceed with dialplan execution at the next priority in the current<br> extension if the destination channel hangs up.<br><br></div><div>What you are doing is "dialing" another location that picks up. When you press # the called leg hangs up and the call continues in the dialplan.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 9, 2016 at 9:50 AM, Jonathan H <span dir="ltr"><<a href="mailto:lardconcepts@gmail.com" target="_blank">lardconcepts@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there;<br>
<br>
I didn't see any "G" option in the example above, and the usage for<br>
the option parameters is entirely undocumented at<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Dial" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Dial</a><br>
<br>
The G options are as below<br>
G - If the call is answered, transfer the calling party to the<br>
specified priority and the called party to the specified priority plus<br>
one.<br>
context<br>
exten<br>
priority<br>
<br>
I think I have something almost there now, with the following:<br>
<br>
[streamdemo]<br>
exten => s,1,Answer<br>
exten => s,2,BackGround(menu)<br>
exten => s,3,WaitExten<br>
exten => s,4,Goto(s,2)<br>
exten => _[2,3,4,5],1,Dial(Local/${EXTEN}@play-radio,,G(play-radio^${EXTEN}^2))<br>
exten => _[2,3,4,5],2,Goto(s,2)<br>
<br>
[play-radio]<br>
Exten => _[2,3,4,5],1,Answer<br>
exten => _[2,3,4,5],2,MusicOnHold(${CALLERID(name)}${EXTEN})<br>
exten => _[2,3,4,5],3,Set(CHANNEL(language)=en_GB)<br>
exten => _[2,3,4,5],4,BackGround(menu)<br>
exten => _[2,3,4,5],5,WaitExten<br>
exten => _[X,t,i],1,Goto(streamdemo,s,2)<br>
<br>
However, it's like the play-radio channel can't "hear" the dtmf.<br>
<br>
Here's the output - once that MoH starts playing, no amount of button<br>
pushing works. All I'm left with is a channel which isn't closed<br>
properly when the phone is hung up.<br>
<br>
By the way, it looks like that "G" option IS working because the MoH<br>
starts, then the "called party" plays back an example piece of "menu"<br>
audio while the MoH is playing, but seems to ignore the keypresses.<br>
<br>
-- Executing [s@streamdemo:1] Answer("Local/s@root-00000002;2", "") in new stack<br>
-- Local/s@root-00000002;1 answered PJSIP/voipfone-201-00000002<br>
-- Channel Local/s@root-00000002;1 joined 'simple_bridge'<br>
basic-bridge <3ac0c9be-2817-48e7-bcd8-4318eb1f9c2b><br>
-- Channel PJSIP/voipfone-201-00000002 joined 'simple_bridge'<br>
basic-bridge <3ac0c9be-2817-48e7-bcd8-4318eb1f9c2b><br>
-- Executing [s@streamdemo:2]<br>
BackGround("Local/s@root-00000002;2", "menu") in new stack<br>
-- <Local/s@root-00000002;2> Playing 'menu.alaw' (language 'en_GB')<br>
-- Executing [s@streamdemo:3] WaitExten("Local/s@root-00000002;2",<br>
"") in new stack<br>
-- Executing [2@streamdemo:1] Dial("Local/s@root-00000002;2",<br>
"Local/2@play-radio,,G(play-radio^2^2)") in new stack<br>
-- Called Local/2@play-radio<br>
-- Executing [2@play-radio:1]<br>
Answer("Local/2@play-radio-00000003;2", "") in new stack<br>
-- Local/2@play-radio-00000003;1 answered Local/s@root-00000002;2<br>
-- Executing [2@play-radio:2]<br>
MusicOnHold("Local/s@root-00000002;2", "streamdemo2") in new stack<br>
-- Started music on hold, class 'streamdemo2', on channel<br>
'Local/s@root-00000002;2'<br>
-- Executing [2@play-radio:3] Set("Local/2@play-radio-00000003;1",<br>
"CHANNEL(language)=en_GB") in new stack<br>
-- Executing [2@play-radio:4]<br>
BackGround("Local/2@play-radio-00000003;1", "menu") in new stack<br>
-- Executing [2@play-radio:2]<br>
MusicOnHold("Local/2@play-radio-00000003;2", "streamdemo2") in new<br>
stack<br>
-- Started music on hold, class 'streamdemo2', on channel<br>
'Local/2@play-radio-00000003;2'<br>
-- <Local/2@play-radio-00000003;1> Playing 'menu.alaw' (language 'en_GB')<br>
-- Executing [2@play-radio:5]<br>
WaitExten("Local/2@play-radio-00000003;1", "") in new stack<br>
-- Timeout on Local/2@play-radio-00000003;1, going to 't'<br>
-- Executing [t@play-radio:1]<br>
Goto("Local/2@play-radio-00000003;1", "streamdemo,s,2") in new stack<br>
-- Goto (streamdemo,s,2)<br>
-- Executing [s@streamdemo:2]<br>
BackGround("Local/2@play-radio-00000003;1", "menu") in new stack<br>
-- <Local/2@play-radio-00000003;1> Playing 'menu.alaw' (language 'en_GB')<br>
-- Executing [s@streamdemo:3]<br>
WaitExten("Local/2@play-radio-00000003;1", "") in new stack<br>
-- Timeout on Local/2@play-radio-00000003;1, continuing...<br>
<div class="HOEnZb"><div class="h5"><br>
On 8 May 2016 at 14:56, Dovid Bender <<a href="mailto:dovid@telecurve.com">dovid@telecurve.com</a>> wrote:<br>
> Michael,<br>
><br>
> What you do is you dial another context and then use the G option in the dial string. So something like this.<br>
><br>
> [radio-main]<br>
> Exten => s,1,answer<br>
> Exten => s,2,Background(play-menu)<br>
> Exten => s,3,waitexten<br>
> Exten => S,4,Goto(s,2)<br>
><br>
> Exten => 1,1,Dial(Local/CNN@play-radio)<br>
> Exten => 1,2,Goto(s,2)<br>
><br>
> Exten => 2,1,Dial(Local/NPR@play-radio)<br>
> Exten => 2,2,Goro(s,2)<br>
><br>
> [play-radio]<br>
> Exten => _[A-Z].,1,Answer<br>
> Exten => _[A-Z].,2,Musiconhold(${EXTEN})<br>
><br>
><br>
> Regards,<br>
><br>
> Dovid<br>
><br>
> -----Original Message-----<br>
> From: Jonathan H <<a href="mailto:lardconcepts@gmail.com">lardconcepts@gmail.com</a>><br>
> Sender: asterisk-users-bounces@lists.digium.comDate: Sun, 8 May 2016 11:36:42<br>
> To: Asterisk Users Mailing List - Non-Commercial Discussion<<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>><br>
> Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
> <<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>><br>
> Subject: [asterisk-users] Switching between Music on Hold streams. [13.8.2]<br>
><br>
> I'd like multiple people to be able to dial in and listen to various<br>
> live radio streams.<br>
><br>
> I was told that the correct resource-friendly way would be to setup a<br>
> MoH class, and then select that from the dialplan.<br>
><br>
> This works well, but how do I switch between streams?<br>
><br>
> Someone correct me if I'm wrong, but from previous similar questions a<br>
> few years ago it seems like once you've entered a MoH class, there is<br>
> no exit.<br>
><br>
> But might there be some trick involved merged or bridged calls, or<br>
> chan_spy or something, so that callers could quickly switch between 3<br>
> streams with a keypress?<br>
><br>
> Thank you!<br>
><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" rel="noreferrer" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" rel="noreferrer" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div>