[Freeswitch-users] Different SIP profiles for different codecs?

Ken Fulmer kenfulmer at icstechnologysolutions.com
Thu Apr 22 07:30:56 PDT 2010


We are using the following external sip profile:

 

<profile name="external">

  <settings>

    <param name="accept-blind-auth" value="true"/>

    <param name="apply-inbound-acl" value="domains"/>

    <param name="debug" value="0"/>

    <param name="sip-trace" value="no"/>

    <param name="rfc2833-pt" value="101"/>

    <param name="sip-port" value="5080"/>

    <param name="dialplan" value="XML"/>

    <param name="context" value="public"/>

    <param name="dtmf-duration" value="2000"/>

    <param name="inbound-codec-prefs" value="G729,PCMU"/>

    <param name="outbound-codec-prefs" value="G729,PCMU"/>

    <param name="hold-music" value="$${hold_music}"/>

    <param name="rtp-timer-name" value="soft"/>

    <param name="manage-presence" value="false"/>

    <param name="inbound-codec-negotiation" value="generous"/>

    <param name="nonce-ttl" value="60"/>

    <param name="auth-calls" value="false"/>

    <param name="rtp-ip" value="10.10.3.12"/>

    <param name="sip-ip" value="10.10.3.12"/>

    <param name="rtp-timeout-sec" value="300"/>

    <param name="rtp-hold-timeout-sec" value="1800"/>

    <param name="user-agent-string" value="INTEGRAL PARTNERS"/> 

  </settings>

</profile>

 

The dial plan "public" context has two entries, one for PSTN access and one
for call routing to an internal PBX. 

 

This is the dial plan for PSTN call routing:

 

<extension name="LCL">

   <condition field="destination_number" expression="^(\d{10})$">

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge" data="sofia/external/$1 at 172.16.15.11"/>

       <action application="set" data="ringback=${us-ring}"/>

       <action application="set" data="ignore_early_media=true" />

   </condition>

</extension>

<extension name="LD">

   <condition field="destination_number" expression="^1(\d{10})$">

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge" data="sofia/external/$0 at 172.16.15.11"/>

       <action application="set" data="ringback=${us-ring}"/>

       <action application="set" data="ignore_early_media=true" />

   </condition>

</extension>

<extension name="911">

   <condition field="destination_number" expression="^(911)$">

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge" data="sofia/external/$1 at 172.16.15.11"/>

       <action application="set" data="ringback=${us-ring}"/>

       <action application="set" data="ignore_early_media=true" />

   </condition>

</extension>

<extension name="INTL">

   <condition field="destination_number" expression="^011(\d+)$">

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge" data="sofia/external/$0 at 172.16.15.11"/>

       <action application="set" data="ringback=${us-ring}"/>

       <action application="set" data="ignore_early_media=true" />

   </condition>

</extension>

 

And this is the entry for internal call routing to a PBX:

 

<extension name="PBX">

   <condition field="destination_number" expression="^(205314849[0-9])$">

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge"
data="sofia/external/$1 at 10.10.3.10"|data="sofia/external/$1 at 10.10.3.11"/>

       <action application="set" data="ringback=${us-ring}"/>

       <action application="set" data="ignore_early_media=true"/>

   </condition>

</extension>

 

So, here's my question:

 

We'd like to be able to lock down the codec as 711 for the internal leg
going to the PBX and 729 for the external leg to the PSTN. We have
transcoding setup and it's working fine. How can we use two SIP profiles  to
hard code the codec in each direction? I've seen an example in the dial plan
section, but didn't understand how to implement it.

 

Thanks,

 

Ken Fulmer

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100422/06a8b190/attachment-0001.html 


More information about the FreeSWITCH-users mailing list