<div><br></div><action application="bridge" data="{absolute_codec_string=G729}sofia/external//$<a href="mailto:0@172.16.15.11">0@</a>xxx.xxx.xxx.xxx"/><div><br></div><div>-djbinter<br><br><div class="gmail_quote">
On Thu, Apr 22, 2010 at 8:14 AM, Ken Fulmer <span dir="ltr"><<a href="mailto:kenfulmer@icstechnologysolutions.com">kenfulmer@icstechnologysolutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I need the internal codec to be hardcoded to PCMU. I need the PSTN codec to<br>
be 729, and I need to transcode between the two.<br>
<br>
So, we have PBX (711) ---> FS (729)---> PSTN and vice versa.<br>
<br>
If I only set the following parameters in one profile, I won't get the<br>
necessary result:<br>
<div class="im"><br>
<param name="inbound-codec-prefs" value="PCMU"/><br>
<param name="outbound-codec-prefs" value="G729"/><br>
<br>
</div>We are routing calls through the system like a softswitch / B2BUA / SBC. We<br>
don't have phones registering to the FS box like a PBX. We are using sipX<br>
for that.<br>
<br>
So, we should be able to use two profiles and set the codecs differently in<br>
each. This is show in the following example on the dial plan page:<br>
<br>
Example 5<br>
<br>
In this example we will demonstrate the use of profiles when using a<br>
FreeSWITCH endpoint that supports profiles, like mod_sofia. Assuming that we<br>
want to use different call settings (codecs, DTMF modes, etc) for sending<br>
the calls to different IP addresses, we can create different profiles. For<br>
example, in the configuration of sofia.conf, we see an example profile named<br>
"test", which we rename to profile1 for this example, and add a profile2 for<br>
comparison:<br>
<br>
<profile name="profile1"><br>
<param name="debug" value="1"/><br>
<div class="im"> <param name="rfc2833-pt" value="101"/><br>
</div> <param name="sip-port" value="5060"/><br>
<div class="im"> <param name="dialplan" value="XML"/><br>
</div> <param name="dtmf-duration" value="100"/><br>
<param name="codec-prefs" value="PCMU@20i"/><br>
<param name="codec-ms" value="20"/><br>
<param name="use-rtp-timer" value="true"/><br>
</profile><br>
<profile name="profile2"><br>
<param name="debug" value="1"/><br>
<div class="im"> <param name="rfc2833-pt" value="101"/><br>
</div> <param name="sip-port" value="5070"/><br>
<div class="im"> <param name="dialplan" value="XML"/><br>
</div> <param name="dtmf-duration" value="100"/><br>
<param name="codec-prefs" value="PCMA@20i"/><br>
<param name="codec-ms" value="20"/><br>
<param name="use-rtp-timer" value="true"/><br>
</profile><br>
<br>
The difference between the two profiles are in the codecs. The first uses<br>
G.711 uLaw and the second G711 ALaw.<br>
<br>
Continuing the examples above, we have:<br>
<br>
<extension name="Test5ulaw"><br>
<condition field="network_addr" expression="^192\.168\.1\.1$"/><br>
<condition field="destination_number" expression="^1(\d+)$"><br>
<action application="bridge" data="sofia/profile1/$<a href="mailto:0@192.168.2.2">0@192.168.2.2</a>"/><br>
</condition><br>
</extension><br>
<br>
to send the call in G.711 uLaw and<br>
<br>
<extension name="Test5alaw"><br>
<condition field="network_addr" expression="^192\.168\.1\.1$"/><br>
<condition field="destination_number" expression="^1(\d+)$"><br>
<action application="bridge" data="sofia/profile2/$<a href="mailto:0@192.168.2.2">0@192.168.2.2</a>"/><br>
</condition><br>
</extension><br>
<br>
But when we try to setup two profiles, we always get an error on one of<br>
them.<br>
<font color="#888888"><br>
Ken<br>
</font><div><div></div><div class="h5"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Steven<br>
Ayre<br>
Sent: Thursday, April 22, 2010 9:56 AM<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] Different SIP profiles for different codecs?<br>
<br>
No need to have separate profiles for it, these are the two parameters<br>
you'd want to change:<br>
<param name="inbound-codec-prefs" value="PCMU"/><br>
<param name="outbound-codec-prefs" value="G729"/><br>
<br>
If you want to have calls coming in one one profile (e.g. internal)<br>
and going out on another (e.g. external) you can do so. Create both<br>
profiles (if you haven't already) and set inbound-codec-prefs on<br>
internal and outbound-codec-prefs on external. Have the internal<br>
profile hit the dialplan context where you have the extensions<br>
configured and have the dialplan bridge to sofia/external/... to send<br>
the outgoing legs through that context.<br>
<br>
-Steve<br>
<br>
<br>
On 22 April 2010 15:30, Ken Fulmer <<a href="mailto:kenfulmer@icstechnologysolutions.com">kenfulmer@icstechnologysolutions.com</a>><br>
wrote:<br>
> We are using the following external sip profile:<br>
><br>
><br>
><br>
> <profile name="external"><br>
><br>
> <settings><br>
><br>
> <param name="accept-blind-auth" value="true"/><br>
><br>
> <param name="apply-inbound-acl" value="domains"/><br>
><br>
> <param name="debug" value="0"/><br>
><br>
> <param name="sip-trace" value="no"/><br>
><br>
> <param name="rfc2833-pt" value="101"/><br>
><br>
> <param name="sip-port" value="5080"/><br>
><br>
> <param name="dialplan" value="XML"/><br>
><br>
> <param name="context" value="public"/><br>
><br>
> <param name="dtmf-duration" value="2000"/><br>
><br>
> <param name="inbound-codec-prefs" value="G729,PCMU"/><br>
><br>
> <param name="outbound-codec-prefs" value="G729,PCMU"/><br>
><br>
> <param name="hold-music" value="$${hold_music}"/><br>
><br>
> <param name="rtp-timer-name" value="soft"/><br>
><br>
> <param name="manage-presence" value="false"/><br>
><br>
> <param name="inbound-codec-negotiation" value="generous"/><br>
><br>
> <param name="nonce-ttl" value="60"/><br>
><br>
> <param name="auth-calls" value="false"/><br>
><br>
> <param name="rtp-ip" value="10.10.3.12"/><br>
><br>
> <param name="sip-ip" value="10.10.3.12"/><br>
><br>
> <param name="rtp-timeout-sec" value="300"/><br>
><br>
> <param name="rtp-hold-timeout-sec" value="1800"/><br>
><br>
> <param name="user-agent-string" value="INTEGRAL PARTNERS"/><br>
><br>
> </settings><br>
><br>
> </profile><br>
><br>
><br>
><br>
> The dial plan “public” context has two entries, one for PSTN access and<br>
one<br>
> for call routing to an internal PBX.<br>
><br>
><br>
><br>
> This is the dial plan for PSTN call routing:<br>
><br>
><br>
><br>
> <extension name="LCL"><br>
><br>
> <condition field="destination_number" expression="^(\d{10})$"><br>
><br>
> <action application="set" data="hangup_after_bridge=true"/><br>
><br>
> <action application="bridge"<br>
data="sofia/external/$<a href="mailto:1@172.16.15.11">1@172.16.15.11</a>"/><br>
><br>
> <action application="set" data="ringback=${us-ring}"/><br>
><br>
> <action application="set" data="ignore_early_media=true" /><br>
><br>
> </condition><br>
><br>
> </extension><br>
><br>
> <extension name="LD"><br>
><br>
> <condition field="destination_number" expression="^1(\d{10})$"><br>
><br>
> <action application="set" data="hangup_after_bridge=true"/><br>
><br>
> <action application="bridge"<br>
data="sofia/external/$<a href="mailto:0@172.16.15.11">0@172.16.15.11</a>"/><br>
><br>
> <action application="set" data="ringback=${us-ring}"/><br>
><br>
> <action application="set" data="ignore_early_media=true" /><br>
><br>
> </condition><br>
><br>
> </extension><br>
><br>
> <extension name="911"><br>
><br>
> <condition field="destination_number" expression="^(911)$"><br>
><br>
> <action application="set" data="hangup_after_bridge=true"/><br>
><br>
> <action application="bridge"<br>
data="sofia/external/$<a href="mailto:1@172.16.15.11">1@172.16.15.11</a>"/><br>
><br>
> <action application="set" data="ringback=${us-ring}"/><br>
><br>
> <action application="set" data="ignore_early_media=true" /><br>
><br>
> </condition><br>
><br>
> </extension><br>
><br>
> <extension name="INTL"><br>
><br>
> <condition field="destination_number" expression="^011(\d+)$"><br>
><br>
> <action application="set" data="hangup_after_bridge=true"/><br>
><br>
> <action application="bridge"<br>
data="sofia/external/$<a href="mailto:0@172.16.15.11">0@172.16.15.11</a>"/><br>
><br>
> <action application="set" data="ringback=${us-ring}"/><br>
><br>
> <action application="set" data="ignore_early_media=true" /><br>
><br>
> </condition><br>
><br>
> </extension><br>
><br>
><br>
><br>
> And this is the entry for internal call routing to a PBX:<br>
><br>
><br>
><br>
> <extension name="PBX"><br>
><br>
> <condition field="destination_number" expression="^(205314849[0-9])$"><br>
><br>
> <action application="set" data="hangup_after_bridge=true"/><br>
><br>
> <action application="bridge"<br>
> data="sofia/external/$<a href="mailto:1@10.10.3.10">1@10.10.3.10</a>"|data="sofia/external/$<a href="mailto:1@10.10.3.11">1@10.10.3.11</a>"/><br>
><br>
> <action application="set" data="ringback=${us-ring}"/><br>
><br>
> <action application="set" data="ignore_early_media=true"/><br>
><br>
> </condition><br>
><br>
> </extension><br>
><br>
><br>
><br>
> So, here’s my question:<br>
><br>
><br>
><br>
> We’d like to be able to lock down the codec as 711 for the internal leg<br>
> going to the PBX and 729 for the external leg to the PSTN. We have<br>
> transcoding setup and it’s working fine. How can we use two SIP profiles <br>
to<br>
> hard code the codec in each direction? I’ve seen an example in the dial<br>
plan<br>
> section, but didn’t understand how to implement it.<br>
><br>
><br>
><br>
> Thanks,<br>
><br>
><br>
><br>
> Ken Fulmer<br>
><br>
><br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>