[OpenSIPS-Users] b2b_logic - add/modifiy custom header on script_req_route/script_reply_route

Eagle Cheung feiyingcheung at 126.com
Mon Jan 30 10:25:05 UTC 2023


Hi,

I want to know how to add/modifiy custom header on script_req_route/script_reply_route.


cfg file statement
------------------------------------------
loadmodule "b2b_logic.so"
modparam("b2b_logic", "script_req_route", "b2b_request")
modparam("b2b_logic", "script_reply_route", "b2b_reply")
modparam("b2b_logic", "custom_headers", "P-Local-Header")


rotue {
...
if (is_method("INVITE") && !has_totag()) {
b2b_server_new("caller");
b2b_client_new("media", "sip:1234 at 192.168.216.1");
# !!!!!!!!!!!!!work fine, add header succeed.
append_hf("P-Local-Header: test1\r\n");
b2b_init_request("base");
exit;
}
...

}


route[b2b_request] {
# !!!!!!!!!!!!!!!!dosen't work, could not to add.
append_hf("P-Local-Header: test2\r\n");
b2b_pass_request();
}


route[b2b_reply] {
# !!!!!!!!!!!!!!dosen't work, could not to add.
append_hf("P-Local-Header: test2\r\n");
b2b_handle_reply();
}
--------------------------------------
looking forward your reply!
BR
Sam Cheung







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230130/aecf52c6/attachment-0001.html>


More information about the Users mailing list