[OpenSIPS-Users] uac_replace_from/to

David Villasmil david.villasmil.work at gmail.com
Tue Feb 4 10:00:10 EST 2020


Dlg_manage() maybe?

On Tue, 4 Feb 2020 at 14:40, Антон Ершов <suharik71 at gmail.com> wrote:

> Hello friends
> Help me to understand. In request_route i make replace from and to fields.
> After an unsuccessful attempt to invite, I try to direct the call to
> another place and again I need to replace the from and to fields. But
> instead of replacing, new values are simply added
>
> route {
>     ...
>     route(rewrite_header);
>     ...
> }
> failure_route[missed_call] {
>     setflag(need_uac_restore);
>     ...
>     route(rewrite_header);
> }
> route[rewrite_header] {
>     if (isflagset(need_uac_restore)) {
>         xlog("L_INFO", "[ $ci ] - restore from and to fields\n");
>         uac_restore_from();
>         uac_restore_to();
>     }
>      uac_replace_from("","sip:$avp(fromuser)@$avp(fromdomain)");
>      uac_replace_to("","sip:$avp(touser)@$avp(todomain)");
> }
>
> in the end I get such fields
>
> From:  <sip:2220222 at 10.10.10.10><sip:5274274 at sipofon.loc
> >;tag=fe654d87-7565-408f-9925-98a5bac99e1c
> To: <sip:3865071 at 10.10.10.10><sip:3865071 at sipofon.loc>
>
> it simply appends the new value to the old and does not replace it
> changing replace modes in uac module does not change behavior
> in debug log i see this
>
> DBG:uac:replace_uri: uri to replace [<sip:2220222 at 10.23.100.40>],
> replacement is [<sip:79385274274 at multifon.ru>]
> DBG:dialog:new_dlg_val: inserting <739823>=<<sip:5274274 at sipofon.loc>>
> DBG:dialog:store_dlg_value_unsafe: var found-> <<sip:2220222 at 10.10.10.10
> >>!
> DBG:uac:replace_uri: uri to replace [<sip:3865071 at 10.100.100.100>],
> replacement is [<sip:3865071 at sipofon.loc>]
> DBG:dialog:new_dlg_val: inserting <739824>=<<sip:3865071 at sipofon.loc>>
> DBG:dialog:store_dlg_value_unsafe: var found-> <<sip:3865071 at 10.10.10.10
> >>!
>
> 10.23.100.40 - call initiator
> 10.10.10.10 - where should the call go first
> 10.100.100.100 - opensips
> sipofon.loc - where should the call go after failure_route has worked
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200204/51903771/attachment-0001.html>


More information about the Users mailing list