Kamailio module nathelper
Overview
Kamailio 모듈 nathelper 내용 정리.
Functions
set_contact_alias([trim])
Adds an ";alias=ip~port~transport" parameter to the contact URI containing the received ip, port, and transport protocol. The new contact URI is immediately visible to other modules in the way the fix_nated_contact() does it.
- trim: by default, set_contact_alias() will not detect and trim an already existing alias parameter. If this optional parameter is set to "1", set_contact_alias() will trim the existing alias before adding a new one.
... if (!is_present_hf("Record-Route")) { if (!set_contact_alias()) { xlog("L_ERR", "Error in aliasing contact $ct\n"); send_reply("400", "Bad request"); exit; }; }; ...