<div><br></div>&lt;action application=&quot;bridge&quot; data=&quot;{absolute_codec_string=G729}sofia/external//$<a href="mailto:0@172.16.15.11">0@</a>xxx.xxx.xxx.xxx&quot;/&gt;<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">&lt;<a href="mailto:kenfulmer@icstechnologysolutions.com">kenfulmer@icstechnologysolutions.com</a>&gt;</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) ---&gt; FS (729)---&gt; PSTN and vice versa.<br>
<br>
If I only set the following parameters in one profile, I won&#39;t get the<br>
necessary result:<br>
<div class="im"><br>
&lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;PCMU&quot;/&gt;<br>
&lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;G729&quot;/&gt;<br>
<br>
</div>We are routing calls through the system like a softswitch / B2BUA / SBC. We<br>
don&#39;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>
&quot;test&quot;, which we rename to profile1 for this example, and add a profile2 for<br>
comparison:<br>
<br>
&lt;profile name=&quot;profile1&quot;&gt;<br>
  &lt;param name=&quot;debug&quot; value=&quot;1&quot;/&gt;<br>
<div class="im">  &lt;param name=&quot;rfc2833-pt&quot; value=&quot;101&quot;/&gt;<br>
</div>  &lt;param name=&quot;sip-port&quot; value=&quot;5060&quot;/&gt;<br>
<div class="im">  &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;<br>
</div>  &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;<br>
  &lt;param name=&quot;codec-prefs&quot; value=&quot;PCMU@20i&quot;/&gt;<br>
  &lt;param name=&quot;codec-ms&quot; value=&quot;20&quot;/&gt;<br>
  &lt;param name=&quot;use-rtp-timer&quot; value=&quot;true&quot;/&gt;<br>
&lt;/profile&gt;<br>
&lt;profile name=&quot;profile2&quot;&gt;<br>
  &lt;param name=&quot;debug&quot; value=&quot;1&quot;/&gt;<br>
<div class="im">  &lt;param name=&quot;rfc2833-pt&quot; value=&quot;101&quot;/&gt;<br>
</div>  &lt;param name=&quot;sip-port&quot; value=&quot;5070&quot;/&gt;<br>
<div class="im">  &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;<br>
</div>  &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;<br>
  &lt;param name=&quot;codec-prefs&quot; value=&quot;PCMA@20i&quot;/&gt;<br>
  &lt;param name=&quot;codec-ms&quot; value=&quot;20&quot;/&gt;<br>
  &lt;param name=&quot;use-rtp-timer&quot; value=&quot;true&quot;/&gt;<br>
&lt;/profile&gt;<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>
&lt;extension name=&quot;Test5ulaw&quot;&gt;<br>
  &lt;condition field=&quot;network_addr&quot; expression=&quot;^192\.168\.1\.1$&quot;/&gt;<br>
  &lt;condition field=&quot;destination_number&quot; expression=&quot;^1(\d+)$&quot;&gt;<br>
    &lt;action application=&quot;bridge&quot; data=&quot;sofia/profile1/$<a href="mailto:0@192.168.2.2">0@192.168.2.2</a>&quot;/&gt;<br>
  &lt;/condition&gt;<br>
&lt;/extension&gt;<br>
<br>
to send the call in G.711 uLaw and<br>
<br>
&lt;extension name=&quot;Test5alaw&quot;&gt;<br>
  &lt;condition field=&quot;network_addr&quot; expression=&quot;^192\.168\.1\.1$&quot;/&gt;<br>
  &lt;condition field=&quot;destination_number&quot; expression=&quot;^1(\d+)$&quot;&gt;<br>
    &lt;action application=&quot;bridge&quot; data=&quot;sofia/profile2/$<a href="mailto:0@192.168.2.2">0@192.168.2.2</a>&quot;/&gt;<br>
  &lt;/condition&gt;<br>
&lt;/extension&gt;<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&#39;d want to change:<br>
&lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;PCMU&quot;/&gt;<br>
&lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;G729&quot;/&gt;<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&#39;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 &lt;<a href="mailto:kenfulmer@icstechnologysolutions.com">kenfulmer@icstechnologysolutions.com</a>&gt;<br>
wrote:<br>
&gt; We are using the following external sip profile:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &lt;profile name=&quot;external&quot;&gt;<br>
&gt;<br>
&gt;   &lt;settings&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;accept-blind-auth&quot; value=&quot;true&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;apply-inbound-acl&quot; value=&quot;domains&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;debug&quot; value=&quot;0&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;sip-trace&quot; value=&quot;no&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;rfc2833-pt&quot; value=&quot;101&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;sip-port&quot; value=&quot;5080&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;context&quot; value=&quot;public&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;dtmf-duration&quot; value=&quot;2000&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;G729,PCMU&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;G729,PCMU&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;hold-music&quot; value=&quot;$${hold_music}&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;manage-presence&quot; value=&quot;false&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;inbound-codec-negotiation&quot; value=&quot;generous&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;nonce-ttl&quot; value=&quot;60&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;auth-calls&quot; value=&quot;false&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;rtp-ip&quot; value=&quot;10.10.3.12&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;sip-ip&quot; value=&quot;10.10.3.12&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;rtp-timeout-sec&quot; value=&quot;300&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;rtp-hold-timeout-sec&quot; value=&quot;1800&quot;/&gt;<br>
&gt;<br>
&gt;     &lt;param name=&quot;user-agent-string&quot; value=&quot;INTEGRAL PARTNERS&quot;/&gt;<br>
&gt;<br>
&gt;   &lt;/settings&gt;<br>
&gt;<br>
&gt; &lt;/profile&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; The dial plan “public” context has two entries, one for PSTN access and<br>
one<br>
&gt; for call routing to an internal PBX.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; This is the dial plan for PSTN call routing:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;LCL&quot;&gt;<br>
&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{10})$&quot;&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/external/$<a href="mailto:1@172.16.15.11">1@172.16.15.11</a>&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot; /&gt;<br>
&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;LD&quot;&gt;<br>
&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;^1(\d{10})$&quot;&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/external/$<a href="mailto:0@172.16.15.11">0@172.16.15.11</a>&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot; /&gt;<br>
&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;911&quot;&gt;<br>
&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(911)$&quot;&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/external/$<a href="mailto:1@172.16.15.11">1@172.16.15.11</a>&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot; /&gt;<br>
&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;INTL&quot;&gt;<br>
&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;^011(\d+)$&quot;&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/external/$<a href="mailto:0@172.16.15.11">0@172.16.15.11</a>&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot; /&gt;<br>
&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; And this is the entry for internal call routing to a PBX:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;PBX&quot;&gt;<br>
&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(205314849[0-9])$&quot;&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;sofia/external/$<a href="mailto:1@10.10.3.10">1@10.10.3.10</a>&quot;|data=&quot;sofia/external/$<a href="mailto:1@10.10.3.11">1@10.10.3.11</a>&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;<br>
&gt;<br>
&gt;        &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot;/&gt;<br>
&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; So, here’s my question:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; We’d like to be able to lock down the codec as 711 for the internal leg<br>
&gt; going to the PBX and 729 for the external leg to the PSTN. We have<br>
&gt; transcoding setup and it’s working fine. How can we use two SIP profiles <br>
to<br>
&gt; hard code the codec in each direction? I’ve seen an example in the dial<br>
plan<br>
&gt; section, but didn’t understand how to implement it.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Ken Fulmer<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<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>