[libss7-commits] mattf: trunk r28 - in /trunk: isup.c libss7.h
libss7-commits at lists.digium.com
libss7-commits at lists.digium.com
Wed Aug 23 10:15:40 MST 2006
Author: mattf
Date: Wed Aug 23 12:15:40 2006
New Revision: 28
URL: http://svn.digium.com/view/libss7?rev=28&view=rev
Log:
Add circuit group blocking/unblocking support as well as acknowledgement
Modified:
trunk/isup.c
trunk/libss7.h
Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?rev=28&r1=27&r2=28&view=diff
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Wed Aug 23 12:15:40 2006
@@ -53,7 +53,7 @@
static int rel_params[] = { ISUP_PARM_CAUSE, -1};
-static int grs_params[] = { ISUP_PARM_RANGE_AND_STATUS, -1};
+static int cicgroup_params[] = { ISUP_PARM_RANGE_AND_STATUS, -1};
static int cot_params[] = { ISUP_PARM_CONTINUITY_IND, -1};
@@ -72,8 +72,12 @@
{ISUP_CON, 1, 0, 1, con_params},
{ISUP_REL, 0, 1, 1, rel_params},
{ISUP_RLC, 0, 0, 1, empty_params},
- {ISUP_GRS, 0, 1, 0, grs_params},
- {ISUP_GRA, 0, 1, 0, grs_params},
+ {ISUP_GRS, 0, 1, 0, cicgroup_params},
+ {ISUP_GRA, 0, 1, 0, cicgroup_params},
+ {ISUP_CGB, 0, 1, 0, cicgroup_params},
+ {ISUP_CGU, 0, 1, 0, cicgroup_params},
+ {ISUP_CGBA, 0, 1, 0, cicgroup_params},
+ {ISUP_CGUA, 0, 1, 0, cicgroup_params},
{ISUP_COT, 1, 0, 0, cot_params},
{ISUP_CCR, 0, 0, 0, empty_params},
{ISUP_BLO, 0, 0, 0, empty_params},
@@ -113,6 +117,14 @@
return "BLA";
case ISUP_UBA:
return "UBA";
+ case ISUP_CGB:
+ return "CGB";
+ case ISUP_CGU:
+ return "CGU";
+ case ISUP_CGBA:
+ return "CGBA";
+ case ISUP_CGUA:
+ return "CGUA";
default:
return "Unknown";
}
@@ -420,8 +432,14 @@
statuslen = (numcics / 8) + !!(numcics % 8);
- for (i = 0; i < statuslen; i++) {
- parm[1 + i] = 0;
+ if (messagetype == ISUP_GRA) {
+ for (i = 0; i < statuslen; i++) {
+ parm[1 + i] = 0;
+ }
+ } else {
+ for (i = 0; i < statuslen; i++) {
+ parm[1 + i] = 0xff;
+ }
}
return statuslen + 1;
@@ -987,26 +1005,60 @@
e->uba.cic = c->cic;
isup_free_call(ss7, c);
return 0;
+ case ISUP_CGB:
+ e->e = ISUP_EVENT_CGB;
+ e->cgb.startcic = cic;
+ e->cgb.endcic = cic + c->range;
+ isup_free_call(ss7, c);
+ return 0;
+ case ISUP_CGU:
+ e->e = ISUP_EVENT_CGU;
+ e->cgu.startcic = cic;
+ e->cgu.endcic = cic + c->range;
+ isup_free_call(ss7, c);
+ return 0;
default:
ss7_error(ss7, "!! Unable to handle message type %s\n", message2str(mh->type));
return -1;
}
}
-int isup_grs(struct ss7 *ss7, int begincic, int endcic)
+static int isup_send_cicgroupmessage(struct ss7 *ss7, int messagetype, int begincic, int endcic)
{
struct isup_call call;
call.cic = begincic;
call.range = endcic - begincic;
- return isup_send_message(ss7, &call, ISUP_GRS, grs_params);
+ return isup_send_message(ss7, &call, messagetype, cicgroup_params);
+}
+
+int isup_grs(struct ss7 *ss7, int begincic, int endcic)
+{
+ return isup_send_cicgroupmessage(ss7, ISUP_GRS, begincic, endcic);
}
int isup_gra(struct ss7 *ss7, int begincic, int endcic)
{
- struct isup_call call;
- call.cic = begincic;
- call.range = endcic - begincic;
- return isup_send_message(ss7, &call, ISUP_GRA, grs_params);
+ return isup_send_cicgroupmessage(ss7, ISUP_GRA, begincic, endcic);
+}
+
+int isup_cgb(struct ss7 *ss7, int begincic, int endcic)
+{
+ return isup_send_cicgroupmessage(ss7, ISUP_CGB, begincic, endcic);
+}
+
+int isup_cgu(struct ss7 *ss7, int begincic, int endcic)
+{
+ return isup_send_cicgroupmessage(ss7, ISUP_CGU, begincic, endcic);
+}
+
+int isup_cgba(struct ss7 *ss7, int begincic, int endcic)
+{
+ return isup_send_cicgroupmessage(ss7, ISUP_CGBA, begincic, endcic);
+}
+
+int isup_cgua(struct ss7 *ss7, int begincic, int endcic)
+{
+ return isup_send_cicgroupmessage(ss7, ISUP_CGUA, begincic, endcic);
}
int isup_iam(struct ss7 *ss7, struct isup_call *c)
Modified: trunk/libss7.h
URL: http://svn.digium.com/view/libss7/trunk/libss7.h?rev=28&r1=27&r2=28&view=diff
==============================================================================
--- trunk/libss7.h (original)
+++ trunk/libss7.h Wed Aug 23 12:15:40 2006
@@ -109,6 +109,8 @@
ss7_event_cicrange gra;
ss7_event_cicrange cgb;
ss7_event_cicrange cgu;
+ ss7_event_cicrange cgba;
+ ss7_event_cicrange cgua;
ss7_event_rel rel;
ss7_event_ciconly rlc;
ss7_event_anm anm;
@@ -176,6 +178,14 @@
int isup_grs(struct ss7 *ss7, int begincic, int endcic);
+int isup_cgb(struct ss7 *ss7, int begincic, int endcic);
+
+int isup_cgu(struct ss7 *ss7, int begincic, int endcic);
+
+int isup_cgba(struct ss7 *ss7, int begincic, int endcic);
+
+int isup_cgua(struct ss7 *ss7, int begincic, int endcic);
+
int isup_blo(struct ss7 *ss7, int cic);
int isup_ubl(struct ss7 *ss7, int cic);
More information about the libss7-commits
mailing list