<div dir="ltr">Sounds like you want to check this result for truthiness: <a href="https://wiki.freeswitch.org/wiki/Mod_commands#user_exists">https://wiki.freeswitch.org/wiki/Mod_commands#user_exists</a><div><br></div><div>BTW export by default sets on both channels, so you don't need a SET and an EXPORT.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">-Avi Marcus<br>BestFone</div></div></div>
<br><div class="gmail_quote">On Tue, Sep 8, 2015 at 12:19 PM, Michael Nielsen <span dir="ltr"><<a href="mailto:mic.niel84@gmail.com" target="_blank">mic.niel84@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is my dialplan so far, where I want to add this functionality (<a href="http://pastebin.com/k1hffPBp" target="_blank">http://pastebin.com/k1hffPBp</a>):<div><br></div><div><div> <condition field="destination_number" expression="^(\+\d{3,20})$"></div><div> <action application="set" data="dialed_number=$1" inline="true"/></div><div> <action application="export" data="dialed_number=$1" inline="true"/></div><div> </condition></div><div> <condition field="destination_number" expression="^(\d{3,20})$"></div><div> <action application="set" data="dialed_number=${country_code}$1" inline="true"/></div><div> <action application="export" data="dialed_number=${country_code}$1" inline="true"/></div><div> </condition></div><div> <condition field="${dialed_number}" IF-USER-EXISTS></div><div> <action application="set" data="call_timeout=20"/></div><div> <action application="set" data="hangup_after_bridge=true"/></div><div> <action application="set" data="continue_on_fail=true"/></div><div> <action application="bridge" data="user/${dialed_number}@${domain_name}"/></div><div> <action application="answer"/></div><div> <action application="sleep" data="1000"/></div><div> <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_number}"/></div><div> </condition> </div><div> <condition field="${dialed_number}" IF-USER-DO-NOT-EXISTS></div><div> <action application="set" data="effective_caller_id_number=${effective_caller_id_number}"/></div><div> <action application="set" data="effective_caller_id_name=${effective_caller_id_number}"/></div><div> <action application="bridge" data="sofia/gateway/pstn-outbound/${dialed_number}"/></div><div> </condition></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 9:52 AM, Michael Nielsen <span dir="ltr"><<a href="mailto:mic.niel84@gmail.com" target="_blank">mic.niel84@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I would like to the following:<div><br></div><div><condition IF-USER-EXISTS></div><div></condition></div><div><condition IF-USER-DO-NOT-EXISTS></div><div></condition></div><div><br></div><div>I'm not able to check on regexp, as my user ID's match +44-12345678...</div><div>And I would like to do one thing if the user exists and otherwise route to my PSTN gateway.</div><div><br></div><div>I've tried to just use bridge with both local routing and PSTN calls, but then I try to call my PSTN everytime I call local users.</div></div>
</blockquote></div><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" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div>