[OpenSIPS-Users] Extracting a value from a header and assigning it to an AVP

Sam Govind govoiper at gmail.com
Wed Sep 28 07:41:43 CEST 2011


Print an xlog there, I think it's not hitting this condition !

On Wed, Sep 28, 2011 at 1:26 AM, Sven Schulz <svens at psu.edu> wrote:

>  Lets say for example, another SIP server sends my opensips server a
> header “P-Hint: 3”.
> I would like to extract the value (3) from that header (P-Hint:) and assign
> it to an AVP.
> How do I do this?
>
> I tried this but it doesn’t seem to work:
>
> if (is_present_hf("P-Hint")) {
>                 $avp(i:20)=$(hdr(P-Hint));
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110928/28e9dd2b/attachment.htm>


More information about the Users mailing list