wiki:freeswitch-mexcla-admin

Version 5 (modified by Jamie McClelland, 6 years ago) (diff)

--

Freeswitch Mexcla Admin

mexcla is installed on paul.mayfirst.org (the same server hosting our freeswitch installation).

It is a python script that is available via git://git.mayfirst.org/mfpl/mexcla

It runs as a daemon on 127.0.0.1, listens on ports 50,000 - 50,999. It's controlled by runit and runs as the mexcla user.

It depends on the python-twisted package (available in Debian) and the eventsocket python freeswitch library (http://github.com/fiorix/eventsocket).

On paul, the eventsocket python library is checked out via git in /usr/local/share/eventsocket and mexcla is checked out via git in /usr/local/share/mexcla

I made the following changes to our freeswitch installation to get it to work:

diff --git a/autoload_configs/conference.conf.xml b/autoload_configs/conference.conf.xml
index 826f6fb..bd26edd 100644
--- a/autoload_configs/conference.conf.xml
+++ b/autoload_configs/conference.conf.xml
@@ -10,14 +10,14 @@
   <!-- Note: none and default are reserved names for group names.  Disabled if dist-dtmf member flag is set. -->       
   <caller-controls>
     <group name="default">
-      <control action="mute" digits="0"/>
+  <!--    <control action="mute" digits="0"/> -->
-      <control action="deaf mute" digits="*"/>
+      <control action="mute" digits="*"/>
       <control action="energy up" digits="9"/>
       <control action="energy equ" digits="8"/>
       <control action="energy dn" digits="7"/>
       <control action="vol talk up" digits="3"/>
-      <control action="vol talk zero" digits="2"/>
-      <control action="vol talk dn" digits="1"/>
+  <!--    <control action="vol talk zero" digits="2"/> -->
+  <!--    <control action="vol talk dn" digits="1"/> -->
       <control action="vol listen up" digits="6"/>
       <control action="vol listen zero" digits="5"/>
       <control action="vol listen dn" digits="4"/>
diff --git a/autoload_configs/ivr-mfpl.xml b/autoload_configs/ivr-mfpl.xml
index 0eeafe6..91644d8 100644
--- a/autoload_configs/ivr-mfpl.xml
+++ b/autoload_configs/ivr-mfpl.xml
@@ -14,9 +14,9 @@
       <entry action="menu-exec-app" digits="1" param="execute_extension jamie"/>
       <entry action="menu-exec-app" digits="2" param="execute_extension alfredo"/>
       <entry action="menu-exec-app" digits="7" param="conference 3000@default"/>
       <entry action="menu-exec-app" digits="3" param="execute_extension mallory"/>
       <entry action="menu-exec-app" digits="8" param="execute_extension vmain"/>
+      <entry action="menu-exec-app" digits="6" param="execute_extension 9999"/>
       <entry action="menu-top" digits="9"/>          <!-- Repeat this menu -->
     </menu>
     <menu name="mfpl_conference"
diff --git a/dialplan/mfpl/incoming.xml b/dialplan/mfpl/incoming.xml
index 92e8626..a5159d8 100644
--- a/dialplan/mfpl/incoming.xml
+++ b/dialplan/mfpl/incoming.xml
@@ -36,6 +36,11 @@
        <action application="conference" data="3000@default"/>  
       </condition>
     </extension>


+    <extension name="Mexcla Conference">
+    <condition field="destination_number" expression="^9999$">
+       <action application="answer"/>
+       <action application="read" data="1 3 /opt/mfpl-freeswitch-sounds/pick-conference-room.wav conf 10000 #"/>
+       <action application="set" data="port=${expr ${conf}+50000}"/>
+       <action application="socket" data="127.0.0.1:${port} async full"/>
+      </condition>
+   </extension>
 
 </include