VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
schoch+freeswitch.org ... Guest
|
Posted: Wed Apr 07, 2021 1:21 am Post subject: [Freeswitch-users] Send call to different place on busy vs n |
|
|
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 |
|
Back to top |
|
|
don.dawson at joon.us Guest
|
Posted: Wed Apr 07, 2021 11:46 am Post subject: [Freeswitch-users] Send call to different place on busy vs n |
|
|
Query the sip_dialogs database table to see if all are on calls.
On Wed, Apr 7, 2021, 12:41 AM Steven Schoch <schoch+freeswitch.org@xwin32.com ([email]schoch%2Bfreeswitch.org@xwin32.com[/email])> wrote:
|
|
Back to top |
|
|
martin at pattersong.c... Guest
|
Posted: Wed Apr 07, 2021 11:53 am Post subject: [Freeswitch-users] Send call to different place on busy vs n |
|
|
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:
Quote: |
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
|
_________________________________________________________________________
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 |
|
Back to top |
|
|
schoch+freeswitch.org ... Guest
|
Posted: Fri Apr 09, 2021 2:46 pm Post subject: [Freeswitch-users] Send call to different place on busy vs n |
|
|
As I understand the XML dialplan, when a matching condition is found, it builds up a list of actions and executes them in order.
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}:
Like:
... Set timeouts ...
<action application="bridge" data="${group_call(operator@${domain_name})}"/>
<action application="transfer" data="front_desk_no_answer">
</extension>
<extension name="front_desk_no_answer">
<condition field="destination_number" expression="^front_desk_no_answer$"/>
<action application="answer"/>
<action application="sleep" data="500"/>
<condition field="${originate_disposition}" data="USER_BUSY">
<action application="say" ..
<anti-action application="voicemail" ...
</condition>
</extension>
Does that look like what I need?
--
Steve
On Wed, Apr 7, 2021 at 9:18 AM Martin Paterson <martin@pattersong.co.uk (martin@pattersong.co.uk)> wrote:
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|