[asterisk-users] how to detect dtmf in meetme
Steve Edwards
asterisk.org at sedwards.com
Fri May 29 14:36:02 CDT 2009
Date: Fri, 29 May 2009 14:27:16 +0800
From: robert <aofeisheng at 163.com>
Date: Fri, 29 May 2009 14:28:43 +0800
From: robert <aofeisheng at 163.com>
Impatient?
On Fri, 29 May 2009, robert wrote:
> i want to kick participant in a meeting by pressing the digit on sip
> phone.when i entry the meeting ,no matter how i press the button,the
> dtmf does not work.
>
> here is my dialplan and my agi script,and sip.conf
> [from-internal]
[snip]
> exten =>121,4,MeetMe(900,MDbF)
Is your AGI named "conf-background.agi?" (Personally, I think setting
MEETME_AGI_BACKGROUND is a better idea.)
> #!/usr/bin/php -q
[snip]
> print "get_data('demo-welcome', 15, 5)\"\"\n";
This is not the proper format for an AGI request.
The request should look more like:
get data demo-congrats 15 5
> $agivars = (fgets(STDIN));
The response will look like:
200 result=1 (timeout)
or
200 result= (timeout)
or even
200 result=
It's a text string that you need to parse, not a single digit.
> print "MeetMeAdmin(900,k,$agivars)\"\"\n";
"Meetmeadmin" is not a AGI command and even if it was, the syntax is
wrong.
> print "set extension 121\"\"\n";
> print "set priority 5\"\"\n";
This violates the AGI protocol.
You will save yourself a lot of time and hair if you use an established
AGI library.
Keep in mind that when the AGI exits, you exit the meetme. Also, the "b"
option overrides the "p" and "X" options.
Another "gotcha" -- the "user" number you pass to meetmeadmin is not "the
nth user in the conference" its "the nth user who has joined the
conference."
Let's suppose you have a long running conference. You join and are user 1.
I join and am user 2. You leave and come back. You are now user 3. This
becomes more meaningful as hundreds of users join and leave the
conference. Thus, in a conference you could have users 1, 55, and 999.
I recently solved this for a client by writing an AGI that connected to
Asterisk via AMI to parse the output of "meetme list <conf-name>" so the
admin could mute/unmute/kill the users by index instead of user number.
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list