[OpenSIPS-Users] append_hf not working
Razvan Crainea
razvan at opensips.org
Mon Dec 24 08:51:15 CET 2012
Hi, Peter!
Using the 'append_hf' function, the header is inserted in the Request
message, not in the Reply. If you want to append a header to the Reply
message, you have to use the 'append_to_reply' function [1].
[1] http://www.opensips.org/html/docs/modules/1.8.x/sipmsgops#id249124
Regards,
Ra(zvan
On 12/23/2012 10:52 PM, peter ness wrote:
> Hi
>
> I have done the minimal code for testing.
>
>
> if (method=="INVITE") {
>
> append_hf("X-TEST: test test test\r\n");
>
> sl_send_reply("181","blah blah");
>
> rewritehostport( "xxx.xxx.xxx.xxx:5080" );
> if (!t_relay()) {
> sl_reply_error();
> return;
> }
>
> }
>
>
> I see the "blah blah" in the header but no sign of "X-TEST: test test test"
> Could it be that I am missing a required module or parameter set up?
>
>
> thanks
>
>> ----- Original Message -----
>> From: Bogdan-Andrei Iancu
>> Sent: 12/19/12 07:31 PM
>> To: peter ness, users at lists.opensips.org
>> Subject: Re: [OpenSIPS-Users] append_hf not working
>>
>> Hi,
>>
>> and are you sure the script processing is getting to that append_hf() ?
>> put an xlog("before append\n"); before the append_hf line to check.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>>
>> On 12/19/2012 05:59 PM, peter ness wrote:
>>> Hi Bogdan
>>>
>>> I am setting it like this
>>>
>>> append_hf("X-ACCOUNT: $avp(accnum)\r\n");
>>>
>>> There is no effect on the sip headers
>>>
>>> Regards
>>>
>>> Abdul
>>>
>>>> ----- Original Message -----
>>>> From: Bogdan-Andrei Iancu
>>>> Sent: 12/19/12 05:36 AM
>>>> To: OpenSIPS users mailling list
>>>> Subject: Re: [OpenSIPS-Users] append_hf not working
>>>>
>>>> Hi Peter,
>>>>
>>>> What are you trying to do and how exactly fails (error, nothing happens,
>>>> wrong change, etc) ?
>>>>
>>>> Regarding the note you find, that's about 1.8 and higher versions.
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Founder and Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>>
>>>> On 12/19/2012 04:06 AM, peter ness wrote:
>>>>> I am trying to work out why append_hf is not working for me. I am using version 1.7.0
>>>>>
>>>>> I have seen this note on the doc
>>>>> Note: all SIP-aware functions like insert_hf, append_hf or codec operations have been moved to the sipmsgops module.
>>>>>
>>>>> However I can't see sipmsgops in the module src folder.? Is this info relevent to my version?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>
> _______________________________________________
> 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/20121224/acd6c18a/attachment-0001.htm>
More information about the Users
mailing list