[libss7-commits] mattf: trunk r23 - in /trunk: README isup.c
libss7.h
libss7-commits at lists.digium.com
libss7-commits at lists.digium.com
Fri Aug 18 15:32:44 MST 2006
Author: mattf
Date: Fri Aug 18 17:32:44 2006
New Revision: 23
URL: http://svn.digium.com/view/libss7?rev=23&view=rev
Log:
Add a few more messages. Update the readme
Modified:
trunk/README
trunk/isup.c
trunk/libss7.h
Modified: trunk/README
URL: http://svn.digium.com/view/libss7/trunk/README?rev=23&r1=22&r2=23&view=diff
==============================================================================
--- trunk/README (original)
+++ trunk/README Fri Aug 18 17:32:44 2006
@@ -26,6 +26,13 @@
TODO:
=====
+
+short term:
+block/unblock
+SUS/RES
+CPG
+
+long term:
ANSI-style signalling support
Continuity check messages
SCCP support
Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?rev=23&r1=22&r2=23&view=diff
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Fri Aug 18 17:32:44 2006
@@ -53,13 +53,11 @@
static int rel_params[] = { ISUP_PARM_CAUSE, -1};
-static int rlc_params[] = { -1};
-
static int grs_params[] = { ISUP_PARM_RANGE_AND_STATUS, -1};
static int cot_params[] = { ISUP_PARM_CONTINUITY_IND, -1};
-static int ccr_params[] = { -1};
+static int empty_params[] = { -1};
static struct message_data {
int messagetype;
@@ -73,11 +71,15 @@
{ISUP_ANM, 0, 0, 1, anm_params},
{ISUP_CON, 1, 0, 1, con_params},
{ISUP_REL, 0, 1, 1, rel_params},
- {ISUP_RLC, 0, 0, 1, rlc_params},
+ {ISUP_RLC, 0, 0, 1, empty_params},
{ISUP_GRS, 0, 1, 0, grs_params},
{ISUP_GRA, 0, 1, 0, grs_params},
{ISUP_COT, 1, 0, 0, cot_params},
- {ISUP_CCR, 0, 0, 0, ccr_params},
+ {ISUP_CCR, 0, 0, 0, empty_params},
+ {ISUP_BLO, 0, 0, 0, empty_params},
+ {ISUP_UBL, 0, 0, 0, empty_params},
+ {ISUP_BLA, 0, 0, 0, empty_params},
+ {ISUP_UBA, 0, 0, 0, empty_params},
};
static int isup_send_message(struct ss7 *ss7, struct isup_call *c, int messagetype, int parms[]);
@@ -957,6 +959,26 @@
e->e = ISUP_EVENT_CCR;
e->ccr.cic = c->cic;
return 0;
+ case ISUP_BLO:
+ e->e = ISUP_EVENT_BLO;
+ e->blo.cic = c->cic;
+ isup_free_call(ss7, c);
+ return 0;
+ case ISUP_UBL:
+ e->e = ISUP_EVENT_UBL;
+ e->ubl.cic = c->cic;
+ isup_free_call(ss7, c);
+ return 0;
+ case ISUP_BLA:
+ e->e = ISUP_EVENT_BLA;
+ e->bla.cic = c->cic;
+ isup_free_call(ss7, c);
+ return 0;
+ case ISUP_UBA:
+ e->e = ISUP_EVENT_UBA;
+ e->uba.cic = c->cic;
+ isup_free_call(ss7, c);
+ return 0;
default:
ss7_error(ss7, "!! Unable to handle message type %s\n", message2str(mh->type));
return -1;
@@ -1013,8 +1035,37 @@
int isup_rlc(struct ss7 *ss7, struct isup_call *c)
{
int res;
- res = isup_send_message(ss7, c, ISUP_RLC, rlc_params);
+ res = isup_send_message(ss7, c, ISUP_RLC, empty_params);
isup_free_call(ss7, c);
return res;
}
+
+static int isup_send_message_ciconly(struct ss7 *ss7, int messagetype, int cic)
+{
+ int res;
+ struct isup_call c;
+ c.cic = cic;
+ res = isup_send_message(ss7, &c, messagetype, empty_params);
+ return res;
+}
+
+int isup_blo(struct ss7 *ss7, int cic)
+{
+ return isup_send_message_ciconly(ss7, ISUP_BLO, cic);
+}
+
+int isup_ubl(struct ss7 *ss7, int cic)
+{
+ return isup_send_message_ciconly(ss7, ISUP_UBL, cic);
+}
+
+int isup_bla(struct ss7 *ss7, int cic)
+{
+ return isup_send_message_ciconly(ss7, ISUP_BLA, cic);
+}
+
+int isup_uba(struct ss7 *ss7, int cic)
+{
+ return isup_send_message_ciconly(ss7, ISUP_UBA, cic);
+}
/* Janelle is the bomb (Again) */
Modified: trunk/libss7.h
URL: http://svn.digium.com/view/libss7/trunk/libss7.h?rev=23&r1=22&r2=23&view=diff
==============================================================================
--- trunk/libss7.h (original)
+++ trunk/libss7.h Fri Aug 18 17:32:44 2006
@@ -17,6 +17,10 @@
#define ISUP_EVENT_CON 12
#define ISUP_EVENT_COT 13
#define ISUP_EVENT_CCR 14
+#define ISUP_EVENT_BLO 15
+#define ISUP_EVENT_UBL 16
+#define ISUP_EVENT_BLA 17
+#define ISUP_EVENT_UBA 18
/* Different SS7 types */
#define SS7_ITU (1 << 0)
@@ -55,7 +59,7 @@
typedef struct {
int e;
int cic;
-} ss7_event_rlc;
+} ss7_event_ciconly;
typedef struct {
int e;
@@ -96,11 +100,6 @@
typedef struct {
int e;
- int cic;
-} ss7_event_ccr;
-
-typedef struct {
- int e;
unsigned int data;
} ss7_event_generic;
@@ -111,12 +110,16 @@
ss7_event_grs grs;
ss7_event_gra gra;
ss7_event_rel rel;
- ss7_event_rlc rlc;
+ ss7_event_ciconly rlc;
ss7_event_anm anm;
ss7_event_acm acm;
ss7_event_con con;
ss7_event_cot cot;
- ss7_event_ccr ccr;
+ ss7_event_ciconly ccr;
+ ss7_event_ciconly blo;
+ ss7_event_ciconly ubl;
+ ss7_event_ciconly bla;
+ ss7_event_ciconly uba;
} ss7_event;
void ss7_set_message(void (*func)(struct ss7 *ss7, char *message));
@@ -173,5 +176,13 @@
int isup_grs(struct ss7 *ss7, int begincic, int endcic);
+int isup_blo(struct ss7 *ss7, int cic);
+
+int isup_ubl(struct ss7 *ss7, int cic);
+
+int isup_bla(struct ss7 *ss7, int cic);
+
+int isup_uba(struct ss7 *ss7, int cic);
+
void isup_init_call(struct isup_call *c, int cic, char *calledpartynum, char *callingpartynum);
#endif /* _LIBSS7_H */
More information about the libss7-commits
mailing list