How to remove custom header after adding one
Hi, if I use append_hf() for adding my custom header to initial request, how I can remove this header later ? What I'm doing: 1) initial request: remove RPID header with remove_hf 2) initial request: add custom RPID header append_hf 3) after rerouting: in failure_route remove RPID header remove_hf 4) after rerouting: in failure_route add custom RPID header with append_hf The result of this, are 2 RPID headers, because remove_hf did not catch RPID header added in step 2, but I think the original one that was removed already in step 1. Thanks, Mino
Hello you may try to do the remove/add operations in each branch_route Regards Javi -----Original Message----- From: Mino Haluz <mino.haluz@gmail.com> Sender: sr-users-bounces@lists.sip-router.org Date: Sun, 24 Feb 2013 19:06:29 To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<sr-users@lists.sip-router.org> Reply-To: "SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) - Users Mailing List" <sr-users@lists.sip-router.org> Subject: [SR-Users] How to remove custom header after adding one _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello, I can see two variants: 1. Move the append_hf in the branch route so you can have a per branch decision 2. call mg_apply_change() from textops to immediately apply the changes after append_hf() http://kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.msg_ap... You can call remove_hf() on the changed message. Cheers, Marius On Sun, Feb 24, 2013 at 6:19 PM, Javi Gallart <jgallart@systemonenoc.com>wrote:
Hello
you may try to do the remove/add operations in each branch_route
Regards
Javi -----Original Message----- From: Mino Haluz <mino.haluz@gmail.com> Sender: sr-users-bounces@lists.sip-router.org Date: Sun, 24 Feb 2013 19:06:29 To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<sr-users@lists.sip-router.org> Reply-To: "SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) - Users Mailing List" <sr-users@lists.sip-router.org> Subject: [SR-Users] How to remove custom header after adding one
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
msg_apply_changes made a little mess in every SIP message, so I am trying to avoid it at all cost.. rpid manipulation in branch route worked like a charm, thanks. On Sun, Feb 24, 2013 at 7:40 PM, Marius Zbihlei <mariuszbi@gmail.com> wrote:
Hello,
I can see two variants: 1. Move the append_hf in the branch route so you can have a per branch decision 2. call mg_apply_change() from textops to immediately apply the changes after append_hf()
http://kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.msg_ap...
You can call remove_hf() on the changed message.
Cheers, Marius
On Sun, Feb 24, 2013 at 6:19 PM, Javi Gallart <jgallart@systemonenoc.com>wrote:
Hello
you may try to do the remove/add operations in each branch_route
Regards
Javi -----Original Message----- From: Mino Haluz <mino.haluz@gmail.com> Sender: sr-users-bounces@lists.sip-router.org Date: Sun, 24 Feb 2013 19:06:29 To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<sr-users@lists.sip-router.org> Reply-To: "SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) - Users Mailing List" <sr-users@lists.sip-router.org> Subject: [SR-Users] How to remove custom header after adding one
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
participants (3)
-
Javi Gallart -
Marius Zbihlei -
Mino Haluz