Can't change From header

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't change From header

maatohewetbi
I want to change from header by using uac_replace_from, but when I call it from request route it's still the same.

route[handle_presence]
{
 if (is_method("PUBLISH")) {
      handle_publish();
    } else

    if (is_method("SUBSCRIBE")) {
    xlog ("fu: $fu");
    uac_replace_from("","sip:robin@gotham.org");
    xlog ("fu: $fu");
     handle_subscribe();
    }

    exit;
}

Reply | Threaded
Open this post in threaded view
|

Re: Can't change From header

Bogdan-Andrei Iancu-2
Hi,

Changing the FROM hdr works only when proxying the request, not when it
is locally consumed (like in your case, where the SUBSCRIBE is consumed
by the presence module).

What's the purpose of changing the FROM for the watcher ?

Best regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 06/13/2017 01:32 PM, maatohewetbi wrote:

> I want to change from header by using *uac_replace_from*, but when I call it
> from request route it's still the same.
>
> route[handle_presence]
> {
>   if (is_method("PUBLISH")) {
>        handle_publish();
>      } else
>
>      if (is_method("SUBSCRIBE")) {
>      xlog ("fu: $fu");
>      uac_replace_from("","sip:[hidden email]");
>      xlog ("fu: $fu");
>       handle_subscribe();
>      }
>
>      exit;
> }
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Can-t-change-From-header-tp7607691.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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