[Freeswitch-users] User Directory and Per-user (Channel) variables

Metik freeswitch-users-list at metik.com
Mon May 18 11:08:18 PDT 2009


bridge() appears to be ignoring the "absolute_codec_string" channel variable 
defined in the User Directory even though "info" shows that it is present. 
Other variables, such as "effective_caller_id_number" seem to behave 
correctly which leads me to believe that this may be a very minor bug.

In order to ease trouble shooting, I have tried to implement it using a 
configuration that clings rather closely to the sample/default configuration 
files...

// User Directory sample

  <user id="5551212" mailbox="5551212">
    <params>
      <param name="password" value="5551212"/>
      <param name="vm-password" value="5551212"/>
    </params>
    <variables>
      <variable name="toll_allow" value="domestic,international,local"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="5551212"/>
      <variable name="effective_caller_id_number" value="5551212"/>
      <variable name="absolute_codec_string" value="PCMU"/>
    </variables>
  </user>

// Dialplan broken sample (relies on the channel variable defined in the 
User Directory)

  <extension name="domestic.example.com">
    <condition field="${toll_allow}" expression="domestic"/>
    <condition field="destination_number" expression="^(\d{11})$">
      <action application="info"/>
      <action application="bridge" 
data="sofia/gateway/${default_gateway}/$1"/>
    </condition>
  </extension>

// Dialplan working sample (explicit use of the channel variable)

  <extension name="domestic.example.com">
    <condition field="${toll_allow}" expression="domestic"/>
    <condition field="destination_number" expression="^(\d{11})$">
      <action application="info"/>
      <action application="set" 
data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set" 
data="effective_caller_id_name=${outbound_caller_id_name}"/>
      <action application="bridge" 
data="{absolute_codec_string=PCMU}sofia/gateway/${default_gateway}/$1"/>
    </condition>
  </extension>

// Gateway sample

    <gateway name="pstn">
      <param name="username" value="outbound"/>
      <param name="password" value="outbound"/>
      <param name="proxy" value="192.168.1.1"/>
      <param name="register" value="false"/>
      <param name="caller-id-in-from" value="true"/>
    </gateway> 





More information about the FreeSWITCH-users mailing list