[svn-commits] rmudgett: trunk r310637 - in /trunk: ./ main/callerid.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 14 11:55:34 CDT 2011


Author: rmudgett
Date: Mon Mar 14 11:55:30 2011
New Revision: 310637

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=310637
Log:
Merged revisions 310636 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310636 | rmudgett | 2011-03-14 11:50:59 -0500 (Mon, 14 Mar 2011) | 39 lines
  
  Merged revisions 310635 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310635 | rmudgett | 2011-03-14 11:47:54 -0500 (Mon, 14 Mar 2011) | 32 lines
    
    Merged revisions 310633 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310633 | rmudgett | 2011-03-14 11:38:24 -0500 (Mon, 14 Mar 2011) | 25 lines
      
      "Caller*ID failed checksum" on Wildcard TDM2400P and TDM410
      
      The last character in the caller id message is getting a framing error.
      
      The checksum is the last character in the message.  A framing error in the
      checksum could be because:
      1) The sender did not send a full stop bit.
      2) The sender cut off the FSK carrier too soon.
      3) The sender opted to send zero of the specified zero to 10 trailing mark
      bits and round-off errors in the code resulted in the code not being where
      it thought it was in the demodulated bit stream.
      
      Bit 8 of 'b' is set when parity error.
      Bit 9 of 'b' is set when framing error.
      
      Made ignore the framing and parity error bits if the errored character is
      the checksum.  We can tolerate a framing/parity error there.  The checksum
      character validates the message.
      
      (closes issue #18474)
      Reported by: nivek
      Patches:
            callerid.c.1.patch uploaded by nivek (license 636) (with modifications)
      Tested by: nivek
    ........
  ................
................

Modified:
    trunk/   (props changed)
    trunk/main/callerid.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/main/callerid.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/callerid.c?view=diff&rev=310637&r1=310636&r2=310637
==============================================================================
--- trunk/main/callerid.c (original)
+++ trunk/main/callerid.c Mon Mar 14 11:55:30 2011
@@ -568,9 +568,22 @@
 			return -1;
 		}
 		if (res == 1) {
-			/* Ignore invalid bytes */
-			if (b > 0xff)
-				continue;
+			if (b > 0xff) {
+				if (cid->sawflag != 5) {
+					/* Ignore invalid bytes */
+					continue;
+				}
+				/*
+				 * We can tollerate an error on the checksum character since the
+				 * checksum character is the last character in the message and
+				 * it validates the message.
+				 *
+				 * Remove character error flags.
+				 * Bit 8 : Parity error
+				 * Bit 9 : Framing error
+				 */
+				b &= 0xff;
+			}
 			switch (cid->sawflag) {
 			case 0: /* Look for flag */
 				if (b == 'U')




More information about the svn-commits mailing list