[Freeswitch-users] Codec negotiation with carriers

Michael Collins msc at freeswitch.org
Fri Mar 16 02:44:13 MSK 2012


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120315/be12a872/attachment-0001.html 


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