Steven, You can check the originate_disposition variable to get the result of the bridge, then based on that run the voicemail app or play the message. It is possible to do this in the dialplan, something like: <condition field="${originate_disposition}" data="USER_BUSY"> <action application="say" .. <anti-action application="voicemail" ... but I find any logic even slightly more complex than 'if this do that' in the XML is unreadable because of having to worry about require-nested, break and inline and reach for the lua: if session:ready() then originate_disposition = session:getVariable("originate_disposition") if originate_disposition == 'USER_BUSY' then play message else if originate_disposition == 'ALLOTTED_TIMEOUT' then do voicemail else session:consoleLog("INFO", "unhandled disposition" .. tostring(originate_disposition) .. "\n") .. do something sensible (like voicemail) end Martin. Martin Paterson, Pattersong Music Reduced orchestrations of G&S On Wed, 7 Apr 2021 at 06:41, Steven Schoch <schoch+freeswitch.org@xwin32.com> wrote:
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: "All operators are busy. Please call back in a few minutes or send email."
However, if the call rings for 20 seconds with no answer, it should transfer to voicemail.
My dialplan has: <action application="set" data="continue_on_fail=true"/> <action application="set" data="call_timeout=20"/> <action application="bridge" data="${group_call(operator@${domain_name})}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="???"/>
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.
Is this something that can be done in the dialplan? If not, do I use a script?
-- Steve _________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com