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