thanks for that I can now see how the append_to_reply works. But what I want to happen is a header to be set to the rewritehostport relay forwarded end
> ----- Original Message ----- > From: Razvan Crainea > Sent: 12/24/12 07:51 AM > To: [email protected] > Subject: Re: [OpenSIPS-Users] append_hf not working > > 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, [email protected] > >> 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 > >>>>> [email protected] > >>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >>>>> > > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
