[Asterisk-Users] Re: Using manager interface to play aanouncmentsin aMeetMe

Tony Mountifield tony at softins.clara.co.uk
Mon Apr 11 11:52:28 MST 2005


[top-posting to continue the tradition here, and because there's so
much context below - sorry]

How about encoding the conference number in the extension dialled?
You can use whatever prefix you like. So something like this:

[mm-announce]
exten => _conf.,1,Answer
exten => _conf.,2,MeetMe(${EXTEN:4}|q)
exten => _conf.,3,Hangup

exten => endmsg,1,Answer
exten => endmsg,2,Playback(this-conf-will-end-in-5-minutes)
exten => endmsg,3,Hangup

Then you just do:

Action: Originate
Channel: Local/conf$CONFNUM at mm-announce
Context: mm-announce
Exten: endmsg
Priority: 1

You don't need any variables or DBputs then.

Cheers
Tony

In article <B0CF4196F21DC0448367514774331AB70A3B6A at scl-exch2k3.phoenix.com>,
Dan Austin <Dan_Austin at Phoenix.com> wrote:
> I found an almost two year old bug report about this.  It was
> closed saying it's not a bug.  The issue is that the target in
> the originate command is considered the secondary side of the
> call, and thus not privy to the variables.
> 
> As a work-around I have preceeded the originate command with
> a dbput and then a matching dbget in the dialplan.  This
> works.  At the moment I process the ongoing conferences 
> serially, so there is no (minimal) risk that the wrong
> conference will be used for the announcement.
> 
> Thanks again for the hints and help with this,
> Dan 
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of mattf
> Sent: Saturday, April 09, 2005 4:20 PM
> To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
> Subject: RE: [Asterisk-Users] Using manager interface to play
> aanouncmentsin aMeetMe
> 
> I've wondered about this as well. I suggest posting a bug to the bug
> tracker
> and see if you can get a clarification or better yet, get someone to fix
> this. It would be nice to override the clearing of the vars for Local
> channels.
> 
> MATT---
> 
> 
> -----Original Message-----
> From: Dan Austin [mailto:Dan_Austin at Phoenix.com]
> Sent: Friday, April 08, 2005 11:28 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: RE: [Asterisk-Users] Using manager interface to play
> aanouncmentsin aMeetMe
> 
> 
> A little more googling and wiki browsing shows that the default
> behaviour
> of the Local channel is to dump the variables.  According to the wiki I
> can append /n to the channel identifier to preserve variables, but this
> does
> not seem to be working.  I'm running 1.0.7.
> 
> Can anyone lend me a clue?
> 
> Thanks,
> Dan
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dan Austin
> Sent: Friday, April 08, 2005 3:13 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: RE: [Asterisk-Users] Using manager interface to play
> aanouncmentsin aMeetMe
> 
> I've run into a snag.  I make extensive use of dynamic conferences
> and thought it would be a no-brainer to pass the conference number
> with the manager interface.  Looking at the wiki and sample code,
> I thought I had it right, but no joy.
> 
> PHP manager call-
> $res = $as->connect();
> if (!$res){ echo 'Error connection to the manager!'; exit();}
> $res = $as->send_request('Originate', array('Channel' =>
> 'Local/9998 at mm-announce', 'Context' => 'mm-announce', 'Exten' => '9999',
> 'Priority' => '1', 'Variable' => 'confNo=$confNo'));
> $res = $as->disconnect();
> 
> extensions.conf-
>  
> [mm-announce]
> exten => 9998,1,Answer
> exten => 9998,2,noop,${confNo} ;to test, it was meetme(${confNo})
> exten => 9998,3,Hangup
> 
> exten => 9999,1,Answer
> exten => 9999,2,Playback(this-conf-will-end-in-5-minutes)
> exten => 9999,3,Hangup
> 
> Console output-
>   == Manager 'MeetMe' logged on from 127.0.0.1
>     -- Executing Answer("Local/9998 at mm-announce-6b36,2", "") in new
> stack
>     -- Executing NoOp("Local/9998 at mm-announce-6b36,2", "") in new stack
>     -- Executing Hangup("Local/9998 at mm-announce-6b36,2", "") in new
> stack
>     -- Executing Answer("Local/9998 at mm-announce-6b36,1", "") in new
> stack
>     -- Executing Playback("Local/9998 at mm-announce-6b36,1",
> "this-conf-will-end-in-5-minutes") in new stack
>     -- Playing 'this-conf-will-end-in-5-minutes' (language 'en')
>   == Manager 'MeetMe' logged off from 127.0.0.1
> 
> So it appears that my variable ${confNo} is not being set, or at least
> honored. 
> 
> Any thoughts?
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list