Just curious, how does Asterisk pack Speex frames in a packet. AFAIK, Linphone just sends raw packets, as specified in the RTP draft. 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@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@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20060201/71932cd1/attachment.pgp
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@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@xiph.org >>http://lists.xiph.org/mailman/listinfo/speex-dev >> >>
> Asterisk expects speex frames to have a terminator.Then it might just be that Linphone is using a version of Speex that had a bug in the terminator code. Jonathan, try making sure Linphone uses Speex 1.1.11.1> 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=markupThat would probably be useful. If you ever feel like implementing it in terms of SpeexBits and internal Speex mode structs, I will add it to Speex. Jean-Marc> -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@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@xiph.org > >>http://lists.xiph.org/mailman/listinfo/speex-dev > >> > >> > >-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20060201/11ce2d39/attachment.pgp