<div dir="ltr"><div>As I understand the XML dialplan, when a matching condition is found, it builds up a list of actions and executes them in order.</div><div>So I assume my list of actions would be to bridge to the phones, then transfer to another extension which would look at the ${originate_dispostion}:</div><div><br></div><div>Like:</div><div>... Set timeouts ...</div><div><div>  <action application="bridge" data="${group_call(operator@${domain_name})}"/></div>  <action application="transfer" data="front_desk_no_answer"></div><div></extension></div><div><br></div><div><extension name="front_desk_no_answer"></div><div>  <condition field="destination_number" expression="^front_desk_no_answer$"/></div><div>    <action application="answer"/></div><div>    <action application="sleep" data="500"/></div><div>  <condition field="${originate_disposition}" data="USER_BUSY"><br>      <action application="say" ..<br>      <anti-action application="voicemail" ...<br></div><div>  </condition></div><div></extension></div><div dir="ltr"><br></div>Does that look like what I need?<div><br></div><div>-- </div><div>Steve</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 7, 2021 at 9:18 AM Martin Paterson <<a href="mailto:martin@pattersong.co.uk">martin@pattersong.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Steven,<br>
<br>
You can check the originate_disposition variable to get the result of<br>
the bridge, then based on that run the voicemail app or play the<br>
message. It is possible to do this in the dialplan, something like:<br>
<condition field="${originate_disposition}" data="USER_BUSY"><br>
  <action application="say" ..<br>
  <anti-action application="voicemail" ...<br>
<br>
but I find any logic even slightly more complex than 'if this do that'<br>
in the XML is unreadable because of having to worry about<br>
require-nested, break and inline and reach for the lua:<br>
if session:ready() then<br>
  originate_disposition = session:getVariable("originate_disposition")<br>
  if originate_disposition == 'USER_BUSY' then<br>
play message<br>
  else if originate_disposition == 'ALLOTTED_TIMEOUT' then<br>
do voicemail<br>
  else<br>
    session:consoleLog("INFO", "unhandled disposition" ..<br>
tostring(originate_disposition) .. "\n")<br>
    .. do something sensible (like voicemail)<br>
end<br>
<br>
Martin.<br>
<br>
Martin Paterson, Pattersong Music<br>
Reduced orchestrations of G&S<br>
<br>
On Wed, 7 Apr 2021 at 06:41, Steven Schoch<br>
<<a href="mailto:schoch%2Bfreeswitch.org@xwin32.com" target="_blank">schoch+freeswitch.org@xwin32.com</a>> wrote:<br>
><br>
> I'm setting up a pbx. Incoming calls to the main number will ring on 3 "front desk" phones. If all phones are busy, I want to play a message saying:<br>
> "All operators are busy. Please call back in a few minutes or send email."<br>
><br>
> However, if the call rings for 20 seconds with no answer, it should transfer to voicemail.<br>
><br>
> My dialplan has:<br>
> <action application="set" data="continue_on_fail=true"/><br>
> <action application="set" data="call_timeout=20"/><br>
> <action application="bridge" data="${group_call(operator@${domain_name})}"/><br>
> <action application="answer"/><br>
> <action application="sleep" data="1000"/><br>
> <action application="???"/><br>
><br>
> The last application should be to do one thing (play a message) if the bridge failed because all phones were busy, and do something else (transfer to voicemail) if there was no answer after 20 seconds.<br>
><br>
> Is this something that can be done in the dialplan? If not, do I use a script?<br>
><br>
> --<br>
> Steve<br>
> _________________________________________________________________________<br>
><br>
> The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
> Build your next product on our scalable cloud platform.<br>
><br>
> Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
><br>
> Professional FreeSWITCH Services<br>
> <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
> <a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
> <a href="https://cluecon.com" rel="noreferrer" target="_blank">https://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" 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="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://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" 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="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div></div></div>