[libpri-commits] rmudgett: branch 1.4 r1904 - in /branches/1.4: rose.c rosetest.c
SVN commits to the libpri project
libpri-commits at lists.digium.com
Fri Aug 27 10:54:21 CDT 2010
Author: rmudgett
Date: Fri Aug 27 10:54:17 2010
New Revision: 1904
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1904
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.
NOTE: To actually use them would likely require implementing another
version of the Q.SIG switch type. Like (NI1 & NI2) and (4ess & 5ess) for
example.
Patches:
libpri37.patch uploaded by rmudgett (license 664)
JIRA SWP-2100
JIRA LIBPRI-37
Modified:
branches/1.4/rose.c
branches/1.4/rosetest.c
Modified: branches/1.4/rose.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/rose.c?view=diff&rev=1904&r1=1903&r2=1904
==============================================================================
--- branches/1.4/rose.c (original)
+++ branches/1.4/rose.c Fri Aug 27 10:54:17 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,34 @@
},
{
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) }
+ *
+ * This older version of the Q.SIG switch is not supported.
+ * However, we will accept receiving these messages anyway.
+ */
+ {
+ 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: branches/1.4/rosetest.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/rosetest.c?view=diff&rev=1904&r1=1903&r2=1904
==============================================================================
--- branches/1.4/rosetest.c (original)
+++ branches/1.4/rosetest.c Fri Aug 27 10:54:17 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 libpri-commits
mailing list