<div dir="ltr">Hi, <div><br></div><div>See these links </div><div><a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_10:_Route_to_a_gateway_extension_with_custom_caller_id">http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_10:_Route_to_a_gateway_extension_with_custom_caller_id</a></div>

<div><a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_18:_Add_international_call_prefix_to_effective_caller_id_number_on_incoming_BRI_calls">http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_18:_Add_international_call_prefix_to_effective_caller_id_number_on_incoming_BRI_calls</a> </div>

<div><a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_20:_Fix_invalid_caller_ID">http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_20:_Fix_invalid_caller_ID</a> <div><pre style="padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(47,111,171);border-right-color:rgb(47,111,171);border-bottom-color:rgb(47,111,171);border-left-color:rgb(47,111,171);background-color:rgb(255,255,255);line-height:1.1em">

 &lt;extension name=&quot;<a href="http://asterlink.com">asterlink.com</a>&quot;&gt;
     &lt;condition field=&quot;caller_id_number&quot; expression=&quot;^1000$&quot;/&gt;
     &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{10})$&quot;&gt;        
         &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=8001231234&quot;/&gt;
         &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=800 Number&quot;/&gt;
         &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/<a href="http://asterlink.com/1208$1">asterlink.com/1208$1</a>&quot;/&gt;
     &lt;/condition&gt;
   &lt;/extension&gt;</pre><div dir="ltr"><br></div><div dir="ltr">Your debug message doesn&#39;t show caller id, so what I&#39;ve understood is, you need to make a check for 10 digit caller id, so that could be, and leave caller id as it is </div>

</div></div><div dir="ltr"><br></div><div dir="ltr"><pre style="padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dashed;border-right-style:dashed;border-bottom-style:dashed;border-left-style:dashed;border-top-color:rgb(47,111,171);border-right-color:rgb(47,111,171);border-bottom-color:rgb(47,111,171);border-left-color:rgb(47,111,171);background-color:rgb(255,255,255);line-height:1.1em">

&lt;condition field=&quot;caller_id_number&quot; expression=&quot;^(\d{10})$&quot;/&gt;</pre></div><div dir="ltr"><br></div><div dir="ltr">similarly you can make other checks as per your requirements.</div><div dir="ltr">

<br></div><div dir="ltr">Regards,<br>Zohair Raza<div><br></div></div>
<br><br><div class="gmail_quote">On Tue, Dec 27, 2011 at 5:59 AM, Sherif Omran <span dir="ltr">&lt;<a href="mailto:sherifomran2000@yahoo.com">sherifomran2000@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hi Zohair,<br><br>I made it differently, each gateway forwards to an extension and in the dial plan i control the incoming caller id. I think, this may not be correct because of using 2 numbers instead of only 1 external number that is connected to the same extension.<br>

If you have an idea, i would appreciate.<br><br>Regarding the german gateway, I can not add 0049 because i am calling it from my swiss number and the number is transmitted correctly, however what i see is 10 digits only.  see the following output:<br>

<br>2011-12-27 01:53:32.275392 [DEBUG] switch_core_state_machine.c:362 (sofia/sipinterface_1/<a href="tel:%2B41793940965" value="+41793940965" target="_blank">+41793940965</a>@<a href="http://bluesip.net" target="_blank">bluesip.net</a>) Running State Change CS_REPORTING<br>

2011-12-27 01:53:32.275392 [DEBUG] switch_core_state_machine.c:662 (sofia/sipinterface_1/<a href="tel:%2B41793940965" value="+41793940965" target="_blank">+41793940965</a>@<a href="http://bluesip.net" target="_blank">bluesip.net</a>) State REPORTING<br>

2011-12-27 01:53:32.275392 [DEBUG]
 switch_core_state_machine.c:362 (sofia/sipinterface_1/<a href="http://sip:1000@88.64.50.28:61000" target="_blank">sip:1000@88.64.50.28:61000</a>) Running State Change CS_HANGUP<br><br>kind regards,<br>Sherif<br><br>--- On <b>Tue, 12/27/11, Sherif Omran <i>&lt;<a href="mailto:sherifomran2000@yahoo.com" target="_blank">sherifomran2000@yahoo.com</a>&gt;</i></b> wrote:<br>

<blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><br>From: Sherif Omran &lt;<a href="mailto:sherifomran2000@yahoo.com" target="_blank">sherifomran2000@yahoo.com</a>&gt;<div class="im">

<br>Subject: Re: [Freeswitch-users] Gateway Caller ID Help required<br>To: &quot;FreeSWITCH Users Help&quot; &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>

</div>Date: Tuesday, December 27, 2011, 3:14 AM<div><div class="h5"><br><br><div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit" valign="top">Hi Zohair,<br><br>I found it <br><br> &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=001${caller_id_number}&quot;/&gt;<br>

<br>but i have 2 gateways, this works with the usa gateway. However, I need to put a condition in the
 dialplan<br><br>if it comes from german gateway, add 0049<br>if it comes from usa gateway, add 001<br><br>I don&#39;t know the variable name of the gateway<br><br>best regards and many thanks<br><br>Sherif<br><br><br>--- On <b>Mon, 12/26/11, Zohair Raza <i>&lt;<a href="mailto:engineerzuhairraza@gmail.com" target="_blank">engineerzuhairraza@gmail.com</a>&gt;</i></b> wrote:<br>

<blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><br>From: Zohair Raza &lt;<a href="mailto:engineerzuhairraza@gmail.com" target="_blank">engineerzuhairraza@gmail.com</a>&gt;<br>Subject: Re: [Freeswitch-users] Gateway Caller ID Help required<br>

To: &quot;FreeSWITCH Users Help&quot; &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>Date: Monday, December
 26, 2011, 3:02 PM<br><br><div><div dir="ltr">Hi, <div>use effective_caller_id variable in dialplan to append +<div><br clear="all"><div dir="ltr">Regards,<br>Zohair Raza<div><br></div></div><br>
<br><br><div>On Mon, Dec 26, 2011 at 4:58 PM, Sherif Omran <span dir="ltr">&lt;<a rel="nofollow">sherifomran2000@yahoo.com</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit" valign="top">Hi<br><br>I have setup an IPkall gateway, so that any call to my number in USA be connected to my extension. However, the caller ID that appear is 10 digits and i want it to show +1 stating for usa. <br>



<br>In the mean time, I have another german gateway, the number is transmitted fully including the country code, but it appears on my phone in the form of last 10 digits only.<br><br>any help is appreciated<br><br>thank you in advance<br>



<br><br></td></tr></tbody></table><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a rel="nofollow">consulting@freeswitch.org</a><br>
<a rel="nofollow" href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a rel="nofollow" href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a rel="nofollow" href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a rel="nofollow" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div>
</div><br>-----Inline Attachment Follows-----<br><br><div>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a rel="nofollow">consulting@freeswitch.org</a><br>

<a rel="nofollow" href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a rel="nofollow" href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>

<br>Official FreeSWITCH Sites<br><a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a rel="nofollow" href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>

<a rel="nofollow" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a rel="nofollow">FreeSWITCH-users@lists.freeswitch.org</a><br><a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>

UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>

</div></blockquote></td></tr></tbody></table></div><br>-----Inline Attachment Follows-----<br><br><div>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br>

<a href="http://mc/compose?to=consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>

<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>

<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>

<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>

<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></div></div></div></blockquote></td></tr></tbody></table></blockquote></div><br></div>