No need to have separate profiles for it, these are the two parameters you'd want to change: <param name="inbound-codec-prefs" value="PCMU"/> <param name="outbound-codec-prefs" value="G729"/> If you want to have calls coming in one one profile (e.g. internal) and going out on another (e.g. external) you can do so. Create both profiles (if you haven't already) and set inbound-codec-prefs on internal and outbound-codec-prefs on external. Have the internal profile hit the dialplan context where you have the extensions configured and have the dialplan bridge to sofia/external/... to send the outgoing legs through that context. -Steve On 22 April 2010 15:30, Ken Fulmer <kenfulmer@icstechnologysolutions.com> wrote:
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@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@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@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@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@10.10.3.10"|data="sofia/external/$1@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
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org