[libss7-commits] mattf: branch mattf/bug13495 r226 - /team/mattf/bug13495/
SVN commits to the libss7 project
libss7-commits at lists.digium.com
Wed Dec 3 11:31:02 CST 2008
Author: mattf
Date: Wed Dec 3 11:31:02 2008
New Revision: 226
URL: http://svn.digium.com/view/libss7?view=rev&rev=226
Log:
Add echo control reporting and setting ability to libss7 (#13495)
Modified:
team/mattf/bug13495/isup.c
team/mattf/bug13495/isup.h
team/mattf/bug13495/libss7.h
Modified: team/mattf/bug13495/isup.c
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/isup.c?view=diff&rev=226&r1=225&r2=226
==============================================================================
--- team/mattf/bug13495/isup.c (original)
+++ team/mattf/bug13495/isup.c Wed Dec 3 11:31:02 2008
@@ -168,6 +168,8 @@
return "ACM";
case ISUP_ANM:
return "ANM";
+ case ISUP_CON:
+ return "CON";
case ISUP_REL:
return "REL";
case ISUP_RLC:
@@ -361,6 +363,9 @@
if (c->cot_check_required)
parm[0] |= 0x04;
+ if (c->local_echocontrol_ind)
+ parm[0] |= 0x10;
+
return 1; /* Length plus size of type header */
}
@@ -373,6 +378,11 @@
else
c->cot_check_required = 0;
+ if (parm[0] & 0x10)
+ c->echocontrol_ind = 1;
+ else
+ c->echocontrol_ind = 0;
+
return 1;
}
@@ -660,6 +670,7 @@
static FUNC_RECV(backward_call_ind_receive)
{
c->called_party_status_ind = (parm[0] >> 2) & 0x3;
+ c->echocontrol_ind = (parm[1] >> 5) & 0x1;
return 2;
}
@@ -667,6 +678,8 @@
{
parm[0] = 0x40;
parm[1] = 0x14;
+ if (c->local_echocontrol_ind)
+ parm[1] |= 0x20;
return 2;
}
@@ -2589,6 +2602,11 @@
c->cug_interlock_code = cug_interlock_code;
}
+void isup_set_echocontrol(struct isup_call *c, unsigned char ec)
+{
+ c->local_echocontrol_ind = ec;
+}
+
void isup_set_charge(struct isup_call *c, const char *charge, unsigned char charge_nai, unsigned char charge_num_plan)
{
if (charge && charge[0]) {
@@ -3409,6 +3427,7 @@
e->acm.call = c;
e->acm.opc = opc; /* keep OPC information */
e->acm.called_party_status_ind = c->called_party_status_ind;
+ e->acm.echocontrol_ind = c->echocontrol_ind;
e->acm.got_sent_msg = c->got_sent_msg;
return 0;
case ISUP_CON:
@@ -3434,6 +3453,7 @@
e->con.connected_presentation_ind = c->connected_presentation_ind;
e->con.connected_screening_ind = c->connected_screening_ind;
strncpy(e->con.connected_num, c->connected_num, sizeof(e->con.connected_num));
+ e->con.echocontrol_ind = c->echocontrol_ind;
e->con.got_sent_msg = c->got_sent_msg;
return 0;
case ISUP_ANM:
@@ -3459,6 +3479,7 @@
e->anm.connected_screening_ind = c->connected_screening_ind;
strncpy(e->anm.connected_num, c->connected_num, sizeof(e->anm.connected_num));
e->anm.got_sent_msg = c->got_sent_msg;
+ e->anm.echocontrol_ind = c->echocontrol_ind;
return 0;
case ISUP_RLC:
if (!(c->got_sent_msg & (ISUP_SENT_REL | ISUP_SENT_RSC))) {
@@ -3675,6 +3696,7 @@
e->cpg.event = c->event_info;
e->cpg.call = c;
e->cpg.got_sent_msg = c->got_sent_msg;
+ e->cpg.echocontrol_ind = c->echocontrol_ind;
return 0;
case ISUP_UCIC:
e = ss7_next_empty_event(ss7);
@@ -3930,6 +3952,7 @@
strncpy(e->iam.cug_interlock_ni, c->cug_interlock_ni, sizeof(e->iam.cug_interlock_ni));
e->iam.call = c;
e->iam.opc = opc; /* keep OPC information */
+ e->iam.echocontrol_ind = c->echocontrol_ind;
if (!strchr(c->called_party_num, '#'))
isup_start_timer(ss7, c, ISUP_TIMER_T35);
return 0;
Modified: team/mattf/bug13495/isup.h
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/isup.h?view=diff&rev=226&r1=225&r2=226
==============================================================================
--- team/mattf/bug13495/isup.h (original)
+++ team/mattf/bug13495/isup.h Wed Dec 3 11:31:02 2008
@@ -257,6 +257,8 @@
unsigned int dpc;
/* Backward Call Indicator variables */
unsigned char called_party_status_ind;
+ unsigned char local_echocontrol_ind;
+ unsigned char echocontrol_ind;
unsigned char susres_ind;
unsigned char inr_ind[2];
unsigned char inf_ind[2];
Modified: team/mattf/bug13495/libss7.h
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/libss7.h?view=diff&rev=226&r1=225&r2=226
==============================================================================
--- team/mattf/bug13495/libss7.h (original)
+++ team/mattf/bug13495/libss7.h Wed Dec 3 11:31:02 2008
@@ -220,6 +220,7 @@
unsigned char generic_name_typeofname;
unsigned char generic_name_avail;
unsigned char generic_name_presentation;
+ unsigned char echocontrol_ind;
char generic_name[50];
int oli_ani2;
unsigned char cug_indicator;
@@ -266,6 +267,7 @@
unsigned char connected_nai;
unsigned char connected_presentation_ind;
unsigned char connected_screening_ind;
+ unsigned char echocontrol_ind;
} ss7_event_con;
typedef struct {
@@ -285,6 +287,7 @@
unsigned char connected_presentation_ind;
unsigned char connected_screening_ind;
unsigned long got_sent_msg;
+ unsigned char echocontrol_ind;
struct isup_call *call;
} ss7_event_anm;
@@ -298,6 +301,7 @@
struct isup_call *call;
/* Backward call indicator */
unsigned char called_party_status_ind;
+ unsigned char echocontrol_ind;
} ss7_event_acm;
typedef struct {
@@ -334,6 +338,7 @@
unsigned int opc;
unsigned char event;
unsigned long got_sent_msg;
+ unsigned char echocontrol_ind;
struct isup_call *call;
} ss7_event_cpg;
@@ -562,6 +567,8 @@
void isup_set_cug(struct isup_call *c, unsigned char cug_indicator, const char *cug_interlock_ni, unsigned short cug_interlock_code);
+void isup_set_echocontrol(struct isup_call *c, unsigned char ec);
+
enum {
GEN_NAME_PRES_ALLOWED = 0,
GEN_NAME_PRES_RESTRICTED = 1,
More information about the libss7-commits
mailing list