<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 “P-Hint: 3”.<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’t seem to work:<BR>
<BR>
if (is_present_hf("P-Hint")) {<BR>
$avp(i:20)=$(hdr(P-Hint));<BR>
</SPAN></FONT>
</BODY>
</HTML>