[OpenSIPS-Users] remove_hf does not remove header
Podrigal, Aron
aronp at guaranteedplus.com
Thu Feb 12 21:11:11 CET 2015
This is what I have
branch_route[RPID] {
if (is_present_hf("Remote-Party-ID")) {
xlog("removing Remote-Party-ID");
if(remove_hf("Remote-Party-ID"))
xlog("successfully removed");
else
xlog("not removed");
}
#msg_apply_changes();
if (is_present_hf("Remote-Party-ID"))
xlog("Remote-Party-ID is present");
}
And this logs
Feb 12 15:05:35 aron /usr/local/opensips_outbound/sbin/opensips[41305]:
removing Remote-Party-ID
Feb 12 15:05:35 aron /usr/local/opensips_outbound/sbin/opensips[41305]: not
removed
Feb 12 15:05:35 aron /usr/local/opensips_outbound/sbin/opensips[41305]:
Remote-Party-ID is present
And still shows the header in the capture
On Thu, Feb 12, 2015 at 2:57 PM, Podrigal, Aron <aronp at guaranteedplus.com>
wrote:
> I thought so, but it does show the header is not removed in my sip
> captures. I might be missing out something here. Are changes made to the
> sip messages in a branch route effected in the reply? I also tried removing
> the headers in other route[] but doesn't work either.
>
> On Thu, Feb 12, 2015 at 8:53 AM, Vlad Paiu <vladpaiu at opensips.org> wrote:
>
>> Hello,
>>
>> Due to OpenSIPS internals, the changes to the message are stored and only
>> applied when the message goes out - that's why removing a header and then
>> checking for it's existence will not appear consistent. But nonetheless,
>> the change you make in the script to the SIP message will get propagated.
>>
>> Best Regards,
>>
>> Vlad Paiu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> On 12.02.2015 11:22, Podrigal, Aron wrote:
>>
>> Hi,
>>
>>
>> I'm want to remove the Remote-Party_ID header, but it does not work.
>>
>> if (is_present_hf("Remote-Party-ID")) {
>> xlog("removing Remote-Party-ID");
>> remove_hf("Remote-Party-ID");
>> }
>>
>> if (is_present_hf("Remote-Party-ID"))
>> xlog("Remote-Party-ID is still present");
>>
>>
>> I tried this in several places, within a branch_route, main route. but
>> it does not work.
>> Any help? what am I doing wrong?
>>
>> Thanks
>>
>>
>> _______________________________________________
>> Users mailing listUsers at lists.opensips.orghttp://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/20150212/58874897/attachment.htm>
More information about the Users
mailing list