Hi all,
I need to modify the host part of a contact header. I'm trying something like:
route {
.....
if (remove_hf("Contact")){
if (insert_hf("Contact: rn", "Contact"))
xlog("Contact modified");
}
if (!t_relay("YYY.YYY.YYY.YYY","5060")) {
sl_reply_error();
}
......
}
When i look SIP DUMP on YYY.YYY.YYY.YYY side i see older Contact field.
I try subst_hf with regexp, subst and simply remove Contact, all this does not work.
What i am doing wrong?
Hello,
do you see the xlog message "Contact modified" in syslog? Maybe that part of config is not executed due to other conditions. You can enable cfgtrace for debugger module and see what actions are executed from configuration file.
Cheers, Daniel
On 25/05/15 10:04, Зуев Михаил wrote:
Hi all,
I need to modify the host part of a contact header. I'm trying something like:
route {
.....
if (remove_hf("Contact")){
if (insert_hf("Contact: sip:XXX.XXX.XXX.XXX:5060\r\n", "Contact"))
xlog("Contact modified");
}
if (!t_relay("YYY.YYY.YYY.YYY","5060")) {
sl_reply_error();
}
......
}
When i look SIP DUMP on YYY.YYY.YYY.YYY side i see older Contact field.
I try subst_hf with regexp, subst and simply remove Contact, all this does not work.
What i am doing wrong?
-- С уважением Зуев Михаил
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
Did you find the solution to this ? Do you need to do msg_apply_changes ?
Rizwan Khan
On Mon, May 25, 2015 at 1:04 PM, Зуев Михаил z.m.c@list.ru wrote:
Hi all,
I need to modify the host part of a contact header. I'm trying something like:
route {
.....
if (remove_hf("Contact")){
if (insert_hf("Contact: sip:XXX.XXX.XXX.XXX:5060\r\n", "Contact"))
xlog("Contact modified");
}
if (!t_relay("YYY.YYY.YYY.YYY","5060")) {
sl_reply_error();
}
......
}
When i look SIP DUMP on YYY.YYY.YYY.YYY side i see older Contact field.
I try subst_hf with regexp, subst and simply remove Contact, all this does not work.
What i am doing wrong?
--
С уважением Зуев Михаил
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