[Kamailio-Users] append_hf

Iñaki Baz Castillo ibc at aliax.net
Mon Nov 24 09:46:07 CET 2008


El Lunes, 24 de Noviembre de 2008, Matteo D'Amato escribió:
> Hello,
> 	 I'm trying to append trunk group information to my Contact header
> so I'm, using append_hf as follows
>
>
>     append_hf("tgrp=30001 \r\n", "Contact");
>
>
> but it seems to go on the second line. How do I remove the line feed?
>
>
> Max-Forwards: 69.
> Contact: <sip:1001 at 192.168.1.2:44114>.
> tgrp=DMS19 .

1.3.18.  append_hf(txt, hdr) 
 Appends 'txt' as header after first 'hdr' header field.


I don't understand why you think that "append_hf" can be used to add text in 
an exisintg header. It just creates a new header (in your case an invalid 
header "tgrp=DMS19") after the *first* Contact header. Nothing to do with 
your aim.




-- 
Iñaki Baz Castillo




More information about the Users mailing list