[Asterisk-cvs] libpri-matt pri_facility.c,1.11,1.12
mattf at lists.digium.com
mattf at lists.digium.com
Thu Jan 13 13:44:20 CST 2005
- Previous message: [Asterisk-cvs] zaptel tor2.c, 1.19, 1.19.2.1 torisa.c, 1.8,
1.8.2.1 wcfxo.c, 1.25, 1.25.2.1 wcfxs.c, 1.84.2.2,
1.84.2.3 wct1xxp.c, 1.19, 1.19.2.1 wct4xxp.c, 1.51,
1.51.2.1 wcte11xp.c, 1.1.2.1, 1.1.2.2 zaptel.c, 1.95.2.2,
1.95.2.3 ztdummy.c, 1.4, 1.4.2.1 ztdynamic.c, 1.7, 1.7.2.1
- Next message: [Asterisk-cvs] asterisk/channels chan_sip.c,1.630,1.631
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/libpri-matt
In directory mongoose.digium.com:/tmp/cvs-serv21534
Modified Files:
pri_facility.c
Log Message:
Forgot to 'OR' the string on encode
Index: pri_facility.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/pri_facility.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pri_facility.c 13 Jan 2005 01:58:05 -0000 1.11
+++ pri_facility.c 13 Jan 2005 19:48:15 -0000 1.12
@@ -52,7 +52,8 @@
{
int res = 0, i = 0;
unsigned char * buffer = NULL;
- int destlen = strlen(req->called);
+ int destlen = strlen(call->callednum);
+ int istr = 0;
/* TODO:1 */
buffer = malloc(255);
@@ -65,12 +66,20 @@
} else if (destlen > 20)
destlen = 20; /* Destination number cannot be greater then 20 digits */
+
+
+
buffer[i++] = 0x30; /* Sequence */
buffer[i++] = 5 /* All fixed length necessary parts */
+ destlen;
buffer[i++] = 0x80; /* PartyNumber */
buffer[i++] = destlen;
- strncpy(&buffer[i], req->called, destlen);
+
+ strncpy(&buffer[i], call->callednum, destlen);
+
+ for (istr = 0; istr < destlen; istr++)
+ buffer[i+istr] |= 0x30; /* Have to or each digit with 0x30 to encode correctly */
+
i += destlen;
buffer[i++] = 0xa; /* Enumeration: basicService */
buffer[i++] = 0x1; /* Length */
@@ -343,6 +352,9 @@
case COMP_TYPE_NFE:
if (pri->debug) pri_message("Handle NFE component\n");
break;
+ case COMP_TYPE_REJECT:
+ if (pri->debug) pri_message("Got reject\n");
+ break;
default:
if (pri->debug) pri_message("Don't know how to handle ROSE component of type 0x%X\n", comp->type);
break;
- Previous message: [Asterisk-cvs] zaptel tor2.c, 1.19, 1.19.2.1 torisa.c, 1.8,
1.8.2.1 wcfxo.c, 1.25, 1.25.2.1 wcfxs.c, 1.84.2.2,
1.84.2.3 wct1xxp.c, 1.19, 1.19.2.1 wct4xxp.c, 1.51,
1.51.2.1 wcte11xp.c, 1.1.2.1, 1.1.2.2 zaptel.c, 1.95.2.2,
1.95.2.3 ztdummy.c, 1.4, 1.4.2.1 ztdynamic.c, 1.7, 1.7.2.1
- Next message: [Asterisk-cvs] asterisk/channels chan_sip.c,1.630,1.631
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list