[Asterisk-Dev] SIP PA168-based phones calling-in crashes related
todivision by 0 at __ast_dsp_silence
Lin Rongrong
woody at aredfox.com
Sun Oct 10 15:04:34 MST 2004
>From PA1688 software point of view, the 0 length error rtp packet
was sent when rtp opens to solve NAT udp mapping problem. So maybe
the check of 0 length rtp packet should be done earlier in asterisk
software, when any rtp data packet received, check the length, and
if the length is 0, ignore the whole packet.
When you are sure that your PBX and phone works on the same LAN
and no NAT problem at all, you can also change the PA1688 software
from sending this packet, do not call RtpSendNatHint() in v_task.c
is ok. We will also consider to add an option to prevent this from
called in 1.39.
Woody
Welcome to use more PA1688 resources on internet:
Mailing list in Yahoo: http://groups.yahoo.com/group/pa1688/
Discussion Forum: http://bbs.chinagk.org/dispbbs.asp?boardID=14
----- Original Message -----
From: "Mynet Asterisk Dev Team" <asterisk at mynet.it>
To: "Asterisk Dev" <asterisk-dev at lists.digium.com>
Sent: Monday, October 11, 2004 3:17 AM
Subject: [Asterisk-Dev] SIP PA168-based phones calling-in crashes related
todivision by 0 at __ast_dsp_silence
> After upgrading some cheap PA168 phones to firmware version 1.38, trying
> to make a call throught Aterisk from these phones lead to an hardcrash.
>
> After investigating with gdb, I found a division by 0.
>
> This patch:
>
> --- dsp.c~ Wed Mar 24 00:10:35 2004
> +++ dsp.c Sat Oct 9 15:38:45 2004
> @@ -1219,7 +1219,7 @@
> accum = 0;
> for (x=0;x<len; x++)
> accum += abs(s[x]);
> - accum /= len;
> + if (len == 0) accum = 0; else accum /= len;
> if (accum < dsp->threshold) {
> dsp->totalsilence += len/8;
> if (dsp->totalnoise) {
>
> cured the problem.
>
> Cheers,
> Giovanni
>
> --
> Mynet Internet Solutions
> http://www.mynet.it/
>
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
More information about the asterisk-dev
mailing list