<div dir="ltr">Try <span style="font-size:12.8px">require-nested="false" on the destination_number condition.</span></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 July 2016 at 09:37, Panagiotis Skoulikaritis <span dir="ltr"><<a href="mailto:pskoul@gmail.com" target="_blank">pskoul@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all<br>
<br>
I'm trying to add a "+" sign in front of the cli before it is send out.<br>
If the cli contains already a "+" sign or if the cli starts with 1-9<br>
everything works, but if the cli starts with 00 the call fails with 480.<br>
<br>
<br>
Any idea what might cause this ?<br>
<br>
Bellow is the dialplan<br>
<br>
<br>
<extension name="test_cli"><br>
<condition field="network_addr"<br>
expression="^(^xx\.xx\.xx\.xx|^xx\.xx\.xx\.xx)$"/><br>
<condition field="destination_number" expression="^1234#(\d+)$"><br>
<condition field="caller_id_number" expression="^(00)(\d+)$" break="never"><br>
<action inline="true" application="set"<br>
data="effective_caller_id_number=+$2"/><br>
<action inline="true" application="set"<br>
data="effective_caller_id_name=+$2"/><br>
</condition><br>
<condition field="caller_id_number" expression="^([1-9]\d+)$" break="never"><br>
<action inline="true" application="set"<br>
data="effective_caller_id_number=+$1"/><br>
<action inline="true" application="set"<br>
data="effective_caller_id_name=+$1"/><br>
</condition><br>
<action application="set" data="call_direction=outgoing"/><br>
<action application="set" data="hangup_after_bridge=true"/><br>
<action application="set" data="continue_on_fail=true"/><br>
<action application="set" data="sip_cid_in_1xx=false"/><br>
<action application="set" data="inherit_codec=true"/><br>
<action application="set" data="accountcode=${sip_h_X-ACCOUNTCODE}"<br>
inline="true"/><br>
<action application="export"<br>
data="nolocal:accountcode=${sip_h_X-ACCOUNTCODE}" inline="true"/><br>
<action application="unset" data="sip_h_X-ACCOUNTCODE" inline="true"/><br>
<action application="set" data="execute_on_answer=sched_hangup +21600<br>
alloted_timeout"/><br>
<action application="bridge" data="sofia/external/+$1@yy.yy.yy.yy:5060"/><br>
<action application="bridge" data="sofia/external/+$1@zz.zz.zz.zz:5060"/><br>
</condition><br>
</extension><br>
<br>
<br>
the logs I'm getting when the call fails<br>
<br>
Dialplan: sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> parsing<br>
[public->test_cli] continue=false<br>
Dialplan: sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Regex (PASS)<br>
[test_cli] network_addr(192.168.160.10) =~<br>
/^(^192\.168\.160\.10|^192\.168\.170\.10)$/ break=on-false<br>
|--- Dialplan: Processing recursive conditions level:1<br>
[test_cli_recur_1] require-nested=TRUE<br>
|--- Dialplan: sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Regex (PASS)<br>
[test_cli_recur_1] caller_id_number(00123456789) =~ /^(00)(\d+)$/<br>
break=never<br>
|--- Dialplan: sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Action<br>
set(effective_caller_id_number=+123456789) INLINE<br>
EXECUTE sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a><br>
set(effective_caller_id_number=+123456789)<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_dptools.c:1469<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> SET<br>
[effective_caller_id_number]=[+123456789]<br>
|--- Dialplan: sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Action<br>
set(effective_caller_id_name=+123456789) INLINE<br>
EXECUTE sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a><br>
set(effective_caller_id_name=+123456789)<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_dptools.c:1469<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> SET<br>
[effective_caller_id_name]=[+123456789]<br>
|--- Dialplan: sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Regex (FAIL)<br>
[test_cli_recur_1] caller_id_number(00123456789) =~ /^([1-9]\d+)$/<br>
break=never<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:216<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State Change CS_ROUTING -><br>
CS_EXECUTE<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_session.c:1396 Send<br>
signal sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [BREAK]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:528<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State ROUTING going to sleep<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:472<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Running State Change CS_EXECUTE<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:535<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State EXECUTE<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_sofia.c:178<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> SOFIA EXECUTE<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:258<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Standard EXECUTE<br>
EXECUTE sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> set(outside_call=true)<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_dptools.c:1469<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> SET [outside_call]=[true]<br>
EXECUTE sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a><br>
export(RFC2822_DATE=Tue, 05 Jul 2016 04:12:06 +0000)<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_channel.c:1267 EXPORT<br>
(export_vars) [RFC2822_DATE]=[Tue, 05 Jul 2016 04:12:06 +0000]<br>
2016-07-05 04:12:06.258273 [NOTICE] switch_core_state_machine.c:315<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> has executed the last dialplan<br>
instruction, hanging up.<br>
2016-07-05 04:12:06.258273 [NOTICE] switch_core_state_machine.c:317<br>
Hangup sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [CS_EXECUTE]<br>
[NORMAL_CLEARING]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_channel.c:3242 Send signal<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [KILL]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_session.c:1396 Send<br>
signal sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [BREAK]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:535<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State EXECUTE going to sleep<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:472<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Running State Change CS_HANGUP<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:735<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Callstate Change RINGING -><br>
HANGUP<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:737<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State HANGUP<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_sofia.c:413 Channel<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> hanging up, cause: NORMAL_CLEARING<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_sofia.c:549 Responding to INVITE<br>
with: 480<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:60<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Standard HANGUP, cause:<br>
NORMAL_CLEARING<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:737<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State HANGUP going to sleep<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:504<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State Change CS_HANGUP -><br>
CS_REPORTING<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_session.c:1396 Send<br>
signal sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [BREAK]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:472<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Running State Change<br>
CS_REPORTING<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:823<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State REPORTING<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:104<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Standard REPORTING, cause:<br>
NORMAL_CLEARING<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:823<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State REPORTING going to sleep<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:498<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State Change CS_REPORTING -><br>
CS_DESTROY<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_session.c:1396 Send<br>
signal sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [BREAK]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_session.c:1623 Session<br>
40729659 (sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Locked, Waiting on<br>
external entities<br>
2016-07-05 04:12:06.258273 [NOTICE] switch_core_session.c:1641 Session<br>
40729659 (sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Ended<br>
2016-07-05 04:12:06.258273 [NOTICE] switch_core_session.c:1645 Close<br>
Channel sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> [CS_DESTROY]<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:626<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) Running State Change CS_DESTROY<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:636<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State DESTROY<br>
2016-07-05 04:12:06.258273 [DEBUG] mod_sofia.c:323<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> SOFIA DESTROY<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:111<br>
sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a> Standard DESTROY<br>
2016-07-05 04:12:06.258273 [DEBUG] switch_core_state_machine.c:636<br>
(sofia/external/<a href="mailto:00123456789@192.168.157.14">00123456789@192.168.157.14</a>) State DESTROY going to sleep<br>
2016-07-05 04:13:01.618279 [NOTICE] mod_cdr_csv.c:123 Rotated CDR<br>
logfile /usr/local/freeswitch/log/cdr-csv/cdr-csv/Master.csv<br>
freeswitch@internal><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>