Missing event for "180 Ringing"?
Hi, for us it seems as if there is an event missing for 180 Ringing. Is there a way to receive/activate this event? We are using ESL and are getting nearly all events we need. For "183 Session Progress SDP" we get "channel_progress_media" and for "200 OK SDP" we get "channel_answer". So we only need one more event... Thanks for your help Dennis
On Tue, Jun 5, 2012 at 7:17 AM, Dennis <odermann@googlemail.com> wrote:
for us it seems as if there is an event missing for 180 Ringing. Is there a way to receive/activate this event?
We are using ESL and are getting nearly all events we need. For "183 Session Progress SDP" we get "channel_progress_media" and for "200 OK SDP" we get "channel_answer". So we only need one more event...
How are you registering for events? I'm assuming you're registering for all of them. There *might* be a reason that it doesn't fire an event for ringing. I can't think of one, but that doesn't mean anything :) I'd check out the code and make sure it's not there and then open a ticket. http://jira.freeswitch.org/ Good luck, Gabe
yes, we register for all events... it's in jira now, thanks for the hint to open a bug there. kind regards dennis
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on. I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format. For example, I have a requirement that might be expressed like this: <context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10"/> } </extension> </context> What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this? I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits. Alex
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on. <action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition> The above gives "TestVarsA and B are both empty" which I don't understand! I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format. For example, I have a requirement that might be expressed like this: <context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10"/> } </extension> </context> What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this? I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits. Alex
hello alex, you must set testvarA and testvarB as inline check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions huseyin On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com> wrote:
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge"
data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$ 1@193.105.54.10"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Mmm. Strangely enough, I stumbled on that just after posting, but it still doesn't work <action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition> Result: "TestVarsA and B are both empty"
hello alex,
you must set testvarA and testvarB as inline
check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions
huseyin
On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com <mailto:alex@thewinelake.com>> wrote:
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10 <mailto:1@193.105.54.10>"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
OK... I think there's a fundamental misunderstanding about what code actually gets executed. The setting never happened in my example. If I change it to: <condition field="${ani}" expression="^(\d+)$" break="never" > <action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> </condition> <condition field="${testvarA}" expression="^$" break="never" /> <condition field="${testvarB}" expression="^$" break="never"> <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition> Then it works. (Comparing ani to any number of digits). What I really want is something like <condition expression="true">
Mmm. Strangely enough, I stumbled on that just after posting, but it still doesn't work
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Result: "TestVarsA and B are both empty"
hello alex,
you must set testvarA and testvarB as inline
check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions
huseyin
On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com <mailto:alex@thewinelake.com>> wrote:
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10 <mailto:1@193.105.54.10>"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
yes action statements must be inside condition tags. i thought you wrote them in condition in your first mail.. for the expression=true ; i not sure you can do that but there is an example usage together with regex in the wiki. again check the link i sent before.. huseyin On Wed, Jun 13, 2012 at 2:00 PM, Alex <alex@thewinelake.com> wrote:
OK... I think there's a fundamental misunderstanding about what code actually gets executed.
The setting never happened in my example. If I change it to:
<condition field="${ani}" expression="^(\d+)$" break="never" >
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> </condition> <condition field="${testvarA}" expression="^$" break="never" /> <condition field="${testvarB}" expression="^$" break="never">
<action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Then it works. (Comparing ani to any number of digits). What I really want is something like <condition expression="true">
Mmm. Strangely enough, I stumbled on that just after posting, but it still doesn't work
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Result: "TestVarsA and B are both empty"
hello alex,
you must set testvarA and testvarB as inline
check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions
huseyin
On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com> wrote:
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge"
data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$ 1@193.105.54.10"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 checked it myself again and i find the following example in the wiki... <extension name="9191"> <condition field="destination_number" expression="^9191$"/> <condition field="${sip_authorized}" expression="true"> <anti-action application="reject" data="407"/> </condition> <condition> <action application="playback" data="/tmp/itworked.wav"/> </condition> </extension> i hope this helps.. On Wed, Jun 13, 2012 at 2:31 PM, huseyin kalyoncu <hkalyoncu@gmail.com>wrote:
yes action statements must be inside condition tags. i thought you wrote them in condition in your first mail..
for the expression=true ; i not sure you can do that but there is an example usage together with regex in the wiki. again check the link i sent before..
huseyin
On Wed, Jun 13, 2012 at 2:00 PM, Alex <alex@thewinelake.com> wrote:
OK... I think there's a fundamental misunderstanding about what code actually gets executed.
The setting never happened in my example. If I change it to:
<condition field="${ani}" expression="^(\d+)$" break="never" >
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> </condition> <condition field="${testvarA}" expression="^$" break="never" /> <condition field="${testvarB}" expression="^$" break="never">
<action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Then it works. (Comparing ani to any number of digits). What I really want is something like <condition expression="true">
Mmm. Strangely enough, I stumbled on that just after posting, but it still doesn't work
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Result: "TestVarsA and B are both empty"
hello alex,
you must set testvarA and testvarB as inline
check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions
huseyin
On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com> wrote:
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge"
data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$ 1@193.105.54.10"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Ah so <condition> </condition> is essentially an "unconditional condition" ;-) That is useful...
i checked it myself again and i find the following example in the wiki...
<extension name="9191"> <condition field="destination_number" expression="^9191$"/> <condition field="${sip_authorized}" expression="true"> <anti-action application="reject" data="407"/> </condition>
<condition> <action application="playback" data="/tmp/itworked.wav"/> </condition> </extension> i hope this helps..
On Wed, Jun 13, 2012 at 2:31 PM, huseyin kalyoncu <hkalyoncu@gmail.com <mailto:hkalyoncu@gmail.com>> wrote:
yes action statements must be inside condition tags. i thought you wrote them in condition in your first mail..
for the expression=true ; i not sure you can do that but there is an example usage together with regex in the wiki. again check the link i sent before..
huseyin
On Wed, Jun 13, 2012 at 2:00 PM, Alex <alex@thewinelake.com <mailto:alex@thewinelake.com>> wrote:
OK... I think there's a fundamental misunderstanding about what code actually gets executed.
The setting never happened in my example. If I change it to:
<condition field="${ani}" expression="^(\d+)$" break="never" >
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> </condition> <condition field="${testvarA}" expression="^$" break="never" /> <condition field="${testvarB}" expression="^$" break="never">
<action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Then it works. (Comparing ani to any number of digits). What I really want is something like <condition expression="true">
Mmm. Strangely enough, I stumbled on that just after posting, but it still doesn't work
<action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
Result: "TestVarsA and B are both empty"
hello alex,
you must set testvarA and testvarB as inline
check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions
huseyin
On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com <mailto:alex@thewinelake.com>> wrote:
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10 <mailto:1@193.105.54.10>"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
Is there anything I should know about the combination of these two? Alex
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global <> to make that happen. I don't think we have a wiki page purely on building bridge strings yet... -Avi Marcus On Wed, Jun 13, 2012 at 4:30 PM, Alex <alex@thewinelake.com> wrote:
Is there anything I should know about the combination of these two?
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything!
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global<> to make that happen.
I don't think we have a wiki page purely on building bridge strings yet...
-Avi Marcus
On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote:
Is there anything I should know about the combination of these two?
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
bridge seems to be fairly manual for assembling complicated bridge strings. I think export works to all threads, but afaik, is deprecated. I've used group_confirm on these threads, it's fine. Just make sure the group_confirm variable is in the right place... -Avi On Wed, Jun 13, 2012 at 7:53 PM, Alex <alex@thewinelake.com> wrote:
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything!
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global<> to make that happen.
I don't think we have a wiki page purely on building bridge strings yet...
-Avi Marcus
On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote:
Is there anything I should know about the combination of these two?
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
export is deprecated? How is one supposed to do it instead? Maybe I need to get some examples... On 13 Jun 2012, at 18:34, Avi Marcus wrote:
bridge seems to be fairly manual for assembling complicated bridge strings.
I think export works to all threads, but afaik, is deprecated.
I've used group_confirm on these threads, it's fine. Just make sure the group_confirm variable is in the right place...
-Avi
On Wed, Jun 13, 2012 at 7:53 PM, Alex <alex@thewinelake.com> wrote:
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything!
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global<> to make that happen.
I don't think we have a wiki page purely on building bridge strings yet...
-Avi Marcus
On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote:
Is there anything I should know about the combination of these two?
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Like you've been doing, mostly: setting them inside the bridge string. -Avi On Wed, Jun 13, 2012 at 11:52 PM, Alexander Lake <alex@thewinelake.com> wrote:
export is deprecated? How is one supposed to do it instead? Maybe I need to get some examples...
On 13 Jun 2012, at 18:34, Avi Marcus wrote:
bridge seems to be fairly manual for assembling complicated bridge strings.
I think export works to all threads, but afaik, is deprecated.
I've used group_confirm on these threads, it's fine. Just make sure the group_confirm variable is in the right place...
-Avi
On Wed, Jun 13, 2012 at 7:53 PM, Alex <alex@thewinelake.com> wrote:
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything!
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global<> to make that happen.
I don't think we have a wiki page purely on building bridge strings yet...
-Avi Marcus
On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote:
Is there anything I should know about the combination of these two?
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Ah. Is there a way to set common variables for the bridges? On 13 Jun 2012, at 21:55, Avi Marcus wrote:
Like you've been doing, mostly: setting them inside the bridge string.
-Avi
On Wed, Jun 13, 2012 at 11:52 PM, Alexander Lake <alex@thewinelake.com> wrote:
export is deprecated? How is one supposed to do it instead? Maybe I need to get some examples...
On 13 Jun 2012, at 18:34, Avi Marcus wrote:
bridge seems to be fairly manual for assembling complicated bridge strings.
I think export works to all threads, but afaik, is deprecated.
I've used group_confirm on these threads, it's fine. Just make sure the group_confirm variable is in the right place...
-Avi
On Wed, Jun 13, 2012 at 7:53 PM, Alex <alex@thewinelake.com> wrote:
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything!
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global<> to make that happen.
I don't think we have a wiki page purely on building bridge strings yet...
-Avi Marcus
On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote:
Is there anything I should know about the combination of these two?
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
[var1=myinfo] is per each bridge string. {var1=myinfo} applies to the entire thread, meaning if you have a :_: it won't carry over to that. <var1=myinfo> is a superglobal which is applied to ALL threads. -Avi On Thu, Jun 14, 2012 at 12:04 AM, Alexander Lake <alex@thewinelake.com> wrote:
Ah. Is there a way to set common variables for the bridges?
On 13 Jun 2012, at 21:55, Avi Marcus wrote:
Like you've been doing, mostly: setting them inside the bridge string.
-Avi
On Wed, Jun 13, 2012 at 11:52 PM, Alexander Lake <alex@thewinelake.com> wrote:
export is deprecated? How is one supposed to do it instead? Maybe I need to get some examples...
On 13 Jun 2012, at 18:34, Avi Marcus wrote:
bridge seems to be fairly manual for assembling complicated bridge strings.
I think export works to all threads, but afaik, is deprecated.
I've used group_confirm on these threads, it's fine. Just make sure the group_confirm variable is in the right place...
-Avi
On Wed, Jun 13, 2012 at 7:53 PM, Alex <alex@thewinelake.com> wrote:
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything!
Hmm. re: enterprise originate remember that each is a separate thread, so {} vars in one thread won't work on the other. You need to do super-global<> to make that happen.
I don't think we have a wiki page purely on building bridge strings yet...
-Avi Marcus
On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote: > Is there anything I should know about the combination of these two? > > Alex > > _________________________________________________________________________ > Professional FreeSWITCH Consulting Services: > consulting@freeswitch.org > http://www.freeswitchsolutions.com > > FreeSWITCH-powered IP PBX: The CudaTel Communication Server > http://www.cudatel.com > > Official FreeSWITCH Sites > http://www.freeswitch.org > http://wiki.freeswitch.org > http://www.cluecon.com > > Join Us At ClueCon - Aug 7-9, 2012 > > 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 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
So an example of a current script would be: <include> <extension name="0095301"> <condition field="destination_number" expression="^(301|441223900482)$"> <action application="set" data="sb_routing=${sb_routing}&441223900482_301_pers_Alex"/> <action application="set" data="tenant_id=0095"/> <action application="set" data="b_ext=301"/> <action application="export" data="alert_info=http://hzhnov11.dmclub.net/generic/tones/Personal.wav"/> <action application="set" data="call_timeout=60"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="bridge_generate_comfort_noise=true"/> <action application="export" data="sip_h_tenant_id=0095"/> <action application="export" data="sip_h_company_name=Test Account"/> <action application="export" data="sip_h_extension=301"/> <action application="export" data="sip_h_extension_type=PersonalExtension"/> <action application="export" data="sip_h_extension_name=Alex"/> <action application="export" data="sip_h_prev_sb_routing=${sb_routing}"/> <action application="set" data="group_confirm_key=exec"/> <action application="export" data="whisper_msg=say:d m switchboard Call for Test Account personal"/> <action application="export" data="accept_msg=say:press 1 to accept"/> <action application="set" data="ringback=$${uk-ring}"/> <action application="set" data="transfer_ringback_=$${uk-ring}"/> <action application="set" data="ignore_early_media=true"/> <action application="set" data="group_confirm_file=lua confirmcall.lua"/> <action application="bridge" data="[tenant_id=0095,b_ext=301,accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900482_301_pers_Alex,call_timeout=20]user/0095301wp@${domain_name},[tenant_id=0095,b_ext=301,accept_mode=Direct,call_timeout=20,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000207775911500@1.2.3.4,"/> <action application="set" data="comment=pers_inhours_VM" /> <action application="answer" /> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} 0095301"/> </condition> </extension> </include> Note that I'm using , as a separator (having briefly used :_:) As I understand it, we could replace this with: <include> <extension name="0095301"> <condition field="destination_number" expression="^(301|441223900482)$"> <action application="set" data="tenant_id=0095"/> <action application="set" data="b_ext=301"/> <action application="set" data="call_timeout=60"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="bridge_generate_comfort_noise=true"/> <action application="set" data="ringback=$${uk-ring}"/> <action application="set" data="transfer_ringback_=$${uk-ring}"/> <action application="set" data="ignore_early_media=true"/> <action application="bridge" data="<sb_routing=${sb_routing}&441223900482_301_pers_Alex,tenant_id=0095,b_ext=301,alert_info=http://hzhnov11.dmclub.net/generic/tones/Personal.wav,call_timeout=60,hangup... Account,sip_h_extension=301,sip_h_extension_type=PersonalExtension,sip_h_extension_name=Alex,sip_h_prev_sb_routing=${sb_routing},group_confirm_key=exec,whisper_msg=say:d m switchboard Call for Test Account personal,accept_msg=say:press 1 to accept,ringback=$${uk-ring},transfer_ringback_=$${uk-ring},ignore_early_media=true,group_confirm_file=lua confirmcall.lua>[tenant_id=0095,b_ext=301,accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900482_301_pers_Alex,call_timeout=20]user/0095301wp@${domain_name}:_:[tenant_id=0095,b_ext=301,accept_mode=Direct,call_timeout=20,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000207775911500@1.2.3.4,"/> <action application="set" data="comment=pers_inhours_VM" /> <action application="answer" /> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} 0095301"/> </condition> </extension> </include> I'm not sure which of the channel variables is only for B-leg and which are for both (and which are essentially detritus!), but I guess there's no harm in putting in a few surplus ones. Will give this a try tomorrow morning.... Cheers! Alex On 13 Jun 2012, at 22:08, Avi Marcus wrote:
[var1=myinfo] is per each bridge string. {var1=myinfo} applies to the entire thread, meaning if you have a :_: it won't carry over to that. <var1=myinfo> is a superglobal which is applied to ALL threads.
-Avi
On Thu, Jun 14, 2012 at 12:04 AM, Alexander Lake <alex@thewinelake.com> wrote:
Ah. Is there a way to set common variables for the bridges?
On 13 Jun 2012, at 21:55, Avi Marcus wrote:
Like you've been doing, mostly: setting them inside the bridge string.
-Avi
On Wed, Jun 13, 2012 at 11:52 PM, Alexander Lake <alex@thewinelake.com> wrote:
export is deprecated? How is one supposed to do it instead? Maybe I need to get some examples...
On 13 Jun 2012, at 18:34, Avi Marcus wrote:
bridge seems to be fairly manual for assembling complicated bridge strings.
I think export works to all threads, but afaik, is deprecated.
I've used group_confirm on these threads, it's fine. Just make sure the group_confirm variable is in the right place...
-Avi
On Wed, Jun 13, 2012 at 7:53 PM, Alex <alex@thewinelake.com> wrote:
Just 'cos it's a separate thread doesn't mean that it couldn't have been initialised with channel variables from the spawning thread. I presume that exports don't work either. How about group_confirm? This is looking awfully like writing our own everything! > Hmm. re: enterprise originate remember that each is a separate thread, > so {} vars in one thread won't work on the other. You need to do > super-global<> to make that happen. > > I don't think we have a wiki page purely on building bridge strings yet... > > -Avi Marcus > > On Wed, Jun 13, 2012 at 4:30 PM, Alex<alex@thewinelake.com> wrote: >> Is there anything I should know about the combination of these two? >> >> Alex >> >> _________________________________________________________________________ >> Professional FreeSWITCH Consulting Services: >> consulting@freeswitch.org >> http://www.freeswitchsolutions.com >> >> FreeSWITCH-powered IP PBX: The CudaTel Communication Server >> http://www.cudatel.com >> >> Official FreeSWITCH Sites >> http://www.freeswitch.org >> http://wiki.freeswitch.org >> http://www.cluecon.com >> >> Join Us At ClueCon - Aug 7-9, 2012 >> >> 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 > _________________________________________________________________________ > Professional FreeSWITCH Consulting Services: > consulting@freeswitch.org > http://www.freeswitchsolutions.com > > FreeSWITCH-powered IP PBX: The CudaTel Communication Server > http://www.cudatel.com > > Official FreeSWITCH Sites > http://www.freeswitch.org > http://wiki.freeswitch.org > http://www.cluecon.com > > Join Us At ClueCon - Aug 7-9, 2012 > > 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 virus found in this message. > Checked by AVG - www.avg.com > Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12 > >
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
Looks like < > is the solution - many thanks! ...now I seem to have an issue with playAndGetDigits....
I was about to answer and say <action> tags must be inside <condition> tags. I think you can in fact remove you break=”never” everywhere except: <condition field="${testvarA}" expression="^$" break="never" /> Your first “condition” can just be “<condition>” which is always true. And <condition field="${testvarB}" expression="^$" break="never"> doesn’t need a break=”never” as it has <action> and <anti-action>s. Hope that helps (and is correct!) Sean From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Alex Sent: Wednesday, June 13, 2012 7:00 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Conditions OK... I think there's a fundamental misunderstanding about what code actually gets executed. The setting never happened in my example. If I change it to: <condition field="${ani}" expression="^(\d+)$" break="never" > <action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> </condition> <condition field="${testvarA}" expression="^$" break="never" /> <condition field="${testvarB}" expression="^$" break="never"> <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition> Then it works. (Comparing ani to any number of digits). What I really want is something like <condition expression="true"> Mmm. Strangely enough, I stumbled on that just after posting, but it still doesn't work <action inline="true" application="set" data="testvarA=hello"/> <action inline="true" application="set" data="testvarB=hello"/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition> Result: "TestVarsA and B are both empty" hello alex, you must set testvarA and testvarB as inline check this http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions huseyin On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <alex@thewinelake.com> wrote: I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on. <action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$" > <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition> The above gives "TestVarsA and B are both empty" which I don't understand! I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format. For example, I have a requirement that might be expressed like this: <context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10"/> } </extension> </context> What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this? I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits. Alex _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 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 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
...also struggling with the mailing list (which will teach me to have too many email addresses!). Apologies for multi-post
I've been struggling a bit with conditions. In particular the "break" attribute, which I couldn't really find any documentation on.
<action application="set" data="testvarA=hello/> <action application="set" data="testvarB=hello/> <condition field="${testvarA}" expression="^$" /> <condition field="${testvarB}" expression="^$"> <action application="log" data="WARNING TestVarsA and B are both empty"/> <anti-action application="log" data="WARNING TestVarsA and B are NOT both empty"/> </condition>
The above gives "TestVarsA and B are both empty" which I don't understand!
I think it would be nice to put some examples in the wiki that translate from the usual way of doing things (perhaps using PHP or JavaScript notation) to the dialplan format.
For example, I have a requirement that might be expressed like this:
<context name="dp0095"> <extension name="Outbound_call"> if (${default_ani_prefix} == "" and sip_auth_username == "") { <action application="log" data="WARNING default_ani_prefix and sip_auth_username are not set (A)"/> <action application="set" data="default_ani_prefix=${tenant_id}${b_ext}1"/> } if (${default_ani_prefix} == "") { <action application="log" data="WARNING default_ani_prefix is not set (B)"/> <action application="set" data="ani_prefix=${sip_auth_username}0"/> } else { <action application="set" data="ani_prefix=${default_ani_prefix}"/> } if ($destination_number == "^(\d{8}.*)") { <action application="bridge" data="[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$1@193.105.54.10"/> } </extension> </context>
What is the nefarious combination of conditions, breaks, actions and anti-actions required to implement this?
I'm happy to try and put a newbie-perspective updates into some part of the wiki. Talking of which, maybe it would be good to have more example-based content in the wiki, but put it in a separate section so that it doesn't clutter up the more reference-orientated bits.
Alex
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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 virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2177 / Virus Database: 2433/5065 - Release Date: 06/12/12
participants (9)
-
Alex
-
Alex Lake
-
Alex Lake
-
Alexander Lake
-
Avi Marcus
-
Dennis
-
Gabriel Gunderson
-
huseyin kalyoncu
-
Sean Devoy