Hi Antonio,

if it works, it is cool :)

Regards,
Bogdan

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


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to