[svn-commits] rmudgett: branch rmudgett/libpri37 r1891 - /team/rmudgett/libpri37/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 25 16:02:11 CDT 2010


Author: rmudgett
Date: Wed Aug 25 16:02:07 2010
New Revision: 1891

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1891
Log:
Add support to receive ECMA-164 2nd edition OID name ROSE messages.

NOTE: To add support to send the old style name messages will require
implementing them as new ROSE operation message types.

Modified:
    team/rmudgett/libpri37/rose.c
    team/rmudgett/libpri37/rosetest.c

Modified: team/rmudgett/libpri37/rose.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/libpri37/rose.c?view=diff&rev=1891&r1=1890&r2=1891
==============================================================================
--- team/rmudgett/libpri37/rose.c (original)
+++ team/rmudgett/libpri37/rose.c Wed Aug 25 16:02:07 2010
@@ -761,6 +761,21 @@
 /* ------------------------------------------------------------------- */
 
 
+/*
+ * Note the first value in oid.values[] is really the first two
+ * OID subidentifiers.  They are compressed using this formula:
+ * First_Value = (First_Subidentifier * 40) + Second_Subidentifier
+ */
+
+/*! \brief ECMA private-isdn-signalling-domain prefix. */
+static const struct asn1_oid rose_qsig_isdn_domain = {
+/* *INDENT-OFF* */
+	/* {iso(1) identified-organization(3) icd-ecma(12) private-isdn-signalling-domain(9)} */
+	3, { 43, 12, 9 }
+/* *INDENT-ON* */
+};
+
+
 /*! \brief Q.SIG specific invoke/result encode/decode message table */
 static const struct rose_convert_msg rose_qsig_msgs[] = {
 /* *INDENT-OFF* */
@@ -770,7 +785,7 @@
  *			decode_invoke_args,                     decode_result_args
  */
 	/*
-	 * localValue's from Q.SIG Name-Operations
+	 * localValue's from Q.SIG Name-Operations 4th edition
 	 * { iso(1) standard(0) pss1-name(13868) name-operations(0) }
 	 */
 	{
@@ -790,6 +805,31 @@
 	},
 	{
 		ROSE_QSIG_BusyName,							NULL, 3,
+			rose_enc_qsig_BusyName_ARG,				NULL,
+			rose_dec_qsig_BusyName_ARG,				NULL
+	},
+
+	/*
+	 * globalValue's (OIDs) from Q.SIG Name-Operations 2nd edition
+	 * { iso(1) identified-organization(3) icd-ecma(12) standard(0) qsig-name(164) name-operations(0) }
+	 */
+	{
+		ROSE_QSIG_CallingName,						&rose_qsig_isdn_domain, 0,
+			rose_enc_qsig_CallingName_ARG,			NULL,
+			rose_dec_qsig_CallingName_ARG,			NULL
+	},
+	{
+		ROSE_QSIG_CalledName,						&rose_qsig_isdn_domain, 1,
+			rose_enc_qsig_CalledName_ARG,			NULL,
+			rose_dec_qsig_CalledName_ARG,			NULL
+	},
+	{
+		ROSE_QSIG_ConnectedName,					&rose_qsig_isdn_domain, 2,
+			rose_enc_qsig_ConnectedName_ARG,		NULL,
+			rose_dec_qsig_ConnectedName_ARG,		NULL
+	},
+	{
+		ROSE_QSIG_BusyName,							&rose_qsig_isdn_domain, 3,
 			rose_enc_qsig_BusyName_ARG,				NULL,
 			rose_dec_qsig_BusyName_ARG,				NULL
 	},

Modified: team/rmudgett/libpri37/rosetest.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/libpri37/rosetest.c?view=diff&rev=1891&r1=1890&r2=1891
==============================================================================
--- team/rmudgett/libpri37/rosetest.c (original)
+++ team/rmudgett/libpri37/rosetest.c Wed Aug 25 16:02:07 2010
@@ -2837,6 +2837,42 @@
 /* *INDENT-ON* */
 };
 
+static unsigned char rose_qsig_name_2nd_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:26 <1A>
+ *		Integer(2 0x02) <02> Len:1 <01>
+ *			<40> - "@"
+ *		OID(6 0x06) <06> Len:4 <04>
+ *			<2B 0C 09 00> - "+~~~"
+ *		Context Specific [0 0x00] <80> Len:15 <0F>
+ *			<4D 6F 64 65 6D 20 44 69-73 63 6F 42 61 6C 6C> - "Modem DiscoBall"
+ */
+	0x91,
+	0xaa, 0x06,
+		0x80, 0x01,
+			0x00,
+		0x82, 0x01,
+			0x00,
+		0x8b, 0x01,
+			0x00,
+	0xa1, 0x1a,
+		0x02, 0x01,
+			0x40,
+		0x06, 0x04,
+			0x2b, 0x0c, 0x09, 0x00,
+		0x80, 0x0f,
+			0x4d, 0x6f, 0x64, 0x65, 0x6d, 0x20, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x42, 0x61, 0x6c, 0x6c
+/* *INDENT-ON* */
+};
+
 
 static const struct rose_message rose_dms100_msgs[] = {
 /* *INDENT-OFF* */
@@ -3132,6 +3168,9 @@
 	rose_test_exception(&dummy_ctrl, "Alternate name encoded messages",
 		rose_qsig_name_alt_encode_msg, sizeof(rose_qsig_name_alt_encode_msg));
 
+	rose_test_exception(&dummy_ctrl, "2nd edition name encoded messages",
+		rose_qsig_name_2nd_encode_msg, sizeof(rose_qsig_name_2nd_encode_msg));
+
 /* ------------------------------------------------------------------- */
 
 	pri_message(&dummy_ctrl, "\n\n"




More information about the svn-commits mailing list