Just found this http://lists.freeswitch.org/pipermail/freeswitch-users/2011-May/072338.html Which seems a useful tip
Apologies about the formatting of that - quite horrible. Not sure why, though. Let's try again...
<condition field="dest_num" expression="^\+" inline="true"> <action application="log" data="WARNING Begins with +"/> <action application="set" data="dest_num=00${dest_num:1}" inline="true"/> <action application="log" data="WARNING dest_num now ${dest_num}" /> </condition>
Although it seems to be doing the right thing, it isn't. Lower down the file, I have
<condition field="destination_number" expression="^(\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"/>
<anti-action application="log" data="WARNING ${destination_number} not a long number"/> </condition>
And when I place a call to +44123456789 the log records
EXECUTE sofia/internal/0095301@vrhnov11.dmclub.net set(destination_number=0044123456789) 2012-07-24 08:59:03.611635 [DEBUG] mod_dptools.c:1305 sofia/internal/0095301@vrhnov11.dmclub.net SET [destination_number]=[0044123456789] Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net Action log(WARNING destination_number now ${destination_number}) Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net Regex (FAIL) [Outbound_call] ${default_ani_prefix}(00953010) =~ /^$/ break=never Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net Regex (FAIL) [Outbound_call] ${sip_auth_username}(0095301) =~ /^$/ break=never Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net Regex (FAIL) [Outbound_call] ${default_ani_prefix}(00953010) =~ /^$/ break=never Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net ANTI-Action set(ani_prefix=${default_ani_prefix}) INLINE EXECUTE sofia/internal/0095301@vrhnov11.dmclub.net set(ani_prefix=00953010) 2012-07-24 08:59:03.611635 [DEBUG] mod_dptools.c:1305 sofia/internal/0095301@vrhnov11.dmclub.net SET [ani_prefix]=[00953010] Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net Regex (FAIL) [Outbound_call] ${ani_prefix}(00953010) =~ /^(0)$/ break=never Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net Regex (FAIL) [Outbound_call] destination_number(+44123456789) =~ /^(\d{8}.*)/ break=on-false Dialplan: sofia/internal/0095301@vrhnov11.dmclub.net ANTI-Action log(WARNING ${destination_number} not a long number) 2012-07-24 08:59:03.611635 [DEBUG] switch_core_state_machine.c:154 (sofia/internal/0095301@vrhnov11.dmclub.net) State Change CS_ROUTING -> CS_EXECUTE 2012-07-24 08:59:03.611635 [DEBUG] switch_core_session.c:1228 Send signal sofia/internal/0095301@vrhnov11.dmclub.net [BREAK] 2012-07-24 08:59:03.611635 [DEBUG] switch_core_state_machine.c:433 (sofia/internal/0095301@vrhnov11.dmclub.net) State ROUTING going to sleep 2012-07-24 08:59:03.611635 [DEBUG] switch_core_state_machine.c:385 (sofia/internal/0095301@vrhnov11.dmclub.net) Running State Change CS_EXECUTE 2012-07-24 08:59:03.611635 [DEBUG] switch_core_state_machine.c:440 (sofia/internal/0095301@vrhnov11.dmclub.net) State EXECUTE 2012-07-24 08:59:03.611635 [DEBUG] mod_sofia.c:241 sofia/internal/0095301@vrhnov11.dmclub.net SOFIA EXECUTE 2012-07-24 08:59:03.611635 [DEBUG] switch_core_state_machine.c:196 sofia/internal/0095301@vrhnov11.dmclub.net Standard EXECUTE
So something odd going on here - probably easy for the experts to see my mistake!
_________________________________________________________________________ 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.2196 / Virus Database: 2437/5143 - Release Date: 07/20/12