[Users] Editing headers

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Sep 7 16:25:40 CEST 2005


Hi Martin,

maybe that's the easiest way as number of cfg line, but is a totaly 
unsecure (second search may hit different parts of the message) and slow 
(as regexps):

you may also try:
    avp_write("$hdr[P-Asserted-Identity]","i:10"); #get body
    avp_printf("i:10","<sip:$avp(i:10)@sip.domian.com>"); # compose new body
    remove_hf("P-Asserted-Identity"); #remove org. hdr
    avp_pushto("$P-Asserted-Identity/request","i:10"); # set new hdr

regards,
bogdan

Martin Kjeldsen wrote:

> Hi
>
> Can I use Textops, to alter headers in a invite message?
> This is what I'm trying to do!
>
>        search_append("P-Asserted-Identity: ", "<sip:");
>        search_append(" [0-9]\{8\}", "@sip.domian.com>");
>
> Is this at all possible or should I try some other way?
> The data I want to add to the header is static.
>
> I'm using OpenSER 0.9.5
>
> Thanks in advance
>
> Martin
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>





More information about the sr-users mailing list