[OpenSIPS-Users] $ai transformation

Răzvan Crainea razvan at opensips.org
Mon Nov 14 09:02:37 CET 2016


Hi, Ehrny!

Yes, you can transform the P-Asserted-Identity header as you wish, by 
dropping the existing one and creating a new one. Use the remove_hf()[1] 
and append_hf()[2] headers for that, i.e.:

if (is_present_hf("P-Asserted-Identity")) {
     remove_hf("P-Asserted-Identity");
     $avp(rpid) = "new-header";
     append_hf("P-Asserted-Identity: $avp(rpid) 
<sip:$avp(rpid)@opensips.org>\r\n");
}

[1] http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id293937
[2] http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id249696

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 11/13/2016 08:55 PM, Ehrny wrote:
>
> Hello team,
>
> I’m trying to follow my carrier’s request to transform 
> P-Asserted-Identity header.
>
> Is there any possibilities to do that on the fly with opensips (v2.2.2)?
>
> Yet another project assume to add the redirecting number even if it’s 
> not exists. Would it be possible to add it in the route?
>
> Your help is really appreciated,
>
> Best Regards,
>
> Ehrny
>
>
>
> _______________________________________________
> 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/20161114/e70596e0/attachment.htm>


More information about the Users mailing list