Alex,

On Sun, Feb 8, 2009 at 9:28 PM, Alexander Chemeris
<alexander.cheme...@sipez.com> wrote:
> Hi David,
>
> On Fri, Feb 6, 2009 at 11:52 PM, D. S. <dsuhpub...@gmail.com> wrote:
>> As it stands, G.722 sessions will not connect using Recon with sipXtapi.
>> The reason is that G.722 sessions are negotiated with 8000 as the
>> sample rate even though it actually operates at 16000.
>> See sec. 4.5.2 in RFC3551 and the following link:
>> http://en.wikipedia.org/wiki/G.722
>
> Yes, this is a known problem, and it's already workarounded in
> sipXtapi. Look at following lines:
> sipXtackLib\src\net\SdpBody.cpp:1272
> sipXtackLib\src\net\SdpBody.cpp:1778
> sipXtackLib\src\net\SdpHelper.cpp:220
>
> So if it does not work with recon, it's a problem with recon I guess.
> I recall I tested this with some phones and it worked.

Thank you for pointing me to this.
This would require Recon to hack the sample rate passed to sipXsdpLib
because Recon uses Resiprocate for the SIP stack.
IMHO, it would be better to make changes to the static tables in
SdpDefaultCodecFactory.cpp and plgg722.c because it would be handled
by the SDP library itself for all calling SIP stacks.
Static data changes are simpler than coded if-thens.
Of course, your mileage may vary if something depends on this somehow
and breaks.

>
>> My patch also changes the default internal sample rate of the codec to
>> get it working with the default internal sipXtapi sample rate of 8000.
>
> It's a very different patch, please do not mix several changes into
> a single one. You can use things like Mercurial queues to maintain
> sets of patches.
>
> Please, upload clean version of this patch to http://codereview.appspot.com/
> Choose "sipXtapi/main branch" and add me (Alexander.Chemeris)
> as a reviewer.

Thanks for the tip.
I don't submit many patches but I'm learning.

>
> Actually we should pass flowgraph samplerate to a codec
> to let it choose the best output samplerate. But this require
> quite a few of changes in codec API.
>
>> How do you build sipXtapi to use an internal sample rate of 16000?
>
> Added this to FAQ:
> http://sipxtapi.sipfoundry.org/wiki/Frequently_Asked_Questions

Much appreciated.

>
> --
> Regards,
> Alexander Chemeris.
>
> SIPez LLC.
> SIP VoIP, IM and Presence Consulting
> http://www.SIPez.com
> tel: +1 (617) 273-4000
>
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev@list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to