VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
lardconcepts at gmail.com Guest
|
Posted: Sun May 08, 2016 5:37 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
I'd like multiple people to be able to dial in and listen to various
live radio streams.
I was told that the correct resource-friendly way would be to setup a
MoH class, and then select that from the dialplan.
This works well, but how do I switch between streams?
Someone correct me if I'm wrong, but from previous similar questions a
few years ago it seems like once you've entered a MoH class, there is
no exit.
But might there be some trick involved merged or bridged calls, or
chan_spy or something, so that callers could quickly switch between 3
streams with a keypress?
Thank you!
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
dovid at telecurve.com Guest
|
Posted: Sun May 08, 2016 8:57 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Michael,
What you do is you dial another context and then use the G option in the dial string. So something like this.
[radio-main]
Exten => s,1,answer
Exten => s,2,Background(play-menu)
Exten => s,3,waitexten
Exten => S,4,Goto(s,2)
Exten => 1,1,Dial(Local/CNN@play-radio)
Exten => 1,2,Goto(s,2)
Exten => 2,1,Dial(Local/NPR@play-radio)
Exten => 2,2,Goro(s,2)
[play-radio]
Exten => _[A-Z].,1,Answer
Exten => _[A-Z].,2,Musiconhold(${EXTEN})
Regards,
Dovid
-----Original Message-----
From: Jonathan H <lardconcepts@gmail.com>
Sender: asterisk-users-bounces@lists.digium.comDate: Sun, 8 May 2016 11:36:42
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users@lists.digium.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com>
Subject: [asterisk-users] Switching between Music on Hold streams. [13.8.2]
I'd like multiple people to be able to dial in and listen to various
live radio streams.
I was told that the correct resource-friendly way would be to setup a
MoH class, and then select that from the dialplan.
This works well, but how do I switch between streams?
Someone correct me if I'm wrong, but from previous similar questions a
few years ago it seems like once you've entered a MoH class, there is
no exit.
But might there be some trick involved merged or bridged calls, or
chan_spy or something, so that callers could quickly switch between 3
streams with a keypress?
Thank you!
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
lardconcepts at gmail.com Guest
|
Posted: Mon May 09, 2016 8:51 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Hi there;
I didn't see any "G" option in the example above, and the usage for
the option parameters is entirely undocumented at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Dial
The G options are as below
G - If the call is answered, transfer the calling party to the
specified priority and the called party to the specified priority plus
one.
context
exten
priority
I think I have something almost there now, with the following:
[streamdemo]
exten => s,1,Answer
exten => s,2,BackGround(menu)
exten => s,3,WaitExten
exten => s,4,Goto(s,2)
exten => _[2,3,4,5],1,Dial(Local/${EXTEN}@play-radio,,G(play-radio^${EXTEN}^2))
exten => _[2,3,4,5],2,Goto(s,2)
[play-radio]
Exten => _[2,3,4,5],1,Answer
exten => _[2,3,4,5],2,MusicOnHold(${CALLERID(name)}${EXTEN})
exten => _[2,3,4,5],3,Set(CHANNEL(language)=en_GB)
exten => _[2,3,4,5],4,BackGround(menu)
exten => _[2,3,4,5],5,WaitExten
exten => _[X,t,i],1,Goto(streamdemo,s,2)
However, it's like the play-radio channel can't "hear" the dtmf.
Here's the output - once that MoH starts playing, no amount of button
pushing works. All I'm left with is a channel which isn't closed
properly when the phone is hung up.
By the way, it looks like that "G" option IS working because the MoH
starts, then the "called party" plays back an example piece of "menu"
audio while the MoH is playing, but seems to ignore the keypresses.
-- Executing [s@streamdemo:1] Answer("Local/s@root-00000002;2", "") in new stack
-- Local/s@root-00000002;1 answered PJSIP/voipfone-201-00000002
-- Channel Local/s@root-00000002;1 joined 'simple_bridge'
basic-bridge <3ac0c9be-2817-48e7-bcd8-4318eb1f9c2b>
-- Channel PJSIP/voipfone-201-00000002 joined 'simple_bridge'
basic-bridge <3ac0c9be-2817-48e7-bcd8-4318eb1f9c2b>
-- Executing [s@streamdemo:2]
BackGround("Local/s@root-00000002;2", "menu") in new stack
-- <Local/s@root-00000002;2> Playing 'menu.alaw' (language 'en_GB')
-- Executing [s@streamdemo:3] WaitExten("Local/s@root-00000002;2",
"") in new stack
-- Executing [2@streamdemo:1] Dial("Local/s@root-00000002;2",
"Local/2@play-radio,,G(play-radio^2^2)") in new stack
-- Called Local/2@play-radio
-- Executing [2@play-radio:1]
Answer("Local/2@play-radio-00000003;2", "") in new stack
-- Local/2@play-radio-00000003;1 answered Local/s@root-00000002;2
-- Executing [2@play-radio:2]
MusicOnHold("Local/s@root-00000002;2", "streamdemo2") in new stack
-- Started music on hold, class 'streamdemo2', on channel
'Local/s@root-00000002;2'
-- Executing [2@play-radio:3] Set("Local/2@play-radio-00000003;1",
"CHANNEL(language)=en_GB") in new stack
-- Executing [2@play-radio:4]
BackGround("Local/2@play-radio-00000003;1", "menu") in new stack
-- Executing [2@play-radio:2]
MusicOnHold("Local/2@play-radio-00000003;2", "streamdemo2") in new
stack
-- Started music on hold, class 'streamdemo2', on channel
'Local/2@play-radio-00000003;2'
-- <Local/2@play-radio-00000003;1> Playing 'menu.alaw' (language 'en_GB')
-- Executing [2@play-radio:5]
WaitExten("Local/2@play-radio-00000003;1", "") in new stack
-- Timeout on Local/2@play-radio-00000003;1, going to 't'
-- Executing [t@play-radio:1]
Goto("Local/2@play-radio-00000003;1", "streamdemo,s,2") in new stack
-- Goto (streamdemo,s,2)
-- Executing [s@streamdemo:2]
BackGround("Local/2@play-radio-00000003;1", "menu") in new stack
-- <Local/2@play-radio-00000003;1> Playing 'menu.alaw' (language 'en_GB')
-- Executing [s@streamdemo:3]
WaitExten("Local/2@play-radio-00000003;1", "") in new stack
-- Timeout on Local/2@play-radio-00000003;1, continuing...
On 8 May 2016 at 14:56, Dovid Bender <dovid@telecurve.com> wrote:
Quote: | Michael,
What you do is you dial another context and then use the G option in the dial string. So something like this.
[radio-main]
Exten => s,1,answer
Exten => s,2,Background(play-menu)
Exten => s,3,waitexten
Exten => S,4,Goto(s,2)
Exten => 1,1,Dial(Local/CNN@play-radio)
Exten => 1,2,Goto(s,2)
Exten => 2,1,Dial(Local/NPR@play-radio)
Exten => 2,2,Goro(s,2)
[play-radio]
Exten => _[A-Z].,1,Answer
Exten => _[A-Z].,2,Musiconhold(${EXTEN})
Regards,
Dovid
-----Original Message-----
From: Jonathan H <lardconcepts@gmail.com>
Sender: asterisk-users-bounces@lists.digium.comDate: Sun, 8 May 2016 11:36:42
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users@lists.digium.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com>
Subject: [asterisk-users] Switching between Music on Hold streams. [13.8.2]
I'd like multiple people to be able to dial in and listen to various
live radio streams.
I was told that the correct resource-friendly way would be to setup a
MoH class, and then select that from the dialplan.
This works well, but how do I switch between streams?
Someone correct me if I'm wrong, but from previous similar questions a
few years ago it seems like once you've entered a MoH class, there is
no exit.
But might there be some trick involved merged or bridged calls, or
chan_spy or something, so that callers could quickly switch between 3
streams with a keypress?
Thank you!
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon May 09, 2016 8:59 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Jonathan H wrote:
Quote: | I'd like multiple people to be able to dial in and listen to various
live radio streams.
I was told that the correct resource-friendly way would be to setup a
MoH class, and then select that from the dialplan.
This works well, but how do I switch between streams?
Someone correct me if I'm wrong, but from previous similar questions a
few years ago it seems like once you've entered a MoH class, there is
no exit.
|
You can configure music classes with a DTMF digit that when pressed when
listening to music on hold will cause the channel to switch to the new
music class.
From the musiconhold.conf sample file:
;digit=# ; If this option is set for a class, then when callers ;
; are
; ; listening to music on hold, they can press this
; ; digit, and
; ; they will switch to listening to this music class.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
dovid at telecurve.com Guest
|
Posted: Mon May 09, 2016 9:25 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Sorry about that it's the g option:
g: Proceed with dialplan execution at the next priority in the current
extension if the destination channel hangs up.
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.
On Mon, May 9, 2016 at 9:50 AM, Jonathan H <lardconcepts@gmail.com (lardconcepts@gmail.com)> wrote:
Quote: | Hi there;
I didn't see any "G" option in the example above, and the usage for
the option parameters is entirely undocumented at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Dial
The G options are as below
G - If the call is answered, transfer the calling party to the
specified priority and the called party to the specified priority plus
one.
context
exten
priority
I think I have something almost there now, with the following:
[streamdemo]
exten => s,1,Answer
exten => s,2,BackGround(menu)
exten => s,3,WaitExten
exten => s,4,Goto(s,2)
exten => _[2,3,4,5],1,Dial(Local/${EXTEN}@play-radio,,G(play-radio^${EXTEN}^2))
exten => _[2,3,4,5],2,Goto(s,2)
[play-radio]
Exten => _[2,3,4,5],1,Answer
exten => _[2,3,4,5],2,MusicOnHold(${CALLERID(name)}${EXTEN})
exten => _[2,3,4,5],3,Set(CHANNEL(language)=en_GB)
exten => _[2,3,4,5],4,BackGround(menu)
exten => _[2,3,4,5],5,WaitExten
exten => _[X,t,i],1,Goto(streamdemo,s,2)
However, it's like the play-radio channel can't "hear" the dtmf.
Here's the output - once that MoH starts playing, no amount of button
pushing works. All I'm left with is a channel which isn't closed
properly when the phone is hung up.
By the way, it looks like that "G" option IS working because the MoH
starts, then the "called party" plays back an example piece of "menu"
audio while the MoH is playing, but seems to ignore the keypresses.
-- Executing [s@streamdemo:1] Answer("Local/s@root-00000002;2", "") in new stack
-- Local/s@root-00000002;1 answered PJSIP/voipfone-201-00000002
-- Channel Local/s@root-00000002;1 joined 'simple_bridge'
basic-bridge <3ac0c9be-2817-48e7-bcd8-4318eb1f9c2b>
-- Channel PJSIP/voipfone-201-00000002 joined 'simple_bridge'
basic-bridge <3ac0c9be-2817-48e7-bcd8-4318eb1f9c2b>
-- Executing [s@streamdemo:2]
BackGround("Local/s@root-00000002;2", "menu") in new stack
-- <Local/s@root-00000002;2> Playing 'menu.alaw' (language 'en_GB')
-- Executing [s@streamdemo:3] WaitExten("Local/s@root-00000002;2",
"") in new stack
-- Executing [2@streamdemo:1] Dial("Local/s@root-00000002;2",
"Local/2@play-radio,,G(play-radio^2^2)") in new stack
-- Called Local/2@play-radio
-- Executing [2@play-radio:1]
Answer("Local/2@play-radio-00000003;2", "") in new stack
-- Local/2@play-radio-00000003;1 answered Local/s@root-00000002;2
-- Executing [2@play-radio:2]
MusicOnHold("Local/s@root-00000002;2", "streamdemo2") in new stack
-- Started music on hold, class 'streamdemo2', on channel
'Local/s@root-00000002;2'
-- Executing [2@play-radio:3] Set("Local/2@play-radio-00000003;1",
"CHANNEL(language)=en_GB") in new stack
-- Executing [2@play-radio:4]
BackGround("Local/2@play-radio-00000003;1", "menu") in new stack
-- Executing [2@play-radio:2]
MusicOnHold("Local/2@play-radio-00000003;2", "streamdemo2") in new
stack
-- Started music on hold, class 'streamdemo2', on channel
'Local/2@play-radio-00000003;2'
-- <Local/2@play-radio-00000003;1> Playing 'menu.alaw' (language 'en_GB')
-- Executing [2@play-radio:5]
WaitExten("Local/2@play-radio-00000003;1", "") in new stack
-- Timeout on Local/2@play-radio-00000003;1, going to 't'
-- Executing [t@play-radio:1]
Goto("Local/2@play-radio-00000003;1", "streamdemo,s,2") in new stack
-- Goto (streamdemo,s,2)
-- Executing [s@streamdemo:2]
BackGround("Local/2@play-radio-00000003;1", "menu") in new stack
-- <Local/2@play-radio-00000003;1> Playing 'menu.alaw' (language 'en_GB')
-- Executing [s@streamdemo:3]
WaitExten("Local/2@play-radio-00000003;1", "") in new stack
-- Timeout on Local/2@play-radio-00000003;1, continuing...
On 8 May 2016 at 14:56, Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)> wrote:
Quote: | Michael,
What you do is you dial another context and then use the G option in the dial string. So something like this.
[radio-main]
Exten => s,1,answer
Exten => s,2,Background(play-menu)
Exten => s,3,waitexten
Exten => S,4,Goto(s,2)
Exten => 1,1,Dial(Local/CNN@play-radio)
Exten => 1,2,Goto(s,2)
Exten => 2,1,Dial(Local/NPR@play-radio)
Exten => 2,2,Goro(s,2)
[play-radio]
Exten => _[A-Z].,1,Answer
Exten => _[A-Z].,2,Musiconhold(${EXTEN})
Regards,
Dovid
-----Original Message-----
From: Jonathan H <lardconcepts@gmail.com (lardconcepts@gmail.com)>
Sender: asterisk-users-bounces@lists.digium.comDate: Sun, 8 May 2016 11:36:42
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: [asterisk-users] Switching between Music on Hold streams. [13.8.2]
I'd like multiple people to be able to dial in and listen to various
live radio streams.
I was told that the correct resource-friendly way would be to setup a
MoH class, and then select that from the dialplan.
This works well, but how do I switch between streams?
Someone correct me if I'm wrong, but from previous similar questions a
few years ago it seems like once you've entered a MoH class, there is
no exit.
But might there be some trick involved merged or bridged calls, or
chan_spy or something, so that callers could quickly switch between 3
streams with a keypress?
Thank you!
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
|
Back to top |
|
|
dovid at telecurve.com Guest
|
Posted: Mon May 09, 2016 9:26 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Josh,
As he is playing different streams I think he wants to give the users the option to select another stream.
On Mon, May 9, 2016 at 9:58 AM, Joshua Colp <jcolp@digium.com (jcolp@digium.com)> wrote:
Quote: | Jonathan H wrote:
Quote: | I'd like multiple people to be able to dial in and listen to various
live radio streams.
I was told that the correct resource-friendly way would be to setup a
MoH class, and then select that from the dialplan.
This works well, but how do I switch between streams?
Someone correct me if I'm wrong, but from previous similar questions a
few years ago it seems like once you've entered a MoH class, there is
no exit.
|
You can configure music classes with a DTMF digit that when pressed when listening to music on hold will cause the channel to switch to the new music class.
From the musiconhold.conf sample file:
;digit=# ; If this option is set for a class, then when callers ; ; are
; ; listening to music on hold, they can press this
; ; digit, and
; ; they will switch to listening to this music class.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon May 09, 2016 9:45 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Dovid Bender wrote:
Quote: | Josh,
As he is playing different streams I think he wants to give the users
the option to select another stream.
|
Each stream should be a separate music class, so switching between using
the DTMF feature would still work - unless I'm misunderstanding what is
trying to be achieved here.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
dovid at telecurve.com Guest
|
Posted: Mon May 09, 2016 9:50 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Josh,
He mentioned that he is building something for radio stations for people to listen into. They want to be able to select what they hear. I recently built a system where people could call and listen to rail road traffic. Using the g option in the dial string + # was the only way to let them select.
On Mon, May 9, 2016 at 10:45 AM, Joshua Colp <jcolp@digium.com (jcolp@digium.com)> wrote:
Quote: | Dovid Bender wrote:
Quote: | Josh,
As he is playing different streams I think he wants to give the users
the option to select another stream.
|
Each stream should be a separate music class, so switching between using the DTMF feature would still work - unless I'm misunderstanding what is trying to be achieved here.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon May 09, 2016 9:54 am Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Dovid Bender wrote:
Quote: | Josh,
He mentioned that he is building something for radio stations for people
to listen into. They want to be able to select what they hear. I
recently built a system where people could call and listen to rail road
traffic. Using the g option in the dial string + # was the only way to
let them select.
|
Right, and since the subject of this thread is "Music on Hold streams" I
assumed he was doing that through a music class for each stream.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
asterisk_list at earth... Guest
|
Posted: Mon May 09, 2016 12:01 pm Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
On Monday 09 May 2016, Jonathan H wrote:
Quote: | ..... {stuff deleted} .....
[streamdemo]
exten => s,1,Answer
exten => s,2,BackGround(menu)
exten => s,3,WaitExten
exten => s,4,Goto(s,2)
exten =>
_[2,3,4,5],1,Dial(Local/${EXTEN}@play-radio,,G(play-radio^${EXTEN}^2))
exten => _[2,3,4,5],2,Goto(s,2)
|
You have an error in your dialplan! The pattern _[2,3,4,5] will match any of
2, a comma, 3, a comma (again), 4, a comma or 5.
I think you might mean _[2345] which will match any of 2, 3, 4 or 5 (but
not a comma), and contains no tautologies.
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
lardconcepts at gmail.com Guest
|
Posted: Mon May 09, 2016 12:19 pm Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Thanks Joshua and everyone,
Joshua's solution seems a lot simpler and works well. Only one thing
now - The reason I named the classes as I did, was so that I could
select the class based on callerID plus extension.
Unless I've misread it, I'm limited to 9 switchable classes via the
"digit=#" option, is that correct?
Or is there a clever hack around this?
extensions.conf
[streamdemo]
exten => s,1,Answer
exten => s,2,BackGround(menu)
exten => s,3,WaitExten
exten => _[2,3,4,5],1,MusicOnHold(${CALLERID(name)}${EXTEN})
;exten => s,5,Goto(s,2)
exten => _[X,t,i],1,Goto(streamdemo,s,2)
and in musiconhold.conf (4 is commented out as it's AAC and I've not
figured that one out yet - bonus points to someone who can point the
way!)
[streamdemo2]
mode=custom
digit=2
application=/usr/bin/mpg123 -q -r 8000 -f 32768 --mono -s
http://185.14.85.162:8020
[streamdemo3]
mode=custom
digit=3
application=/usr/bin/mpg123 -q -r 8000 -f 32768 --mono -s
http://stream.acbradio.org:8000/mainstream.mp3
;[streamdemo4]
;mode=custom
;digit=4
;application=/usr/bin/mpg123 -q -r 8000 -f 32768 --mono -s
http://199.180.75.27:80/
;http://www.mushroomfm.com/media/listen.pls
[streamdemo5]
digit=5
mode=custom
application=/usr/bin/mpg123 -q -r 8000 -f 32768 --mono -s
http://206.225.87.121:8000/
On 9 May 2016 at 18:00, A J Stiles <asterisk_list@earthshod.co.uk> wrote:
Quote: | On Monday 09 May 2016, Jonathan H wrote:
Quote: | ..... {stuff deleted} .....
[streamdemo]
exten => s,1,Answer
exten => s,2,BackGround(menu)
exten => s,3,WaitExten
exten => s,4,Goto(s,2)
exten =>
_[2,3,4,5],1,Dial(Local/${EXTEN}@play-radio,,G(play-radio^${EXTEN}^2))
exten => _[2,3,4,5],2,Goto(s,2)
|
You have an error in your dialplan! The pattern _[2,3,4,5] will match any of
2, a comma, 3, a comma (again), 4, a comma or 5.
I think you might mean _[2345] which will match any of 2, 3, 4 or 5 (but
not a comma), and contains no tautologies.
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon May 09, 2016 12:23 pm Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Jonathan H wrote:
Quote: | Thanks Joshua and everyone,
Joshua's solution seems a lot simpler and works well. Only one thing
now - The reason I named the classes as I did, was so that I could
select the class based on callerID plus extension.
Unless I've misread it, I'm limited to 9 switchable classes via the
"digit=#" option, is that correct?
|
That's correct I'm afraid. If you need even more, then without modifying
the code that option won't work for you.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
lardconcepts at gmail.com Guest
|
Posted: Mon May 09, 2016 5:11 pm Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Thanks Joshua,
I realise mine is a bit of a niche case, so I certainly don't expect
to be catered for "out of the box" as it were, but is there some way
Dovid's solution could be wrangled into doing what I require then?
Dovid mentions this (lower case!) g option, but call me thick, but I'm
not sure how it's supposed to work. I'm not being lazy here, but I
really just can't figure it out!
I've tried a few other things, but it really doesn't seem like the
second channel can "hear" or respond to the DTMF tones.
It doesn't have to be an elegant solution, any fudge will do!
It did just occur to me that I could use this option I just noticed:
"H - Allow the calling party to hang up by sending the DTMF sequence
defined for disconnect in features.conf."
Will that hang up the whole call, or just the extension which was
dialled by the Dial(PJSIP/...) application? Does that make sense?
(It's getting late here!).
Thanks!
On 9 May 2016 at 18:22, Joshua Colp <jcolp@digium.com> wrote:
Quote: | Jonathan H wrote:
Quote: |
Thanks Joshua and everyone,
Joshua's solution seems a lot simpler and works well. Only one thing
now - The reason I named the classes as I did, was so that I could
select the class based on callerID plus extension.
Unless I've misread it, I'm limited to 9 switchable classes via the
"digit=#" option, is that correct?
|
That's correct I'm afraid. If you need even more, then without modifying the
code that option won't work for you.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon May 09, 2016 5:19 pm Post subject: [asterisk-users] Switching between Music on Hold streams. [1 |
|
|
Jonathan H wrote:
Quote: | Thanks Joshua,
I realise mine is a bit of a niche case, so I certainly don't expect
to be catered for "out of the box" as it were, but is there some way
Dovid's solution could be wrangled into doing what I require then?
Dovid mentions this (lower case!) g option, but call me thick, but I'm
not sure how it's supposed to work. I'm not being lazy here, but I
really just can't figure it out!
I've tried a few other things, but it really doesn't seem like the
second channel can "hear" or respond to the DTMF tones.
It doesn't have to be an elegant solution, any fudge will do!
It did just occur to me that I could use this option I just noticed:
"H - Allow the calling party to hang up by sending the DTMF sequence
defined for disconnect in features.conf."
Will that hang up the whole call, or just the extension which was
dialled by the Dial(PJSIP/...) application? Does that make sense?
(It's getting late here!).
|
You could try using H and g together as you've mentioned... I'm not sure
if it would actually hang up the calling party or not...
Otherwise I don't have any ideas, stuff wasn't written or designed for
this use case even when fudged together.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|