dialplan to share skype instances
Hi, Currently I am assigning one instance to each extension like below: <extension name="us.skypeout"> <condition field="username" expression="^10(\d{2})$"> <action application="set" data="skype_instance=$1"/> </condition> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface${skype_instance}/$ </condition> </extension> Are there any other ways like to get unused instances from a pool? I guess it could be something like condition instance1 available? bridge instance1 condition instance2 available? bridge instance2 ... then there could be much more extensions to share skype out. Could anyone help? Thanks! Jian
Same question for the incoming google voice, the wiki shows how to forward to a certain extension. Is there anyway to forward to any available extension? Like if 1001 is on the phone, forward to 1002. Thanks! Jian On Tue, Nov 16, 2010 at 1:37 PM, Jian Ren <renjian@gmail.com> wrote:
Hi, Currently I am assigning one instance to each extension like below:
<extension name="us.skypeout"> <condition field="username" expression="^10(\d{2})$"> <action application="set" data="skype_instance=$1"/> </condition> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface${skype_instance}/$ </condition> </extension>
Are there any other ways like to get unused instances from a pool? I guess it could be something like
condition instance1 available? bridge instance1 condition instance2 available? bridge instance2 ...
then there could be much more extensions to share skype out.
Could anyone help?
Thanks! Jian
Just curious - why do you need to break them up like this? Do you specifically need one extension per instance? If so, why? -MC On Tue, Nov 16, 2010 at 10:37 AM, Jian Ren <renjian@gmail.com> wrote:
Hi, Currently I am assigning one instance to each extension like below:
<extension name="us.skypeout"> <condition field="username" expression="^10(\d{2})$"> <action application="set" data="skype_instance=$1"/> </condition> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface${skype_instance}/$ </condition> </extension>
Are there any other ways like to get unused instances from a pool? I guess it could be something like
condition instance1 available? bridge instance1 condition instance2 available? bridge instance2 ...
then there could be much more extensions to share skype out.
Could anyone help?
Thanks! Jian
_______________________________________________ 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
No, I don't. That's why I am asking here for a better solution. Thanks! Jian On Wed, Nov 17, 2010 at 5:37 PM, Michael Collins <msc@freeswitch.org> wrote:
Just curious - why do you need to break them up like this? Do you specifically need one extension per instance? If so, why?
-MC
On Tue, Nov 16, 2010 at 10:37 AM, Jian Ren <renjian@gmail.com> wrote:
Hi, Currently I am assigning one instance to each extension like below:
<extension name="us.skypeout"> <condition field="username" expression="^10(\d{2})$"> <action application="set" data="skype_instance=$1"/> </condition> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface${skype_instance}/$ </condition> </extension>
Are there any other ways like to get unused instances from a pool? I guess it could be something like
condition instance1 available? bridge instance1 condition instance2 available? bridge instance2 ...
then there could be much more extensions to share skype out.
Could anyone help?
Thanks! Jian
_______________________________________________ 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
I changed to use pipe in the bridge(saw the wiki link in another post), something like below: <extension name="us.skypeout"> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface00/+$1|skypopen/interface01/+$1|skypopen/interface02/+$1|skypopen/interface03/+$1"/> </condition> </extension> Seems to work, is this the correct way? Thanks! On Thu, Nov 18, 2010 at 7:32 PM, Jian Ren <renjian@gmail.com> wrote:
No, I don't. That's why I am asking here for a better solution. Thanks! Jian
On Wed, Nov 17, 2010 at 5:37 PM, Michael Collins <msc@freeswitch.org>wrote:
Just curious - why do you need to break them up like this? Do you specifically need one extension per instance? If so, why?
-MC
On Tue, Nov 16, 2010 at 10:37 AM, Jian Ren <renjian@gmail.com> wrote:
Hi, Currently I am assigning one instance to each extension like below:
<extension name="us.skypeout"> <condition field="username" expression="^10(\d{2})$"> <action application="set" data="skype_instance=$1"/> </condition> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface${skype_instance}/$ </condition> </extension>
Are there any other ways like to get unused instances from a pool? I guess it could be something like
condition instance1 available? bridge instance1 condition instance2 available? bridge instance2 ...
then there could be much more extensions to share skype out.
Could anyone help?
Thanks! Jian
_______________________________________________ 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
Yeah, this is a simple and elegant way to do it. -MC On Thu, Nov 18, 2010 at 6:21 PM, Jian Ren <renjian@gmail.com> wrote:
I changed to use pipe in the bridge(saw the wiki link in another post), something like below:
<extension name="us.skypeout"> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface00/+$1|skypopen/interface01/+$1|skypopen/interface02/+$1|skypopen/interface03/+$1"/> </condition> </extension>
Seems to work, is this the correct way? Thanks!
On Thu, Nov 18, 2010 at 7:32 PM, Jian Ren <renjian@gmail.com> wrote:
No, I don't. That's why I am asking here for a better solution. Thanks! Jian
On Wed, Nov 17, 2010 at 5:37 PM, Michael Collins <msc@freeswitch.org>wrote:
Just curious - why do you need to break them up like this? Do you specifically need one extension per instance? If so, why?
-MC
On Tue, Nov 16, 2010 at 10:37 AM, Jian Ren <renjian@gmail.com> wrote:
Hi, Currently I am assigning one instance to each extension like below:
<extension name="us.skypeout"> <condition field="username" expression="^10(\d{2})$"> <action application="set" data="skype_instance=$1"/> </condition> <condition field="destination_number" expression="^(\d{11})$"> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="skypopen/interface${skype_instance}/$ </condition> </extension>
Are there any other ways like to get unused instances from a pool? I guess it could be something like
condition instance1 available? bridge instance1 condition instance2 available? bridge instance2 ...
then there could be much more extensions to share skype out.
Could anyone help?
Thanks! Jian
_______________________________________________ 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
_______________________________________________ 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 (2)
-
Jian Ren
-
Michael Collins