[svn-commits] rmudgett: branch 1.4 r1828 - in /branches/1.4: rose_qsig_name.c rosetest.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 16 11:37:12 CDT 2010


Author: rmudgett
Date: Fri Jul 16 11:37:07 2010
New Revision: 1828

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1828
Log:
Calling name not successfully processed on inbound QSIG PRI calls from Mitel PBX

The alternate form of the Q.SIG Name sequence that allows manufacturer
extensions for CallingName, CalledName, ConnectedName, and BusyName was
not consuming the next ASN.1 tag.  The code that processed the ASN.1 Name
structure was then using a stale tag value.  The stale tag value was then
rejected with the "Did not expect" message.

I have added a test case using the supplied PRI debug output to the
rosetest utility to verify that this alternate encoding is tested in the
future.

(closes issue #17619)
Reported by: jims8650
Patches:
      issue17619_v1.4.11.3.patch uploaded by rmudgett (license 664)
Tested by: rmudgett

Modified:
    branches/1.4/rose_qsig_name.c
    branches/1.4/rosetest.c

Modified: branches/1.4/rose_qsig_name.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/rose_qsig_name.c?view=diff&rev=1828&r1=1827&r2=1828
==============================================================================
--- branches/1.4/rose_qsig_name.c (original)
+++ branches/1.4/rose_qsig_name.c Fri Jul 16 11:37:07 2010
@@ -382,6 +382,7 @@
 		ASN1_CALL(pos, asn1_dec_length(pos, end, &length));
 		ASN1_END_SETUP(seq_end, seq_offset, length, pos, end);
 
+		ASN1_CALL(pos, asn1_dec_tag(pos, seq_end, &tag));
 		ASN1_CALL(pos, rose_dec_qsig_Name(ctrl, "name", tag, pos, seq_end,
 			&party->name));
 

Modified: branches/1.4/rosetest.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/rosetest.c?view=diff&rev=1828&r1=1827&r2=1828
==============================================================================
--- branches/1.4/rosetest.c (original)
+++ branches/1.4/rosetest.c Fri Jul 16 11:37:07 2010
@@ -2799,6 +2799,44 @@
 /* *INDENT-ON* */
 };
 
+static unsigned char rose_qsig_name_alt_encode_msg[] = {
+/* *INDENT-OFF* */
+/*
+ *	Context Specific/C [10 0x0A] <AA> Len:6 <06>
+ *		Context Specific [0 0x00] <80> Len:1 <01>
+ *			<00> - "~"
+ *		Context Specific [2 0x02] <82> Len:1 <01>
+ *			<00> - "~"
+ *	Context Specific [11 0x0B] <8B> Len:1 <01>
+ *		<00> - "~"
+ *	Context Specific/C [1 0x01] <A1> Len:21 <15>
+ *		Integer(2 0x02) <02> Len:1 <01>
+ *			<1D> - "~"
+ *		Integer(2 0x02) <02> Len:1 <01>
+ *			<00> - "~"
+ *		Sequence/C(48 0x30) <30> Len:13 <0D>
+ *			Context Specific [0 0x00] <80> Len:11 <0B>
+ *				<55 54 49 4C 49 54 59 20-54 45 4C> - "UTILITY TEL"
+ */
+	0x9F,
+	0xAA, 0x06,
+		0x80, 0x01,
+			0x00,
+		0x82, 0x01,
+			0x00,
+		0x8B, 0x01,
+			0x00,
+	0xA1, 0x15,
+		0x02, 0x01,
+			0x1D,
+		0x02, 0x01,
+			0x00,
+		0x30, 0x0D,
+			0x80, 0x0B,
+				0x55, 0x54, 0x49, 0x4C, 0x49, 0x54, 0x59, 0x20, 0x54, 0x45, 0x4C
+/* *INDENT-ON* */
+};
+
 
 static const struct rose_message rose_dms100_msgs[] = {
 /* *INDENT-OFF* */
@@ -3087,6 +3125,9 @@
 	rose_test_exception(&dummy_ctrl, "Multiple component messages",
 		rose_qsig_multiple_msg, sizeof(rose_qsig_multiple_msg));
 
+	rose_test_exception(&dummy_ctrl, "Alternate name encoded messages",
+		rose_qsig_name_alt_encode_msg, sizeof(rose_qsig_name_alt_encode_msg));
+
 /* ------------------------------------------------------------------- */
 
 	pri_message(&dummy_ctrl, "\n\n"




More information about the svn-commits mailing list