Is there any way to access Referred-By header field?

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

Is there any way to access Referred-By header field?

Chen-Che Huang
Hell all,

Does anyone know how to access Referred-By header field (RFC 3892) in OpenSIPS? From the Core variables document, I could not find any variable for Referred-By. Please kindly let me know if you have a solution to this. Thanks.

Best wishes,
Chen-Che
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to access Referred-By header field?

Bogdan-Andrei Iancu-2
Hi Chen-Che,

There is no direct way, but you can do it like:
   $hdr(Referred-By)  for the whole hdr
$(hdr(Referred-By){nameaddr.uri})  for the URI only
$(hdr(Referred-By){nameaddr.uri}{uri.user})  for the URI username  only

Regards,

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

On 12.05.2015 11:25, microx wrote:

> Hell all,
>
> Does anyone know how to access Referred-By header field (RFC 3892) in
> OpenSIPS? From the Core variables document, I could not find any variable
> for Referred-By. Please kindly let me know if you have a solution to this.
> Thanks.
>
> Best wishes,
> Chen-Che
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Is-there-any-way-to-access-Referred-By-header-field-tp7597066.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
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to access Referred-By header field?

Chen-Che Huang
Hi Bogdan-Andrei,

It works for $(hdr(Referred-By){nameaddr.uri}), but I get nothing from $(hdr(Referred-By){nameaddr.name}).
The header field is like
Referred-By:d3138e979-a266-4b31-bdc7-d9829cd1fa3a<sip:0001@test.com>

From the script transformations document, I expect to get the display name "d3138e979-a266-4b31-bdc7-d9829cd1fa3a" when using $(hdr(Referred-By){nameaddr.name}). Do I misunderstand anything or the example header field is not eligible? Thanks for any help.

Best wishes,
Chen-Che


Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to access Referred-By header field?

Bogdan-Andrei Iancu-2
Hi Chen-Che,

It should. Do you get any error in logs when trying to fetch the name ?

Regards,

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

On 13.05.2015 12:16, microx wrote:

> Hi Bogdan-Andrei,
>
> It works for $(hdr(Referred-By){nameaddr.uri}), but I get nothing from
> $(hdr(Referred-By){nameaddr.name}).
> The header field is like
> Referred-By:d3138e979-a266-4b31-bdc7-d9829cd1fa3a<sip:[hidden email]>
>
> >From the script transformations document, I expect to get the display name
> "d3138e979-a266-4b31-bdc7-d9829cd1fa3a" when using
> $(hdr(Referred-By){nameaddr.name}). Do I misunderstand anything or the
> example header field is not eligible? Thanks for any help.
>
> Best wishes,
> Chen-Che
>
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Is-there-any-way-to-access-Referred-By-header-field-tp7597066p7597080.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
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to access Referred-By header field?

Chen-Che Huang
Hi Bogdan-Andrei,

It's my bad that I read the log wrong. I taken the output of some REFER request containing only the uri but not display name as the output of the observed INVITE request containing the uri. OpenSISP did show the display name of Referred-By in the INVITE request. Sincerely sorry for this mistake.

Best regards,
Chen-Che
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to access Referred-By header field?

Bogdan-Andrei Iancu-2
Good to know it works :)

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

On 13.05.2015 13:22, microx wrote:

> Hi Bogdan-Andrei,
>
> It's my bad that I read the log wrong. I taken the output of some REFER
> request containing only the uri but not display name as the output of the
> observed INVITE request containing the uri. OpenSISP did show the display
> name of Referred-By in the INVITE request. Sincerely sorry for this mistake.
>
> Best regards,
> Chen-Che
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Is-there-any-way-to-access-Referred-By-header-field-tp7597066p7597082.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