[Speex-dev] app_conference(Asterisk) with Speex
Steve Kann
stevek at stevek.com
Tue Jan 31 14:52:38 PST 2006
Jean-Marc Valin wrote:
>Just curious, how does Asterisk pack Speex frames in a packet. AFAIK,
>Linphone just sends raw packets, as specified in the RTP draft.
>
>
Asterisk expects speex frames to have a terminator. The phone I was
referring to was the X-Ten/X-Lite phones, which seemed to be adding
something _before_ the speex data to indicate the length of the frames.
There's a little bug report (which died) here:
http://bugs.digium.com/view.php?id=3076
Also, since then, I have written, and added to asterisk and iaxclient (I
think I probably posted the code to this list, but if not, and if you're
interested in putting it in libspeex, that would be nice too), a couple
of functions which can quickly parse speex data to determine how many
20ms frames they contain.
the function is: *static* *int* *speex_get_samples*(*unsigned* *char*
*data, *int* len), and you just point it at some speex data, it it
returns the number of samples that are there. Look for it at:
http://cvs.sourceforge.net/viewcvs.py/iaxclient/iaxclient/lib/libiax2/src/iax.c?rev=1.71&view=markup
-SteveK
> Jean-Marc
>
>Le mardi 31 janvier 2006 à 10:43 -0500, Steve Kann a écrit :
>
>
>>jonathan blais wrote:
>>
>>
>>>I'm using Linphone. I tested with Asterisk and Speex only, I created
>>>a channel with echo and it worked. It seems to have problem when
>>>using app_conference.
>>>
>>>
>>If you just use app_echo, then asterisk won't be trying to decode your
>>frames; it will just be sending them back to you. Therefore, if your
>>client is using an incompatible packing of the frames, it won't
>>matter, as long as your client can also understand it.
>>
>>In order to determine if your client is using a compatible packing,
>>you'll need to have asterisk do something which requires asterisk to
>>decode the frames: Like bridge the call to a channel using another
>>codec, or record the call to a non-speex format (i.e. write to a PCM
>>WAV file), etc.
>>
>>-SteveK
>>
>>
>>
>>>Jonathan
>>>
>>>2006/1/31, Steve Kann <stevek at stevek.com>:
>>> jonathan blais wrote:
>>>
>>> > Hi,
>>> >
>>> > Does anyone ever used Speex with app_conference in
>>> Asterisk ? I'm
>>> > having a hard time to figure why I always get this error
>>> "warning:
>>> > Invalid mode encountered: corrupted stream?".
>>>
>>> Yes, we do this all the time. Where are your speex frames
>>> coming from?
>>> There's some SIP phones out there which seem to use an
>>> incompatible
>>> speex encoding, I seem to recall.
>>>
>>>
>>> -SteveK
>>>
>>>
>>>
>>>
>>>
>>>
>>_______________________________________________
>>Speex-dev mailing list
>>Speex-dev at xiph.org
>>http://lists.xiph.org/mailman/listinfo/speex-dev
>>
>>
More information about the Speex-dev
mailing list