Dear Bogdan,<br><br>I finished the tests of the solution suggested, and it&#39;s working perfectly!!!<br><br>Thank you very much for the awesome software and support,<br><br clear="all">Antonio Anderson Souza<br>Voice Technology<br>
<a href="http://www.antonioams.com">http://www.antonioams.com</a><br>
<br><br><div class="gmail_quote">On Fri, May 28, 2010 at 12:45 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Antonio,<br>
<br>
do it:<br>
<div class="im"><br>
  if ( $avp(s:pre_to_id) != null ) {<br>
</div>    if (dp_translate(&quot;$avp(s:pre_to_id)&quot;, &quot;$tU/$var(pre_to_user)&quot;) ) {<br>
<div class="im">        uac_replace_to(&quot;$var(pre_to_user)&quot;,&quot;sip:$var(pre_to_user)@$td&quot;) ;<br>
        xlog(&quot;L_INFO&quot;, &quot;PreRouting to TO: $rm gw:[$si:$sp] ruri:[$ru]<br>
from:[$fu] to:[$tu] sourceip:[$si] callid:[$ci]\n&quot;);<br>
    }<br>
  }<br>
<br>
</div><div class="im">Regards,<br>
Bogdan<br>
<br>
Antonio Anderson Souza wrote:<br>
</div><div class="im">&gt; Hi Bogdan,<br>
&gt;<br>
&gt; I&#39;m not checking the dialplan return, follow bellow the script snippet.<br>
&gt;<br>
&gt;   if ( $avp(s:pre_to_id) != null ) {<br>
&gt;     dp_translate(&quot;$avp(s:pre_to_id)&quot;, &quot;$tU/$var(pre_to_user)&quot;);<br>
&gt;     $var(s:to) = $var(pre_to_user);<br>
&gt;     uac_replace_to(&quot;$var(pre_to_user)&quot;,&quot;sip:$var(pre_to_user)@$td&quot;) ;<br>
&gt;     xlog(&quot;L_INFO&quot;, &quot;PreRouting to TO: $rm gw:[$si:$sp] ruri:[$ru]<br>
&gt; from:[$fu] to:[$tu] sourceip:[$si] callid:[$ci]\n&quot;);<br>
&gt;   }<br>
&gt;<br>
&gt; I&#39;ll change the script to check the dp_translate return before execute<br>
&gt; uac_replace_to, and I&#39;ll send a feedback to the list.<br>
&gt;<br>
&gt; Thank you very much,<br>
&gt;<br>
&gt; Antonio Anderson Souza<br>
&gt; Voice Technology<br>
&gt; <a href="http://www.antonioams.com" target="_blank">http://www.antonioams.com</a><br>
&gt;<br>
&gt;<br>
&gt; On Fri, May 28, 2010 at 3:33 AM, Bogdan-Andrei Iancu<br>
</div><div><div></div><div class="h5">&gt; &lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi Antonio,<br>
&gt;<br>
&gt;     how do you pass the information (output of dp_translate) to the<br>
&gt;     uac_replace_to() ? Are you also checking all the time the return<br>
&gt;     code of<br>
&gt;     dp_translate to be sure there is an output?<br>
&gt;<br>
&gt;     Regards,<br>
&gt;     Bogdan<br>
&gt;<br>
&gt;     Antonio Anderson Souza wrote:<br>
&gt;     &gt; Dear All,<br>
&gt;     &gt;<br>
&gt;     &gt; I&#39;m using the Opensips 1.6.1 with dialplan and uac module to rewrite<br>
&gt;     &gt; the From and To, in such cases.<br>
&gt;     &gt;<br>
&gt;     &gt; I need to make a deeper analyzes, but what&#39;s happening the<br>
&gt;     &gt; uac_replace_to change informations between different<br>
&gt;     transactions, for<br>
&gt;     &gt; example:<br>
&gt;     &gt;<br>
&gt;     &gt; Incoming Invite A<br>
&gt;     &gt; from: 551122334455@123.123.123<br>
&gt;     &gt; to: 666555566778899@123.123.124<br>
&gt;     &gt;<br>
&gt;     &gt; Dialplan A:<br>
&gt;     &gt; matchs: 6665555(.*)<br>
&gt;     &gt; subst:/2<br>
&gt;     &gt;<br>
&gt;     &gt; Outgoing Invite A<br>
&gt;     &gt; from: 551122334455@123.123.123<br>
&gt;     &gt; to: 66778899@123.123.124<br>
&gt;     &gt;<br>
&gt;     &gt; Incoming Invite B<br>
&gt;     &gt; from: <a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a><br>
&gt;     &lt;mailto:<a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a><br>
&gt;     &lt;mailto:<a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a>&gt;&gt;<br>
&gt;     &gt; to: <a href="mailto:8885577665544@222.222.222.223">8885577665544@222.222.222.223</a><br>
&gt;     &lt;mailto:<a href="mailto:8885577665544@222.222.222.223">8885577665544@222.222.222.223</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:8885577665544@222.222.222.223">8885577665544@222.222.222.223</a><br>
&gt;     &lt;mailto:<a href="mailto:8885577665544@222.222.222.223">8885577665544@222.222.222.223</a>&gt;&gt;<br>
&gt;     &gt;<br>
&gt;     &gt; Dialplan B:<br>
&gt;     &gt; matchs: 88855(.*)<br>
&gt;     &gt; subst:/2<br>
&gt;     &gt;<br>
&gt;     &gt; Outgoing Invite B<br>
&gt;     &gt; from: <a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a><br>
&gt;     &lt;mailto:<a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a><br>
</div></div><div class="im">&gt;     &lt;mailto:<a href="mailto:551122334455@222.222.222.222">551122334455@222.222.222.222</a>&gt;&gt;<br>
&gt;     &gt; to: <a href="mailto:66778899@222.222.222.223">66778899@222.222.222.223</a> &lt;mailto:<a href="mailto:66778899@222.222.222.223">66778899@222.222.222.223</a>&gt;<br>
</div>&gt;     &lt;mailto:<a href="mailto:66778899@222.222.222.223">66778899@222.222.222.223</a> &lt;mailto:<a href="mailto:66778899@222.222.222.223">66778899@222.222.222.223</a>&gt;&gt;<br>
<div class="im">&gt;     &gt;<br>
&gt;     &gt; The To User of Outgoing Invite B should be  77665544 instead of<br>
&gt;     66778899.<br>
&gt;     &gt;<br>
&gt;     &gt; Does anybody already faced something like that? As I saw some<br>
&gt;     commits<br>
&gt;     &gt; regarding uac, and dialplan in 1.6.2, I&#39;m thinking to update to<br>
&gt;     1.6.2<br>
&gt;     &gt; to see if it&#39;s fix this problem, what do you think?<br>
&gt;     &gt;<br>
&gt;     &gt; If some one could share your opinion with me, I&#39;ll very grateful.<br>
&gt;     &gt;<br>
&gt;     &gt; Best regards,<br>
&gt;     &gt;<br>
&gt;     &gt; Antonio Anderson Souza<br>
&gt;     &gt; Voice Technology<br>
&gt;     &gt; <a href="http://www.antonioams.com" target="_blank">http://www.antonioams.com</a><br>
&gt;     &gt;<br>
&gt;     ------------------------------------------------------------------------<br>
&gt;     &gt;<br>
&gt;     &gt; _______________________________________________<br>
&gt;     &gt; Users mailing list<br>
</div>&gt;     &gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> &lt;mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>&gt;<br>
<div class="im">&gt;     &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;     &gt;<br>
&gt;<br>
&gt;<br>
&gt;     --<br>
&gt;     Bogdan-Andrei Iancu<br>
</div>&gt;     <a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a> &lt;<a href="http://www.voice-system.ro" target="_blank">http://www.voice-system.ro</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     Users mailing list<br>
&gt;     <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> &lt;mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>&gt;<br>
<div><div></div><div class="h5">&gt;     <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
--<br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>