Hello,
to rewrite the r-uri you can use the function for setting PV value:
sr.pv.sets("$ru", "_here_is_new_uri_");
To add contact headers to reply, you should use:
sr.hdr.append_to_reply("Contact: <_here_is_your_uri_>\r\n");
Cheers, Daniel
On 6/20/11 3:23 PM, Sharif Tanvir Rahman wrote:
Hello,
We plan to use Kamailio as redirect server. Corresponding contact list is to be fetched by a Lua script from DB.
The problem is about calling the required 'rewriteuri' function:
- From lua script. both 'sr.rewriteuri()' and 'sr.modf("rewriteuri", ...)" fails to write the 'contact' field.
- I tried an alternative way; pushing the value from lua (e.g. sr.pv.sets("contact", "sip:...")) and got the value in the Kamailio.cfg ($var(contact)). But can't call the rewriteuri function with this variable's value as argument. This seems to be a general problem of calling a function from .cfg with a variable's value as parameter.
Any help much appreciated.
-- Sharif
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