What about continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION<br><br><div class="gmail_quote">2012/5/5 Thaddeus Hogan <span dir="ltr"><<a href="mailto:thaddeus@thogan.com" target="_blank">thaddeus@thogan.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Thanks for the information. I got something working today using
sofia_contact, but am having issues with SIP registrations surviving
for a good deal of time after the user has disconnected from the
network.<br>
<br>
Basically, the SIP client is no longer available when the user
leaves the building and is disconnected from Wifi. When this
happens, sofia_contact continues to return a value indicating the
client is registered for quite some time.<br>
<br>
I found the command "sofia profile <profile_name> check_sync",
which I used successfully to invalidate registrations for users that
have disconnected from the network. But I could not figure out how
to make this execute before my "sofia_contact" condition in the
dialplan. I am assuming this is because I need it to run before the
ROUTING stage, and I can only get it to run in the EXECUTE stage.<br>
<br>
So I have a couple questions. Is check_sync quick enough to run on
every inbound call prior to making routing decisions? Also,
according to the comments here
<a href="http://wiki.freeswitch.org/wiki/FS_weekly_2011_06_29" target="_blank">http://wiki.freeswitch.org/wiki/FS_weekly_2011_06_29</a> I should be
able to give check_sync a user@domain argument, but this does not
seem to work.<br>
<br>
Are there other ways to determine if a bridge failed because a
user's SIP client was not reachable, versus a timeout or call
rejection?<br>
<br>
Thanks for helping with this!<span class="HOEnZb"><font color="#888888"><br>
<br>
-- Thaddeus</font></span><div><div class="h5"><br>
<br>
On 5/4/2012 1:24 PM, Dave R. Kompel wrote:
<blockquote type="cite">
<div>Thaddeus & Michael:</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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. </div>
<div> </div>
<div>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.</div>
<div> </div>
<div>--Dave</div>
<br>
<blockquote style="BORDER-LEFT:#0000ff 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px">
<hr>
<b>From:</b> Michael Collins [<a href="mailto:msc@freeswitch.org" target="_blank">mailto:msc@freeswitch.org</a>]<br>
<b>To:</b> FreeSWITCH Users Help
[<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">mailto:freeswitch-users@lists.freeswitch.org</a>]<br>
<b>Sent:</b> Fri, 04 May 2012 10:34:31 -0700<br>
<b>Subject:</b> Re: [Freeswitch-users] Dialplan condition to
test if SIP client is registered<br>
<br>
Hi Thaddeus,<br>
<br>
You definitely have several options here. While you could use
the sofia_contact API, I'm wondering if perhaps you could let
the dialplan and the bridge app do the work for you.<br>
<br>
You could bridge directly to the Android user and then if it
fails it could then continue in the dialplan and ring the mobile
number. This is covered briefly on the <a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge#Implementing_Failover" target="_blank">wiki</a>,
however <shameless_plug>it is covered very nicely in the
new FreeSWITCH Cookbook</shameless_plug> in chapter 1.<br>
<br>
Try out the basic failover (pipe-separated list of endpoints)
and if that doesn't work let us know. Maybe you could hop on IRC
and talk live with other community members. Of course, it can't
hurt to raise your karma by getting the FreeSWITCH books. :)
(See <a href="http://freeswitch.org/" target="_blank">freeswitch.org</a>,
upper left corner.)<br>
<br>
Thanks,<br>
Michael<br>
<br>
<div class="gmail_quote">On Fri, May 4, 2012 at 10:10 AM, <a href="mailto:thaddeus@thogan.com" target="_blank">thaddeus@thogan.com</a>
<span><<a href="mailto:thaddeus@thogan.com" target="_blank">thaddeus@thogan.com</a>></span>
wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">I was
wondering if there is a way to tell if a SIP client is
registered with a dialplan condition? Or maybe a better way
to accomplish the following?:<br>
<br>
The users' cell phones (Android) are running a SIP client
and connect to freeswitch via Wifi when in the office. I
want calls destined for a given user to ring only their
extension if they are connected via SIP, and ring only their
mobile number when they are not connected.<br>
<br>
Currently I just take every incoming call and bridge it back
out to their mobile number, but 95% of the time these users
are on the Wifi network, and I could just pass the call to
their phones via SIP.<br>
<br>
I have tested hunt groups but the callers hear ringing for
far too long. Ring groups don't work because it is confusing
when the user simultaneously receiving the same call via SIP
and mobile on the same phone.<br>
<br>
Thanks in advance for any insights and help!<span><font color="#888888"><br>
<br>
-- Thaddeus </font></span><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
<div> </div>
<div> </div>
<br>
<fieldset></fieldset>
<br>
<pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>