[Asterisk-Users] New DIAX - version 0.9.4 - a big step forward - available for download

Steve Kann stevek at stevek.com
Mon Nov 24 08:42:12 MST 2003


On Nov 23, 2003, at 11:27 AM, Florian Overkamp wrote:

> Citeren Dan <dtoma at fx.ro>:
>
>> DIAX 0.9.4 is available for download from the same place:
>> http://www.laser.com/dante
>> or
>> http://www.geocities.com/tdanro
>
>> - the phonebook is now in a separate file;
>
> Duh, I can't read :-)
>
> Another issue I've just seen, however :-)
>
> When I'm passing a call from a Zap channel (PRI) I get an error: 
> STATUS: Bad
> or incomplete voice
>
> (See attached file).
>
> I've also noticed this with iaxComm, so I don't think it is DIAX 
> specific, but
> I would _love_ to know what it's about :-((

This is because the function audio_decode in file audio_encode.c 
failed.  The function itself is pretty small, so I'll just paste it 
here:


/* decode encoded audio; return the number of bytes decoded
  * negative indicates error
  * XXX out MUST be 160 bytes */
int decode_audio(struct iaxc_call *call, void *out, void *data, int 
len, int iEncodeType)
{
         if(len == 0) {
                 fprintf(stderr, "Empty voice frame\n");
                 return -1;
         }

         switch (iEncodeType) {
         case AST_FORMAT_GSM:
                 if(len % 33) {
                         fprintf(stderr, "Weird gsm frame, not a 
multiple of 33 (len = %d.\n", len);
                         return -1;
                 }
                 if (!call->gsmin)
                     call->gsmin = gsm_create();

                 if(gsm_decode(call->gsmin, data, out))
                     return -1;
                 output_postprocess(out, 160);
                 return 33;
                 break;
         }

         /* unknown type */
         return -1;
}

So, there's three places this could fail:
1) The frame that's been passed in is empty.
2) The frame is not GSM
3) The frame is GSM, but it's length is not a multiple of 33.
4) The frame is GSM, but could not be decoded.


My guess is that (2) is your problem, although I've seen a case where a 
user reported (3) happening to them.

Seems like a good time to use the new ethereal plugin?  [I'm guessing 
that both DIAX and the usual iaxcomm builds are currently suppressing 
stderr, which would at least print the actual error].

-SteveK





More information about the asterisk-users mailing list