No guarantees that this works, just a quick attempt:
You already have a Contact header in the reply (I believe), you just need to
manipulate it. (If not, you can use
avp_pushto("Contact/reply","avpair") to
create one)
Use subst to get:
Contact: <sip:username@ipaddress:port>;q=0.00;expires=3600.
Here is a regex I put together as an example:
/^Contact:(.*)sip:([a-zA-Z0-9_-]+)@([0-9.]+):([0-9]*)(.*)$/Contact:\1sip:\2@\3:\4>;q=0.00;expires=3600/
Good luck! ;-)
g-)
Java Rockx wrote:
Hi All.
I'm using ser-0.9.1 with auth_db enabled for user registration stuff.
I need to fake a REGISTRATION under certain circumstances. What I want
to do is sl_send_reply("200", "OK") when I get a REGISTER message
from
user 697.
I don't want to actually call the save("location") method because I do
not want to store 697 in the database or in ser's cache.
So how can I sl_send_reply() and include the <Contact> header which
the save() function would normally insert in to the response?
I'm thinking I could use AVPOPs somehow, but I'm not sure.
Can this be done?
Regards,
Paul
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers