[Freeswitch-users] Is there any way to loop a dialplan?

Mark Sobkow m.sobkow at marketelsystems.com
Mon Feb 22 14:06:12 PST 2010


Apparently you can't have that first call waiting for the FIFO to be 
picked up.  It'll bridge a FIFO, but the remainder of the dial plan 
never executes. *sigh*

What is INTENDED to happen is that the operator dials in to extension 
6000 and enters their PIN, then gets put in the FIFO.  The idea is that 
after they've handled a call from the FIFO, the dialplan for extension 
6000 resumes, collects the call result, and then enters the looping 
dialplan for extension 6001, which just keeps putting them back in the 
queue, collecting a result code, and repeating ad-nauseum.

I've also tried calling a loopback extension so I could properly bridge 
the call, thinking that would respect the set hangup_after_bridge=false, 
but that doesn't work either.

I may be frustrated, but I'm having fun...

<extension name=\"TestBridging\">
\t<condition field=\"destination_number\" expression=\"^6000$\">
\t\t<action application=\"answer\" />
\t\t<action application=\"play_and_get_digits\" data=\"4 4 1 5000 # 
/opt/freeswitch/sounds/en/us/callie/conference/8000/conf-pin.wav 
/opt/freeswitch/sounds/en/us/callie/conference/8000/conf-bad-pin.wav 
operator_pin \\d+\" />
\t\t<action application=\"log\" data=\"INFO operator_pin is 
${operator_pin}\" />
\t\t<action application=\"log\" data=\"INFO Queing operator to fifo\" />
\t\t<action application=\"set\" data=\"hangup_after_bridge=false\" />
\t\t<action application=\"bridge\" data=\"loopback/6003\" />
\t\t<action application=\"log\" data=\"INFO Handled first call\" />
\t\t<action application=\"play_and_get_digits\" data=\"1 2 1 5000 # 
/opt/freeswitch/sounds/en/us/callie/conference/8000/conf-pin.wav 
/opt/freeswitch/sounds/en/us/callie/conference/8000/conf-bad-pin.wav 
call_result \\d+\" />
\t\t<action application=\"log\" data=\"INFO call_result is 
${call_result}\" />
\t\t<action application=\"set\" data=\"hangup_after_bridge=true\" />
\t\t<action application=\"bridge\" data=\"loopback/6001\" />
\t</condition>
</extension>
<extension name=\"TestLoop\">
\t<condition field=\"destination_number\" expression=\"^6001$\">
\t\t<action application=\"answer\" />
\t\t<action application=\"log\" data=\"INFO Requeing operator to fifo\" />
\t\t<action application=\"set\" data=\"hangup_after_bridge=false\" />
\t\t<action application=\"bridge\" data=\"loopback/6003\" />
\t\t<action application=\"log\" data=\"INFO Handled another call\" />
\t\t<action application=\"play_and_get_digits\" data=\"1 2 1 5000 # 
/opt/freeswitch/sounds/en/us/callie/conference/8000/conf-pin.wav 
/opt/freeswitch/sounds/en/us/callie/conference/8000/conf-bad-pin.wav 
call_result \\d+\" />
\t\t<action application=\"log\" data=\"INFO call_result is 
${call_result}\" />
\t\t<action application=\"set\" data=\"hangup_after_bridge=true\" />
\t\t<action application=\"bridge\" data=\"loopback/6001\" />
\t</condition>
</extension>
<extension name=\"TestCallIn\">
\t<condition field=\"destination_number\" expression=\"^6002$\">
\t\t<action application=\"answer\" />
\t\t<action application=\"log\" data=\"INFO Pulling operator\" />
\t\t<action application=\"set\" data=\"hangup_after_bridge=true\" />
\t\t<action application=\"fifo\" data=\"6003@${domain_name} out nowait\" />
\t\t<action application=\"log\" data=\"INFO Done call\" />
\t</condition>
</extension>
<extension name=\"park\">
\t<condition field=\"destination_number\" expression=\"^6003$\">
\t\t<action application=\"fifo\" data=\"6003@${domain_name} in\" />
\t</condition>
</extension>
<extension name=\"unpark\">
\t<condition field=\"destination_number\" expression=\"^6004$\">
\t\t<action application=\"answer\" />
\t\t<action application=\"fifo\" data=\"6003@${domain_name} out nowait\" />
\t</condition>
</extension>

-- 
Mark Sobkow
Senior Developer
MarkeTel Multi-Line Dialing Systems LTD.
428 Victoria Ave
Regina, SK S4N-0P6
Toll-Free: 800-289-8616-X533
Local: 306-359-6893-X533
Fax: 306-359-6879
Email: m.sobkow at marketelsystems.com
Web: http://www.marketelsystems.com 





More information about the FreeSWITCH-users mailing list