The latest GIT repository includes a new config function – msg_apply_changes() – exported by module textops from modules_k folder. Once this function is used, all changes done up to that point are applied and further processing within config will see the new message content.
The new function can be used only in request route for now. Be carefully when using it, since it changes the expectation you had so far of always working on initially received SIP message. Once the function is used, initial content is lost forever. As it builds a new buffer and re-parses, it is not very recommended to use it extensively.
Example of usage:
# msg buffer has a new content
# will get always here
Readme of the module:
http://sip-router.org/docbook/sip-router/branch/master/modules_k/textops/textops.htmlThe functionality will be part of upcoming Kamailio (OpenSER) 3.0 release.
Post a Comment