<div dir="ltr">This is my dialplan so far, where I want to add this functionality (<a href="http://pastebin.com/k1hffPBp">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="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>