Take a look at: https://opensips.org/docs/modules/3.4.x/b2b_logic.html#func_b2b_server_new https://opensips.org/docs/modules/3.4.x/b2b_logic.html#func_b2b_client_new Check the extra_hdrs and extra_hdr_bodies params.
-ovidiu On Thu, Feb 16, 2023 at 2:00 AM Eagle Cheung <[email protected]> wrote: > > 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:[email protected]"); > # !!!!!!!!!!!!!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 > > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
