Hey Jeff,

I’m sorry I should have clarified if my first email.

OpenSips isn’t actually handling the registration request’s in my case. It’s 
simply relaying those to an Asterisk server. Then relaying traffic from 
asterisk to the UAC. (a middle man)

I was thinking of doing an “If(method is(blah)) do something cool” but the 
unregister asterisk gives back is specific to asterisk and not SIP =(

I think I might have a work around, but its not the cleanest way of doing 
things.





From: [email protected] 
[mailto:[email protected]] On Behalf Of Jeff Pyle
Sent: Tuesday, December 8, 2015 9:50 AM
To: OpenSIPS users mailling list <[email protected]>
Subject: Re: [OpenSIPS-Users] Cachedb_local question

Travis,

You don't really have to "tell" OpenSIPS if a client is unregistered.  In the 
simple case, you'll do a lookup() within your script, and it will return [1] 
with an error code of -1 if the contact is not registered.

If you want to run your logic when a client goes unregistered, rather than 
detecting it during the script execution, you can use an event route [2].  
Here's a simple one I use to throw a syslog entry for such an occasion:

event_route[E_UL_AOR_DELETE] {
        $var(aor) = 0;
        fetch_event_params("aor=$var(aor)");
        xlog("L_NOTICE", "** $var(aor) is DOWN\n");
}

Hopefully that's helpful.

  [1] http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294366
  [2] http://www.opensips.org/html/docs/modules/2.1.x/usrloc.html#id295250


- Jeff


On Tue, Dec 8, 2015 at 11:07 AM, Travis Manson-Drake 
<[email protected]<mailto:[email protected]>> wrote:
Hello everyone!
Hope you’re all doing well.

Does anyone know of a way I might tell opensips when a UAC becomes un 
registered? Or what value I might tell it to parse to see if that UAC is 
unregistered?

Really what I’m trying to do is have an if statement that preforms some logic 
if the UAC reports back unregistered or unavail.

Any input is greatly appreciated!

Happy Holidays!


Travis Manson-Drake
Voice Systems Analyst L1
Simply Bits, LLC
Now You’re Thinkin’ Smart!
5225 N. Sabino Canyon Road
Tucson, AZ 85750
Phone: 520-545-0311
Fax: 520-545-7252
Support Hotline: 5205450333
www.simplybits.com<http://www.simplybits.com/>


_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to