<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks, I just noticed that in the dial plan config. It works
great!<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Ken<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<b>On Behalf Of </b>DJB INTERNATIONAL<br>
<b>Sent:</b> Thursday, April 22, 2010 10:32 AM<br>
<b>To:</b> freeswitch-users@lists.freeswitch.org<br>
<b>Subject:</b> Re: [Freeswitch-users] Different SIP profiles for different
codecs?<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal><action application="bridge"
data="{absolute_codec_string=G729}sofia/external//$<a
href="mailto:0@172.16.15.11">0@</a>xxx.xxx.xxx.xxx"/><o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>-djbinter<o:p></o:p></p>
<div>
<p class=MsoNormal>On Thu, Apr 22, 2010 at 8:14 AM, Ken Fulmer <<a
href="mailto:kenfulmer@icstechnologysolutions.com">kenfulmer@icstechnologysolutions.com</a>>
wrote:<o:p></o:p></p>
<p class=MsoNormal>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:<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<param name="inbound-codec-prefs" value="PCMU"/><br>
<param name="outbound-codec-prefs" value="G729"/><o:p></o:p></p>
</div>
<p class=MsoNormal>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"/><o:p></o:p></p>
<div>
<p class=MsoNormal> <param name="rfc2833-pt"
value="101"/><o:p></o:p></p>
</div>
<p class=MsoNormal> <param name="sip-port"
value="5060"/><o:p></o:p></p>
<div>
<p class=MsoNormal> <param name="dialplan"
value="XML"/><o:p></o:p></p>
</div>
<p class=MsoNormal> <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"/><o:p></o:p></p>
<div>
<p class=MsoNormal> <param name="rfc2833-pt"
value="101"/><o:p></o:p></p>
</div>
<p class=MsoNormal> <param name="sip-port"
value="5070"/><o:p></o:p></p>
<div>
<p class=MsoNormal> <param name="dialplan"
value="XML"/><o:p></o:p></p>
</div>
<p class=MsoNormal> <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>
<span style='color:#888888'><br>
Ken</span><o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><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><o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>