[Freeswitch-users] Dialplan condition to test if SIP client is registered
msc at freeswitch.org
Sat May 5 01:25:47 MSD 2012
Thanks for the extra info. I had forgotten that we added the
sofia_contact(*/user at domain) syntax to let you figure out which profile
On Fri, May 4, 2012 at 11:24 AM, Dave R. Kompel <drk at drkngs.net> wrote:
> Thaddeus & Michael:
> As Michael stated there are many ways to fail over if a phone/user isn't
> registered. However sometimes you may want to actually check the
> registration yourself. Or even do something based on a contact being
> registered, that has nothing to do with the actual one you are calling.
> I normally use the API: sofia_contact([profile/]<user>@domain). It returns
> the channel string you would pass to bridge. If the user isn't registered
> it returns "error/<the error>" so it would use the logical "error" endpoint
> to handle the right treatment. If the regex "^error" match is true, then
> the user isn't registered.
> The extra thing you get from that API call is that you can use a "*" for
> the profile, and find out which SIP profile the user is registered in. For
> example in the case of an Android client, that may be using WIFI or 3G, and
> you have an external and internal profile they can register, you can tell
> if the user is "on site" or "off site" by the profile it returns, and can
> be more restrictive of the calls you send to someone when they're out of
> the office.
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users