<HTML>
<HEAD>
<TITLE>Extracting a value from a header and assigning it to an AVP</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Lets say for example, another SIP server sends my opensips server a header &#8220;P-Hint: 3&#8221;.<BR>
I would like to extract the value (3) from that header (P-Hint:) and assign it to an AVP.<BR>
How do I do this?<BR>
<BR>
I tried this but it doesn&#8217;t seem to work:<BR>
<BR>
if (is_present_hf(&quot;P-Hint&quot;)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$avp(i:20)=$(hdr(P-Hint));<BR>
</SPAN></FONT>
</BODY>
</HTML>