I have been reading all the docs about conferences I can find and am getting somewhat confused. What I am trying to do is set up a dialplan where I have subscribers with extensions in the 1xx range, and then to set an ability to have a series of conference rooms for each subscriber in the 21xx range where if the user enters is "own" conference he is the moderator, but if not he is just a normal user. I want to be able for the moderator to do things like mute or kick people. So dialplan would probably have something like this in it <extension name="user_conference"> <condition field="destination_number" expression="^(2${caller_id_number})$"> <action application="set" data="i_am_moderator=true"> <action application="answer"/> <action application="conference" data="$1@default+flags{moderator}"/> </condition> <condition field="destination_number" expression="^(21\d{2})^"> <action application="set" data="i_am_moderator=false"> <action application="answer"/> <action application="conference" data="$1@default"/> </condition> </extension> <extension name="kick"> <condition field="i_am_moderator" expression="true"> <action application="play_and_get_digits" data="3 3 3 7000 # /ask-for-extension.wav /invalid.wav conf-user-id \d+" > WHAT GOES HERE??? </condition> </extension> in the conference.conf.xml file, I would change the caller controls to include <caller-controls> <group name="somekeys"> <control action="transfer" digits="9" data="kick XML default"/> </group> </caller-controls> My question (at the moment) is In the WHAT GOES HERE place how do it Kick extension ${conf-user-id} (DOES IT REQUIRE A SCRIPT TO CALL THE Conference API?) Re-Enter the moderator back into the conference Re-Enter the ordinary user who happened to press 9 back into the conference I am assuming I can't stop the non moderator getting the control - since all users get the same controls. -- Alan Chandler http://www.chandlerfamily.org.uk
You've thought through some of the difficult points, which is good. You're right that the moderator can't have different controls (unless you're controlling the conference yourself from outside, using, say, the event socket). Before I go further, I want to make sure I understand what you're proposing. What you're essentially saying is that when the command to kick someone is pressed the person should be transferred out of the conference, checked for moderator status, asked whom to kick (if so), and then let back in while the system kicks that person. The other commands would work similarly. Does this sound like a correct summary? If so, I think what you've got is mostly right, but I'm not sure it will work, having not tried to do it that way myself (I went the event socket route). In theory, it should look something like this: In the scripts entering the conference, you'll need to save the current conference number. Something like (in both cases): <action application="set" data="conf-id=$1"/> "Extension" doesn't actually check for anything, so you'll need to check for "kick" with a condition. Try this: <extension name="kick"> <condition field="destination_number" expression="^kick$"/> <condition field="$(i_am_moderator)" expression="true"> <action application="play_and_get_digits" data="3 3 3 7000 # /ask-for-extension.wav /invalid.wav conf-user-id \d+" > Followed by (I picked up the "kick" syntax from the wiki): <action application="conference" data="$(conf-id) kick $(conf-user-id)"/> <action application="conference" data="$(conf-id)@default+flags{mod}"/> <anti-action application="conference" data="$(conf-id)@default"/> </condition> </extension> In theory, then, you've transferred out with the "9" key, you check the moderator flag you've made, and do stuff based on the conf-id and the data you enter. Obviously, if this works, the moderator won't be able to hear what's going on in the conference while he's entering stuff. Bigger problem: the conf-user-id he enters has to be the member ID that FS chose for the user he's trying to kick. That number will make sense if you're following the system closely, but for someone who doesn't know FS internals, it will be impossible to know unless you broadcast it to him somehow. To my knowledge, there's no way to use any other identifier (like caller-id) to kick them with. BB On Wed, Aug 12, 2009 at 10:56 AM, Alan Chandler <alan@chandlerfamily.org.uk>wrote:
I have been reading all the docs about conferences I can find and am getting somewhat confused. What I am trying to do is set up a dialplan where I have subscribers with extensions in the 1xx range, and then to set an ability to have a series of conference rooms for each subscriber in the 21xx range where if the user enters is "own" conference he is the moderator, but if not he is just a normal user.
I want to be able for the moderator to do things like mute or kick people.
So dialplan would probably have something like this in it
<extension name="user_conference"> <condition field="destination_number" expression="^(2${caller_id_number})$"> <action application="set" data="i_am_moderator=true"> <action application="answer"/> <action application="conference" data="$1@default +flags{moderator}"/> </condition> <condition field="destination_number" expression="^(21\d{2})^"> <action application="set" data="i_am_moderator=false"> <action application="answer"/> <action application="conference" data="$1@default"/> </condition> </extension> <extension name="kick"> <condition field="i_am_moderator" expression="true"> <action application="play_and_get_digits" data="3 3 3 7000 # /ask-for-extension.wav /invalid.wav conf-user-id \d+" >
WHAT GOES HERE???
</condition> </extension>
in the conference.conf.xml file, I would change the caller controls to include
<caller-controls> <group name="somekeys"> <control action="transfer" digits="9" data="kick XML default"/> </group> </caller-controls>
My question (at the moment) is
In the WHAT GOES HERE place how do it
Kick extension ${conf-user-id} (DOES IT REQUIRE A SCRIPT TO CALL THE Conference API?) Re-Enter the moderator back into the conference Re-Enter the ordinary user who happened to press 9 back into the conference
I am assuming I can't stop the non moderator getting the control - since all users get the same controls.
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Whoops. All of my parens () should be curly braces {}. Wasn't paying attention. BB On Wed, Aug 12, 2009 at 2:40 PM, Bradley Brashier <bjbrashier@gmail.com>wrote:
You've thought through some of the difficult points, which is good. You're right that the moderator can't have different controls (unless you're controlling the conference yourself from outside, using, say, the event socket).
Before I go further, I want to make sure I understand what you're proposing. What you're essentially saying is that when the command to kick someone is pressed the person should be transferred out of the conference, checked for moderator status, asked whom to kick (if so), and then let back in while the system kicks that person. The other commands would work similarly. Does this sound like a correct summary?
If so, I think what you've got is mostly right, but I'm not sure it will work, having not tried to do it that way myself (I went the event socket route). In theory, it should look something like this:
In the scripts entering the conference, you'll need to save the current conference number. Something like (in both cases):
<action application="set" data="conf-id=$1"/>
"Extension" doesn't actually check for anything, so you'll need to check for "kick" with a condition. Try this:
<extension name="kick"> <condition field="destination_number" expression="^kick$"/> <condition field="$(i_am_moderator)" expression="true"> <action application="play_and_get_digits" data="3 3 3 7000 # /ask-for-extension.wav /invalid.wav conf-user-id \d+" >
Followed by (I picked up the "kick" syntax from the wiki):
<action application="conference" data="$(conf-id) kick $(conf-user-id)"/> <action application="conference" data="$(conf-id)@default+flags{mod}"/> <anti-action application="conference" data="$(conf-id)@default"/> </condition> </extension>
In theory, then, you've transferred out with the "9" key, you check the moderator flag you've made, and do stuff based on the conf-id and the data you enter. Obviously, if this works, the moderator won't be able to hear what's going on in the conference while he's entering stuff.
Bigger problem: the conf-user-id he enters has to be the member ID that FS chose for the user he's trying to kick. That number will make sense if you're following the system closely, but for someone who doesn't know FS internals, it will be impossible to know unless you broadcast it to him somehow. To my knowledge, there's no way to use any other identifier (like caller-id) to kick them with.
BB
On Wed, Aug 12, 2009 at 10:56 AM, Alan Chandler < alan@chandlerfamily.org.uk> wrote:
I have been reading all the docs about conferences I can find and am getting somewhat confused. What I am trying to do is set up a dialplan where I have subscribers with extensions in the 1xx range, and then to set an ability to have a series of conference rooms for each subscriber in the 21xx range where if the user enters is "own" conference he is the moderator, but if not he is just a normal user.
I want to be able for the moderator to do things like mute or kick people.
So dialplan would probably have something like this in it
<extension name="user_conference"> <condition field="destination_number" expression="^(2${caller_id_number})$"> <action application="set" data="i_am_moderator=true"> <action application="answer"/> <action application="conference" data="$1@default +flags{moderator}"/> </condition> <condition field="destination_number" expression="^(21\d{2})^"> <action application="set" data="i_am_moderator=false"> <action application="answer"/> <action application="conference" data="$1@default"/> </condition> </extension> <extension name="kick"> <condition field="i_am_moderator" expression="true"> <action application="play_and_get_digits" data="3 3 3 7000 # /ask-for-extension.wav /invalid.wav conf-user-id \d+" >
WHAT GOES HERE???
</condition> </extension>
in the conference.conf.xml file, I would change the caller controls to include
<caller-controls> <group name="somekeys"> <control action="transfer" digits="9" data="kick XML default"/> </group> </caller-controls>
My question (at the moment) is
In the WHAT GOES HERE place how do it
Kick extension ${conf-user-id} (DOES IT REQUIRE A SCRIPT TO CALL THE Conference API?) Re-Enter the moderator back into the conference Re-Enter the ordinary user who happened to press 9 back into the conference
I am assuming I can't stop the non moderator getting the control - since all users get the same controls.
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Bradley Brashier wrote: ...
Before I go further, I want to make sure I understand what you're proposing. What you're essentially saying is that when the command to kick someone is pressed the person should be transferred out of the conference, checked for moderator status, asked whom to kick (if so), and then let back in while the system kicks that person. The other commands would work similarly. Does this sound like a correct summary?
Absolutely what I am trying to do. ...
Followed by (I picked up the "kick" syntax from the wiki):
<action application="conference" data="$(conf-id) kick $(conf-user-id)"/>
This is a significant new fact for me. What you seem to be doing is calling the commands referenced in the conference api here http://wiki.freeswitch.org/wiki/Mod_conference#API_Reference by using application="conference" and then the data string as the second part of the command. Am I correct in the assumption that you can do this.
Bigger problem: the conf-user-id he enters has to be the member ID that FS chose for the user he's trying to kick. That number will make sense if you're following the system closely, but for someone who doesn't know FS internals, it will be impossible to know unless you broadcast it to him somehow. To my knowledge, there's no way to use any other identifier (like caller-id) to kick them with.
If my assumption about the use of the API above is correct, then couldn't I do something like <action application="set" data="member-list=${conference(${conf-id} list)}"/> <action application="execute_extension" data="do-kick"/> and the figure out a regular expression to get participant-id and caller-id out of the resultant string. Or is this not how its done? -- Alan Chandler http://www.chandlerfamily.org.uk
This is a significant new fact for me. What you seem to be doing is calling the commands referenced in the conference api here
http://wiki.freeswitch.org/wiki/Mod_conference#API_Reference
by using application="conference" and then the data string as the second part of the command. Am I correct in the assumption that you can do this.
I agree that that's what it looks like. What I don't know is if it works. I got this example from the page http://wiki.freeswitch.org/wiki/Conferencing_and_Intercom. I never did exactly what you're trying, and never tried using the API in this fashion.
<action application="set" data="member-list=${conference(${conf-id} list)}"/> <action application="execute_extension" data="do-kick"/> and the figure out a regular expression to get participant-id and caller-id out of the resultant string.
Or is this not how its done?
Even assuming that our understanding on the kick command is correct, and there's an accessible API here, I don't believe the above would actually populate your variable with the data that you want. I don't think it actually issues the command with the "set" application. Instead, you'd need to do something like <action application="conference" data="${conf-id} list"/> and then you'd have to capture the output somehow, which I also don't believe is possible. I'm hardly a master of XML, though, or of dialplans, so feel free to try it if you want. Just make sure you're logging everything so you can watch it all unfold. BB On Wed, Aug 12, 2009 at 3:33 PM, Alan Chandler <alan@chandlerfamily.org.uk>wrote:
Bradley Brashier wrote: ...
Before I go further, I want to make sure I understand what you're proposing. What you're essentially saying is that when the command to kick someone is pressed the person should be transferred out of the conference, checked for moderator status, asked whom to kick (if so), and then let back in while the system kicks that person. The other commands would work similarly. Does this sound like a correct summary?
Absolutely what I am trying to do.
...
Followed by (I picked up the "kick" syntax from the wiki):
<action application="conference" data="$(conf-id) kick $(conf-user-id)"/>
This is a significant new fact for me. What you seem to be doing is calling the commands referenced in the conference api here
http://wiki.freeswitch.org/wiki/Mod_conference#API_Reference
by using application="conference" and then the data string as the second part of the command. Am I correct in the assumption that you can do this.
Bigger problem: the conf-user-id he enters has to be the member ID that FS chose for the user he's trying to kick. That number will make sense if you're following the system closely, but for someone who doesn't know FS internals, it will be impossible to know unless you broadcast it to him somehow. To my knowledge, there's no way to use any other identifier (like caller-id) to kick them with.
If my assumption about the use of the API above is correct, then couldn't I do something like
<action application="set" data="member-list=${conference(${conf-id} list)}"/> <action application="execute_extension" data="do-kick"/> and the figure out a regular expression to get participant-id and caller-id out of the resultant string.
Or is this not how its done?
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Bradley Brashier wrote:
I wrote:
This is a significant new fact for me. What you seem to be doing is calling the commands referenced in the conference api here
http://wiki.freeswitch.org/wiki/Mod_conference#API_Reference
by using application="conference" and then the data string as the second part of the command. Am I correct in the assumption that you can do this.
I agree that that's what it looks like. What I don't know is if it works. I got this example from the page http://wiki.freeswitch.org/wiki/Conferencing_and_Intercom. I never did exactly what you're trying, and never tried using the API in this fashion.
I just found this - which I think helps http://wiki.freeswitch.org/wiki/Mod_commands#From_the_Dialplan An API can be called from the dialplan but it is not recommended. Example: <extension name="Make API call from Dialplan"> <condition field="destination_number" expression="^(999)$"> <!-- next line calls hupall, so be careful! --> <action application="set" data="api_result=${hupall(normal_clearing)}"/> </condition> </extension> Anyway - thanks for you help - I am going away to rethink that particular interface again. Its getting so complicated that it might be better to copy the Javascript approach in the examples. -- Alan Chandler http://www.chandlerfamily.org.uk
So it sounds like "set" can work. But you'd still have to parse it. And even then it's not recommended. I have another couple of possible methods for you: 1) modification of mod_conference. 2) event socket. If you modify mod_conference, you can probably do what you want, but it obviously requires using C and modifying existing code. If you use the event socket, you've got a bigger learning curve, perhaps, but you can use a variety of languages, your code is separate (and therefore easier to maintain), and you then know how the event socket works in case you need to do something else later. Good luck with whatever you end up doing. BB On Thu, Aug 13, 2009 at 12:11 AM, Alan Chandler <alan@chandlerfamily.org.uk>wrote:
Bradley Brashier wrote:
I wrote:
This is a significant new fact for me. What you seem to be doing is calling the commands referenced in the conference api here
http://wiki.freeswitch.org/wiki/Mod_conference#API_Reference
by using application="conference" and then the data string as the second part of the command. Am I correct in the assumption that you can do this.
I agree that that's what it looks like. What I don't know is if it works. I got this example from the page http://wiki.freeswitch.org/wiki/Conferencing_and_Intercom. I never did exactly what you're trying, and never tried using the API in this fashion.
I just found this - which I think helps
http://wiki.freeswitch.org/wiki/Mod_commands#From_the_Dialplan
An API can be called from the dialplan but it is not recommended. Example:
<extension name="Make API call from Dialplan"> <condition field="destination_number" expression="^(999)$"> <!-- next line calls hupall, so be careful! --> <action application="set" data="api_result=${hupall(normal_clearing)}"/> </condition> </extension>
Anyway - thanks for you help - I am going away to rethink that particular interface again. Its getting so complicated that it might be better to copy the Javascript approach in the examples.
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I couldn't imagine managing a conference without a GUI. I need to see who is making noise so I can boot/mute em ;) If I were you I would dive into ESL and make a simple web app to frontend the conferences. There will surely be something in contrib to get you started. On Thu, Aug 13, 2009 at 8:48 AM, Bradley Brashier <bjbrashier@gmail.com>wrote:
So it sounds like "set" can work. But you'd still have to parse it. And even then it's not recommended.
I have another couple of possible methods for you: 1) modification of mod_conference. 2) event socket.
If you modify mod_conference, you can probably do what you want, but it obviously requires using C and modifying existing code.
If you use the event socket, you've got a bigger learning curve, perhaps, but you can use a variety of languages, your code is separate (and therefore easier to maintain), and you then know how the event socket works in case you need to do something else later. Good luck with whatever you end up doing.
BB On Thu, Aug 13, 2009 at 12:11 AM, Alan Chandler < alan@chandlerfamily.org.uk> wrote:
Bradley Brashier wrote:
I wrote:
This is a significant new fact for me. What you seem to be doing is calling the commands referenced in the conference api here
http://wiki.freeswitch.org/wiki/Mod_conference#API_Reference
by using application="conference" and then the data string as the second part of the command. Am I correct in the assumption that you can do this.
I agree that that's what it looks like. What I don't know is if it works. I got this example from the page http://wiki.freeswitch.org/wiki/Conferencing_and_Intercom. I never did exactly what you're trying, and never tried using the API in this fashion.
I just found this - which I think helps
http://wiki.freeswitch.org/wiki/Mod_commands#From_the_Dialplan
An API can be called from the dialplan but it is not recommended. Example:
<extension name="Make API call from Dialplan"> <condition field="destination_number" expression="^(999)$"> <!-- next line calls hupall, so be careful! --> <action application="set" data="api_result=${hupall(normal_clearing)}"/> </condition> </extension>
Anyway - thanks for you help - I am going away to rethink that particular interface again. Its getting so complicated that it might be better to copy the Javascript approach in the examples.
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Alan Chandler
-
Bradley Brashier
-
Chris Burns