[Freeswitch-users] why doesn't this work?

Royce Mitchell III royce3 at westparkcom.net
Thu Jan 8 19:13:26 PST 2009


I'm trying to program an extension in the dialplan to do an intercom 
announce. I read through the wiki and wrote the following based on what 
I thought I understood from it, but it's not working the way I expect:

    <extension name="Global Announce">
      <condition field="destination_number" expression="^89$" break="never">
        <!--These params effect the outcalls made once you join-->
        <!-- First we set the api_hangup_hook to kick everyone from the 
conference when the initiator hangs up. -->
        <action application="set" data="api_hangup_hook=conference 89 
kick all"/>
        <action application="answer"/>
        <action 
application="export"><![CDATA[sip_h_Call-Info=<sip:$${domain}>;answer-after=0]]></action>
        <action application="export" 
data="sip_invite_params=intercom=true"/>
        <action application="export" data="sip_auto_answer=true"/>
        <!-- If the above exports do not product the desired results, 
try passing the variables as commented out below -->
        <!--<action application="conference_set_auto_outcall" 
data="{sip_auto_answer=true}sofia/gateway/asterlink.com/19184238080"/>-->

        <action application="set" 
data="conference_auto_outcall_caller_id_name=$${effective_caller_id_name}"/>
        <action application="set" 
data="conference_auto_outcall_caller_id_number=$${effective_caller_id_number}"/>

        <!-- Keep the call time down to a few seconds.  If calling 
phones that don't auto-answer you may want to -->
        <!-- increase this value to something a bit more persistent than 
5 seconds. -->
        <action application="set" data="conference_auto_outcall_timeout=5"/>
       

        <!--if you don't need to hear the participants, as in a page 
instead of multi-party intercom -->
        <!-- then use "mute" instead of "none" as the 
conference_outcall_flags below. -->
        <action application="set" 
data="conference_auto_outcall_flags=mute"/>
       
        <!-- If you'd like to say something to the participant and have 
cepstral configured and installed, now's the time. -->
        <!--<action application="set" 
data="conference_auto_outcall_announce=say:You have been called into an 
emergency conference"/>-->
       
        <!--Add as many of these as you need, These are the people you 
are going to call-->
        <!-- We have commented these out since we have the list of 
participants down below as a catch-all in case the caller_id -->
        <!-- of the initiating party doesn't match the phones being 
called. -->
        <!--<action application="conference_set_auto_outcall" 
data="sofia/gateway/asterlink.com/19184238080"/>-->
        <!--<action application="conference_set_auto_outcall" 
data="sofia/default/888 at conference.freeswitch.org"/>-->
      </condition>
     
      <condition field="caller_id_number" expression="^303$" break="never">
        <antiaction application="conference_set_auto_outcall" 
data="user/303@$${domain}"/>
        <antiaction application="set" 
data="conference_auto_outcall_flags=mute"/>
      </condition>

      <condition field="caller_id_number" expression="^304$" break="never">
        <antiaction application="conference_set_auto_outcall" 
data="user/304@$${domain}"/>
        <antiaction application="set" 
data="conference_auto_outcall_flags=mute"/>
      </condition>
     
      <!-- Now we check the destination again and act accordingly. -->
      <condition field="destination_number" expression="^89$">
       
        <!-- Please note that you can also designate your own conference 
bridge instead of default and enable only the options you desire.-->
        <!-- I have kept the default conference in this example so that 
you can get this to work before changing the conference to something -->
        <!-- with your own options enabled.  In this way the example 
provided here should work and you can fine tune your conference to your -->
        <!-- desire.  See the config file 
autoload_configs/conferences.conf.xml for more information on how/what 
to do or consult the Wiki -->
       
        <!-- IMPORTANT IMPORTANT IMPORTANT - use ONLY ONE of the two 
options below -->
       
        <!-- OPTION 1 -->
        <!-- If your phones are all isolated from one another (not in 
the same room, uncomment the following line -->
        <!-- <action application="conference" data="89 at default"/> -->
       
        <!-- OPTION 2 -->
        <!-- If you encounter feedback issues use the conference profile 
given on this page -->
        <!-- and comment out the application line in OPTION 1 above -->
        <!-- and un-comment the line below -->
        <!-- <action application="conference" data="89 at intercom"/> -->


        <!--After the hangup, we kick everyone in the conference to 
cause a hangup. -->
        <!--This shouldn't be necessary since it should be handled above 
in the api_hangup_hook. -->
        <action application="conference" data="89 kick all"/>
      </condition>
    </extension>





More information about the FreeSWITCH-users mailing list