[OpenSIPS-Users] Cachedb_local question

Travis Manson-Drake travism at simplybits.com
Tue Dec 8 18:28:48 CET 2015

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: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Jeff Pyle
Sent: Tuesday, December 8, 2015 9:50 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Cachedb_local question


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;
        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 <travism at simplybits.com<mailto:travism at simplybits.com>> 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

Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151208/a5b1f50f/attachment-0001.htm>

More information about the Users mailing list