<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It looks like your regex is wrong. &nbsp;Try the following:<div><br></div><div>^(\+?|\+1?|1?)(\d+).*$</div><div><br></div><div>and substitute $2 where you have $1 in the effective_caller_id_number action.</div><div><br></div><div>i.e.</div><div><br></div><div>&lt;include&gt;<br>&nbsp;&nbsp;&lt;extension name="DIDtest"&gt;<br>&nbsp;&nbsp; &nbsp;&lt;condition field="ani" expression="^(\+?|\+1?|1?)(\d+).*$" break="never"&gt;<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set" data="effective_caller_id_number=$2"/&gt;<br>&nbsp;&nbsp; &nbsp;&lt;/condition&gt;<br>&nbsp;&nbsp; &nbsp;&lt;condition field="destination_number" expression="^\+?+1?1?(.*)$"&gt;<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/blade2/$1"/&gt;<br>&nbsp;&nbsp; &nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&lt;/extension&gt;<br>&lt;/include&gt;</div><div><br></div><div>-Troy<br><br></div><div>

<br><div><div>On Apr 27, 2010, at 9:41 AM, RR wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks David.<div><br></div><div>Unfortunately, that didn't fix the issue. I still see the original 'ani' going out with all the prefixes attached to the actual number :(</div><div><br></div><div>The only time it works is if I set the effective_caller_id_number JUST before the bridge. Otherwise it seems to get lost.&nbsp;<br>
<br><div class="gmail_quote">On Tue, Apr 27, 2010 at 12:16 PM, David Ponzone <span dir="ltr">&lt;<a href="mailto:david.ponzone@gmail.com">david.ponzone@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
<div style="word-wrap:break-word">You should first correct your dialplan to:<div><br></div><div><div>&lt;include&gt;</div><div>&nbsp;&nbsp;&lt;extension name="DIDtest"&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;condition field="ani" expression="^\+?|+1?|1?(\d+).*$" break="never"&gt;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set" data="effective_caller_id_number=$1"/&gt;</div><div class="im"><div>&nbsp;&nbsp; &nbsp;&lt;/condition&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;condition field="destination_number" expression="^\+?+1?1?(.*)$"&gt;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/blade2/$1"/&gt;</div><div>&nbsp;&nbsp; &nbsp;&nbsp;&lt;/condition&gt;</div><div>&nbsp;&nbsp;&lt;/extension&gt;</div><div>&lt;/include&gt;</div>
<div><br></div><div><br></div></div><div> <span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div><font face="'Helvetica Neue'"><font color="#1C00FF">David Ponzone &nbsp;</font><font color="#000000" size="3"><span style="font-size:12px">Direction Technique</span></font></font></div><div><font face="'Helvetica Neue'"><font size="3"><span style="font-size:13px">email: <a href="mailto:david.ponzone@ipeva.fr" target="_blank">david.ponzone@ipeva.fr</a></span></font></font></div>
<div><font face="'Helvetica Neue'"><font size="3"><span style="font-size:13px">tel: &nbsp; &nbsp; &nbsp;01 74 03 18 97</span></font></font></div><div><font face="'Helvetica Neue'"><font size="3"><span style="font-size:13px">gsm: &nbsp; 06 66 98 76 34</span></font></font></div>
<div><font face="'Helvetica Neue'"><br></font></div><div><font color="#1C00FF" face="'Helvetica Neue'">Service Client<span>&nbsp;</span></font><font face="'Helvetica Neue'"><font color="#FF0000">IP</font></font><font color="#1C00FF" face="'Helvetica Neue'">eva</font></div>
<div><font color="#1C00FF" face="'Helvetica Neue'"><span style="color:rgb(0, 0, 0);font-family:Helvetica"><div><font face="'Helvetica Neue'"><font size="3"><span style="font-size:13px">tel: &nbsp; &nbsp; &nbsp;0811 46 26 26</span></font></font></div>
<div><font face="'Helvetica Neue'" size="3"><span style="font-size:13px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;color:rgb(0, 34, 243)"><span style="text-decoration:underline"><a>www.ipeva.fr</a></span><span style="color:rgb(101, 104, 149)">&nbsp; -&nbsp; &nbsp;<span style="color:rgb(0, 34, 243);text-decoration:underline"><a>www.ipeva-studio.com</a></span></span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;color:rgb(0, 34, 243)"><span style="text-decoration:underline"><br></span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;color:rgb(0, 34, 243)">
<span><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;text-align:justify;color:rgb(192, 192, 192)"><i>Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération.&nbsp;</i><b><i>IPeva</i></b><i>&nbsp;décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.</i></div>
<div style="text-decoration:underline;text-align:justify"><font color="#C0C0C0"><i><br></i></font></div></span></div></span></font></div></span></font></div></div></span><br></div></span><br> </div><br><div><div>Le 27/04/2010 à 17:54, RR a écrit :</div>
<br><blockquote type="cite"><div><div></div><div class="h5">Hello All,<div><br></div><div>just want to clarify my understanding re: variables etc that can be set before a call bridge/transfer etc. It appears that we need to set these variables immediately before the bridge without any other operation occurring from when they are setup and when the bridge happens. Is that true?</div>
 <div><br></div><div>I have a very simple dialplan like so:</div><div><br></div><div><div>&lt;include&gt;</div><div>&nbsp;&nbsp;&lt;extension name="DIDtest"&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;condition field="ani" expression="^\+?|+1?|1?(\d+).*$"/&gt;</div>
 <div>&nbsp;&nbsp; &nbsp;&lt;action application="export" data="effective_caller_id_number=$1"/&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;condition field="destination_number" expression="^\+?+1?1?(.*)$"&gt;</div><div>
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/blade2/$1"/&gt;</div> <div>&nbsp;&nbsp; &nbsp;&nbsp;&lt;/condition&gt;</div><div>&nbsp;&nbsp;&lt;/extension&gt;</div><div>&lt;/include&gt;</div>
<div><br></div><div>But when the call is sent to gateway blade2, the callerID on the call is whatever the original callerID was with all the 1s and '+'s and whatever prefixes the call came in with.&nbsp;</div> <div><br>
</div><div>Questions:</div><div>a) can the variable effective_caller_id_number not be set dynamically from a temp variable such as $1. I have also tried forcing it to a number like&nbsp;effective_caller_id_number=20239388383 and even then it doesn't work</div>
 <div><br></div><div>&nbsp;b) I have also tried&nbsp;</div><div><br></div><div>&lt;action application="bridge" data="{effective_caller_id_number=20239388383}{sip_invite_domain=${sip_from_host}}sofia/gateway/blade9/$1"/&gt;</div>
 </div><div><br></div><div>and that doesn't work either.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Thanks</div><div>RR</div></div></div> _______________________________________________<br>FreeSWITCH-users mailing list<br>
<a href="mailto: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>
</blockquote></div><br></div></div><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" 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>
<br></blockquote></div><br></div>
_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>