[Freeswitch-users] Codec negotiation with carriers

Anto potxoka at gmail.com
Sat Mar 24 23:50:00 MSK 2012


Hello

Can anyone show me your settings to compare with mine? I look for more
traces, check my settings, can not understand the functioning of the
profiles :-S. Searching the internet, I haven´t found examples (a
supplier or system complete) of these configurations. thanks.

Regards
Anto

2012/3/17 Anto <potxoka at gmail.com>:
> Hello
>
> I do not want to bother them, nor give me the solution. I would like
> to learn how to configure it for myself (in fact one of the settings
> works), but I do not understand the functioning correctly, for so not
> to disturb in the future.
>
> I attached the various configurations and their sip traces, as well as
> the logs (debug):
>
> First scenario ( Call isn´t established )
> http://pastebin.freeswitch.org/18685
>
> Second scenario ( Call isn´t established )
> http://pastebin.freeswitch.org/18686
>
> Third scenario ( Call isn´t established )
> http://pastebin.freeswitch.org/18687
>
> Fourth scenario ( Call isn´t established )
> http://pastebin.freeswitch.org/18688
>
> Fifth scenario ( Call established )
> http://pastebin.freeswitch.org/18689
>
> Sixth scenario ( Fail transcoding )
> http://pastebin.freeswitch.org/18690
>
> General settings:
>
> vars.xml
>
>        <X-PRE-PROCESS cmd="set"
> data="global_codec_prefs=VB32,G7221,speex,PCMU,PCMA,BV16,G726-32,iLBC,GSM,G729,G723,AMR"/>
>        <!--X-PRE-PROCESS cmd="set"
> data="outbound_codec_prefs=PCMU,PCMA,G729,G723,AMR,VB32,G7221,speex,BV16,G726-32,iLBC,GSM"/-->
>        <X-PRE-PROCESS cmd="set"
> data="carriers_codec_prefs=PCMU,PCMA,G729,G723,AMR,VB32,G7221,speex,BV16,G726-32,iLBC,GSM"/>
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> dialplan\outbound.xml
>
> <include>
>        <context name="internal-in">
>                <extension name="outbound">
>                  <condition field="network_addr" expression="^192\.168\.20\.40$" />
>                  <condition field="destination_number" expression="^(\d+)$">
>                        <action application="unset" data="sip_h_X-AUTH-IP"/>
>                        <action application="set" data="inherit_codec=true"/>
>                        <!--action application="set" data="proxy_media=true"/-->
>                        <action application="set" data="hangup_after_bridge=true"/>
>                        <!--action application="answer"/-->
>                        <action application="bridge" data="sofia/gateway/carrier1-1/$1"/>
>                  </condition>
>                </extension>
>        </context>
> </include>
>
>
> Thanks !
>
> Regards
> Anto
>
> 2012/3/16 Michael Collins <msc at freeswitch.org>:
>> Well, this is a little better, however you don't have proper freeswitch logs
>> on all these calls. For example, only the first call has freeswitch debug
>> output. The other calls have sip traces, but not the first call. One call
>> has what appears to be info-level output, but not debug-level output.
>>
>> I'd recommend that if you have this much information it might be good to put
>> each call example in its own pastebin. Also, be sure to give a detailed
>> description of what kind of call you are documenting. Some of your
>> traces/debugs have no information explaining what the call is doing. Whether
>> you are reporting a working or failed call, be sure to mention what kind of
>> call it is. In the case of a failed call, be sure to mention what it is you
>> are trying to do and what call result you expected to see.
>>
>> Thanks!
>>
>> -MC
>>
>>
>> On Thu, Mar 15, 2012 at 2:22 PM, Anto <potxoka at gmail.com> wrote:
>>>
>>> Hi
>>>
>>> If, upload a file to trace and explanation to this address
>>> http://pastebin.freeswitch.org/18599
>>>
>>> I do not want disturb watching this ;-), I prefer to use a system to
>>> understand, this scenario and for future projects.
>>>
>>> With everything I've read do not really understand what the codecs :-S
>>> , but if I had been good to understand the rest of the operation of
>>> FreeSWITCH (or so I think). Thanks !
>>>
>>> Regards
>>> Anto
>>>
>>> 2012/3/14 Michael Collins <msc at freeswitch.org>:
>>> > Did you get sip traces and logs of working vs. non-working calls and put
>>> > them on pastebin? Most likely there is an explanation but it will take
>>> > some
>>> > time and effort to figure it out.
>>> >
>>> > -MC
>>> >
>>> >
>>> > On Wed, Mar 14, 2012 at 2:18 PM, Anto <potxoka at gmail.com> wrote:
>>> >>
>>> >> Hello
>>> >>
>>> >> I have searched previous messages in the list, I consulted the book of
>>> >> FreeSWITCH (which I bought over a year), wiki and so on. I still do
>>> >> not understand how and why in some cases I work. Also I downloaded
>>> >> frontend to consult your code if there was something about this, but
>>> >> still the same. I have several weeks with this question and I can not
>>> >> find it. In the end I decided to spend the gateway to Asterisk, and
>>> >> you at least understand its operation. Thank you very much to all :-)
>>> >>
>>> >> Best regards
>>> >> Anto
>>> >>
>>> >> 2012/3/11 Anto <potxoka at gmail.com>:
>>> >> > Hi
>>> >> >
>>> >> > I still do not find the solution and not really understanding,
>>> >> > because
>>> >> > it works:-S
>>> >> >
>>> >> > regards
>>> >> > anto
>>> >> >
>>> >> > 2012/3/7 Anto <potxoka at gmail.com>:
>>> >> >> Hello
>>> >> >>
>>> >> >> Attached file, with the traces of the different tests (with
>>> >> >> different
>>> >> >> configurations).
>>> >> >>
>>> >> >> http://pastebin.freeswitch.org/18599
>>> >> >>
>>> >> >> I have read the url that you mentioned, the initial guide
>>> >> >> FreeSWITCH,
>>> >> >> that of mod_sofia, applications, etc.. I believe that most of the
>>> >> >> wiki
>>> >> >> (maybe when do not give the solution, read as much documentation is
>>> >> >> worse idea :-S, lock me more).
>>> >> >>
>>> >> >> I made a configuration that works (I have not tested the audio), but
>>> >> >> earlier (before I started "touch" the profiles) if I could talk to a
>>> >> >> physical phone (several times). The problem is that I can not
>>> >> >> understand why it works and sometimes not, and I would like to learn
>>> >> >> :-). Not only do and forget, so I would like to learn and less
>>> >> >> disturbing to the mail list and (maybe in the future) to help other
>>> >> >> newbies like me :-). Thanks !
>>> >> >>
>>> >> >> Best regards
>>> >> >> Anto
>>> >> >>
>>> >> >> 2012/3/7 Michael Collins <msc at freeswitch.org>:
>>> >> >>> You may want to read up on codec negotiation:
>>> >> >>> http://wiki.freeswitch.org/wiki/Codec_negotiation
>>> >> >>>
>>> >> >>> There are different ways to handle codecs depending on your needs.
>>> >> >>> I'd
>>> >> >>> read
>>> >> >>> that page first and then try out some of the suggestions. If you're
>>> >> >>> still
>>> >> >>> having trouble then I'd recommend getting SIP traces of the traffic
>>> >> >>> and
>>> >> >>> putting them on pastebin.freeswitch.org. The gang here is pretty
>>> >> >>> good
>>> >> >>> at
>>> >> >>> looking over logs and helping with diagnosing problems. :)
>>> >> >>>
>>> >> >>> -MC
>>> >> >>>
>>> >> >>> On Tue, Mar 6, 2012 at 2:30 PM, Anto <potxoka at gmail.com> wrote:
>>> >> >>>>
>>> >> >>>> Hi
>>> >> >>>>
>>> >> >>>> I am following the steps in this direction
>>> >> >>>> "http://wiki.freeswitch.org/wiki/SBC_Setup" and
>>> >> >>>>
>>> >> >>>> "http://wiki.freeswitch.org/wiki/Provider_Configuration:_Broadvoice",
>>> >> >>>> I reread the whole entire wiki (or so I lack), but do not quite
>>> >> >>>> assimilate or finding the right formula to operate the bridge :-S.
>>> >> >>>>
>>> >> >>>> I captured traffic with ngrep, I enabled sip-trace, console
>>> >> >>>> logconsole
>>> >> >>>> 8, etc., but unless the transcoding error (only two of the
>>> >> >>>> hundreds
>>> >> >>>> of
>>> >> >>>> combinations of settings that I have), I have not seen anything
>>> >> >>>> "weird" :-S
>>> >> >>>>
>>> >> >>>> I have 3 suppliers, each with this codec:
>>> >> >>>>
>>> >> >>>> 1)           2)              3)
>>> >> >>>> G729        G729        G729
>>> >> >>>> G711u      G711A      G711A
>>> >> >>>> G711A     G711u       G711u
>>> >> >>>>                G723         G723
>>> >> >>>>                                  G722
>>> >> >>>>                                  GSM
>>> >> >>>>
>>> >> >>>> I think I understand that when making an outside call, FreeSWITCH
>>> >> >>>> follow these steps:
>>> >> >>>>
>>> >> >>>> USER -> (   Dialplan -> profile (internal) -> bridge (external) ->
>>> >> >>>> profile (external)   ) -> PROVIDER
>>> >> >>>>
>>> >> >>>> PROVIDER -> (   Dialplan -> profile (external) -> bridge
>>> >> >>>> (internal)
>>> >> >>>> ->
>>> >> >>>> profile (internal)  ) -> USER
>>> >> >>>>
>>> >> >>>> right?
>>> >> >>>>
>>> >> >>>> Internal and external I set as follows (and not many changes have
>>> >> >>>> done, and not remember it, because I've been testing days). If
>>> >> >>>> outbound (outbound-codec-prefs) all codecs specified system does
>>> >> >>>> not
>>> >> >>>> handle the call, I have to specify these by hand. If active
>>> >> >>>> inbound-proxy-media, not the caller. Some of the time I worked,
>>> >> >>>> but
>>> >> >>>> gave me an error that it can do transcoding G729 codec (I do
>>> >> >>>> passthrough), but the proxy does not work half.
>>> >> >>>>
>>> >> >>>> If the outbound property (outbound-codec-prefs) all codecs
>>> >> >>>> specified
>>> >> >>>> system does not handle the call, I have to specify these by hand.
>>> >> >>>> If
>>> >> >>>> active inbound-proxy-media, not the caller. Some of the time I
>>> >> >>>> worked,
>>> >> >>>> but gave me an error that it can do transcoding G729 codec (I want
>>> >> >>>> to
>>> >> >>>> make passthrough), but the "proxy media" does not work.
>>> >> >>>>
>>> >> >>>> Basically, what I do is that local users can use all the codecs
>>> >> >>>> allowed (iLBC, GSM, ...) and make an outside call, use the carrier
>>> >> >>>> that will indicate the priority but the free codec.
>>> >> >>>>
>>> >> >>>> With this configuration works for me, but I would like to
>>> >> >>>> understand
>>> >> >>>> why so if it works and otherwise no. Coming to understand how to
>>> >> >>>> configure properly and so as not to disturb the mail list ;-).
>>> >> >>>> Thanks
>>> >> >>>> !
>>> >> >>>>
>>> >> >>>> Best regards
>>> >> >>>> Anto
>>> >> >>>>
>>> >> >>>> vars.xml
>>> >> >>>>
>>> >> >>>> <X-PRE-PROCESS cmd="set"
>>> >> >>>>
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> data="global_codec_prefs=iLBC,G7221,speex,PCMU,PCMA,BV16,G726-32,GSM,G729,G723,AMR"/>
>>> >> >>>> <X-PRE-PROCESS cmd="set"
>>> >> >>>>
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> data="carriers_codec_prefs=PCMU,PCMA,G729,G723,AMR,iLBC,G7221,speex,BV16,G726-32,GSM"/>
>>> >> >>>>
>>> >> >>>> internal.xml
>>> >> >>>>
>>> >> >>>> <param name="codec-prefs" value="$${global_codec_prefs}"/>
>>> >> >>>> <!--param name="inbound-codec-prefs"
>>> >> >>>> value="$${global_codec_prefs}"/>
>>> >> >>>> <param name="outbound-codec-prefs"
>>> >> >>>> value="$${global_codec_prefs}"/-->
>>> >> >>>> <!--param name="inbound-codec-negotiation" value="generous"/-->
>>> >> >>>> <param name="inbound-codec-negotiation" value="greedy"/>
>>> >> >>>> <param name="inbound-late-negotiation" value="true"/>
>>> >> >>>> <param name="renegotiate-codec-on-reinvite" value="true"/>
>>> >> >>>> <!--param name="inbound-proxy-media" value="true"/-->
>>> >> >>>>
>>> >> >>>> external.xml
>>> >> >>>>
>>> >> >>>> <param name="codec-prefs" value="$${carriers_codec_prefs}"/>
>>> >> >>>> <param name="inbound-codec-prefs"
>>> >> >>>> value="$${carriers_codec_prefs}"/>
>>> >> >>>> <!--param name="outbound-codec-prefs"
>>> >> >>>> value="$${carriers_codec_prefs}"/-->
>>> >> >>>> <param name="outbound-codec-prefs" value="PCMU,PCMA,G729,G723"/>
>>> >> >>>> <!--param name="inbound-codec-negotiation" value="generous"/-->
>>> >> >>>> <param name="inbound-codec-negotiation" value="greedy"/>
>>> >> >>>> <param name="inbound-late-negotiation" value="true"/>
>>> >> >>>> <param name="renegotiate-codec-on-reinvite" value="true"/>
>>> >> >>>> <!--param name="inbound-proxy-media" value="true"/-->
>>> >> >>>>
>>> >> >>>> dialplan/outbound.xml
>>> >> >>>>
>>> >> >>>> <include>
>>> >> >>>>        <context name="internal">
>>> >> >>>>                <extension name="outbound">
>>> >> >>>>                  <condition field="destination_number"
>>> >> >>>> expression="^(\d+)$">
>>> >> >>>>                        <!--action application="set"
>>> >> >>>> data="inherit_codec=true"/-->
>>> >> >>>>                        <!--action application="set"
>>> >> >>>> data="hangup_after_bridge=true"/-->
>>> >> >>>>                        <!--action application="set"
>>> >> >>>> data="proxy_media=true"/-->
>>> >> >>>>                        <action application="bridge"
>>> >> >>>> data="sofia/gateway/provider-2/$1"/>
>>> >> >>>>                  </condition>
>>> >> >>>>                </extension>
>>> >> >>>>        </context>
>>> >> >>>>
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> _________________________________________________________________________
>>> >> >>>> Professional FreeSWITCH Consulting Services:
>>> >> >>>> consulting at freeswitch.org
>>> >> >>>> http://www.freeswitchsolutions.com
>>> >> >>>>
>>> >> >>>> 
>>> >> >>>> 
>>> >> >>>>
>>> >> >>>> Official FreeSWITCH Sites
>>> >> >>>> http://www.freeswitch.org
>>> >> >>>> http://wiki.freeswitch.org
>>> >> >>>> http://www.cluecon.com
>>> >> >>>>
>>> >> >>>> FreeSWITCH-users mailing list
>>> >> >>>> FreeSWITCH-users at lists.freeswitch.org
>>> >> >>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> >> >>>> http://www.freeswitch.org
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> _________________________________________________________________________
>>> >> >>> Professional FreeSWITCH Consulting Services:
>>> >> >>> consulting at freeswitch.org
>>> >> >>> http://www.freeswitchsolutions.com
>>> >> >>>
>>> >> >>> 
>>> >> >>> 
>>> >> >>>
>>> >> >>> Official FreeSWITCH Sites
>>> >> >>> http://www.freeswitch.org
>>> >> >>> http://wiki.freeswitch.org
>>> >> >>> http://www.cluecon.com
>>> >> >>>
>>> >> >>> FreeSWITCH-users mailing list
>>> >> >>> FreeSWITCH-users at lists.freeswitch.org
>>> >> >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> >> >>>
>>> >> >>>
>>> >> >>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> >> >>> http://www.freeswitch.org
>>> >> >>>
>>> >>
>>> >>
>>> >> _________________________________________________________________________
>>> >> Professional FreeSWITCH Consulting Services:
>>> >> consulting at freeswitch.org
>>> >> http://www.freeswitchsolutions.com
>>> >>
>>> >> 
>>> >> 
>>> >>
>>> >> Official FreeSWITCH Sites
>>> >> http://www.freeswitch.org
>>> >> http://wiki.freeswitch.org
>>> >> http://www.cluecon.com
>>> >>
>>> >> FreeSWITCH-users mailing list
>>> >> FreeSWITCH-users at lists.freeswitch.org
>>> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> >>
>>> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> >> http://www.freeswitch.org
>>> >
>>> >
>>> >
>>> >
>>> > _________________________________________________________________________
>>> > Professional FreeSWITCH Consulting Services:
>>> > consulting at freeswitch.org
>>> > http://www.freeswitchsolutions.com
>>> >
>>> > 
>>> > 
>>> >
>>> > Official FreeSWITCH Sites
>>> > http://www.freeswitch.org
>>> > http://wiki.freeswitch.org
>>> > http://www.cluecon.com
>>> >
>>> > FreeSWITCH-users mailing list
>>> > FreeSWITCH-users at lists.freeswitch.org
>>> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> > http://www.freeswitch.org
>>> >
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> 
>>> 
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list