Hello,this topic was questioned in at least another email and I forgot to answer. Actually save() can store the ruid in an xavp, one has to set the module parameter:
On 5/11/13 11:28 AM, Peter Dunkley wrote:
When you call unregister() without the new ruid parameter it parses the
current SIP message to get information needed to do the unregister().
There is no real SIP message associated with an event_route[] so
unregister() will not work.
The way to get this working is:
1) Use Git master so that unregister() with ruid is supported
2) Modify save() so that upon successful creation of new contact it copies
the ruid created by usrloc into the sip_msg.ruid variable for the current
SIP message. This means that on return from save() the $ruid PV will
work.
http://kamailio.org/docs/modules/stable/modules/registrar.html#idp1752184
But now that ruid is part of sip message structure, might be good to store it there, could be faster accessed.
Cheers,
DanielDaniel-Constantin Mierla - http://www.asipto.com
3) Use a hash-table to store $ruid, $tU, and $td indexed on $si:$sp
4) Then when event_route[websocket:closed] is called you can retrieve the
information from the hash table and call unregister(). Use the $tU and
$td you have cached to construct the unregister() URI parameter.
Regards,
Peter
On Mon, May 6, 2013 at 4:19 PM, Peter Dunkley
<peter.dunkley@crocodile-rcs.com> wrote:
Why we can't call unregister from event_route[websocket:closed]?and by the way, I found another problem when implementing the firstYou can't call unregister from that event_route.
method:
when calling unregister("location","websocket=>$si:$sp)" from the
event_route[websocket:closed] i get the following error:
*[parser/parse_to.c:879] : failed to parse To uri*
why it happens and how can i fix it ? (i think it is related to the
fact
we
call unregister from the event_route, but i'm not sure)
Is it because it is just not implemented yet or we need big changes to
implement it?
Thanks,
--
Iwan Budi Kusnanto
_______________________________________________
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
--
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
* http://asipto.com/u/katu *
_______________________________________________
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