[Asterisk-cvs] libpri-matt pri_facility.c,1.7,1.8 q931.c,1.8,1.9
mattf at lists.digium.com
mattf at lists.digium.com
Thu Dec 30 09:21:35 CST 2004
Update of /usr/cvsroot/libpri-matt
In directory mongoose.digium.com:/tmp/cvs-serv26421
Modified Files:
pri_facility.c q931.c
Log Message:
More changes for "scheduling" facility IEs to Tx
Index: pri_facility.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/pri_facility.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pri_facility.c 27 Dec 2004 21:43:08 -0000 1.7
+++ pri_facility.c 30 Dec 2004 14:16:17 -0000 1.8
@@ -182,6 +182,7 @@
return -1;
}
+#if 0
FUNC_SEND(transmit_facility)
{
int i = 0;
@@ -273,6 +274,7 @@
return 0;
}
+#endif
FUNC_RECV(receive_facility)
{
Index: q931.c
===================================================================
RCS file: /usr/cvsroot/libpri-matt/q931.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- q931.c 29 Dec 2004 19:26:49 -0000 1.8
+++ q931.c 30 Dec 2004 14:16:17 -0000 1.9
@@ -1424,6 +1424,38 @@
}
#endif
+FUNC_SEND(transmit_facility)
+{
+ struct adpu_event *tmp = call->adpus;
+ int i = 0;
+
+ while (tmp) {
+ if (tmp->message = msgtype)
+ break;
+ }
+
+ if (tmp->adpu_len > 255) {
+ pri_message("Requested ADPU (%d bytes) is too long\n", tmp->adpu_len);
+ return 0;
+ }
+
+ ie->data[i++] = ROSE_NETWORK_EXTENSION | 0x80;
+ comp = (struct rose_component*)&ie->data[i];
+
+ comp->type = COMP_TYPE_INTERPRETATION;
+ comp->len = 0x01;
+ comp->data[0] = 0x00;
+ i += 3;
+
+ comp->type = COMP_TYPE_INVOKE;
+ comp->len = tmp->adpu_len;
+ i += 2;
+ memcpy(comp->data, tmp->adpu, tmp->adpu_len);
+ i += adpu_len;
+
+ return i + 2;
+}
+
static FUNC_DUMP(dump_network_spec_fac)
{
pri_message("%c Network-Specific Facilities (len=%2d) [ ", prefix, ie->len);
@@ -2198,7 +2230,7 @@
#ifdef ALERTING_NO_PROGRESS
static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, -1 };
#else
-static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
+static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, Q931_IE_FACILITY, -1 };
#endif
int q931_call_proceeding(struct pri *pri, q931_call *c, int channel, int info)
@@ -2223,7 +2255,7 @@
return send_message(pri, c, Q931_CALL_PROCEEDING, call_proceeding_ies);
}
#ifndef ALERTING_NO_PROGRESS
-static int alerting_ies[] = { Q931_PROGRESS_INDICATOR, -1 };
+static int alerting_ies[] = { Q931_PROGRESS_INDICATOR, Q931_IE_FACILITY, -1 };
#else
static int alerting_ies[] = { -1 };
#endif
More information about the svn-commits
mailing list