[libss7-commits] rmudgett: trunk r311 - /trunk/
SVN commits to the libss7 project
libss7-commits at lists.digium.com
Thu Aug 9 10:27:36 CDT 2012
Author: rmudgett
Date: Thu Aug 9 10:27:33 2012
New Revision: 311
URL: http://svnview.digium.com/svn/libss7?view=rev&rev=311
Log:
Reset trunk to current v1.0 branch.
Removed:
trunk/isup_masq.c
Modified:
trunk/Makefile
trunk/isup.c
trunk/isup.h
trunk/libss7.h
trunk/mtp2.c
trunk/mtp2.h
trunk/mtp3.c
trunk/mtp3.h
trunk/parser_debug.c
trunk/ss7.c
trunk/ss7_internal.h
trunk/ss7linktest.c
trunk/ss7test.c
Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/libss7/trunk/Makefile?view=diff&rev=311&r1=310&r2=311
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Aug 9 10:27:33 2012
@@ -1,22 +1,80 @@
+#
+# libss7: An implementation of Signaling System 7 (SS7)
+#
+# Written by Mark Spencer <markster at linux-support.net>
+#
+# Copyright (C) 2001, Linux Support Services, Inc.
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
CC=gcc
GREP=grep
AWK=awk
OSARCH=$(shell uname -s)
-
+PROC?=$(shell uname -m)
+
+# SONAME version; should be changed on every ABI change
+# please don't change it needlessly; it's perfectly fine to have a SONAME
+# of 1.0 and a version of 1.4.x
+SONAME:=1.0
+
+STATIC_LIBRARY=libss7.a
+DYNAMIC_LIBRARY:=libss7.so.$(SONAME)
+STATIC_OBJS= \
+ isup.o \
+ mtp2.o \
+ mtp3.o \
+ ss7.o \
+ ss7_sched.o \
+ version.o
+DYNAMIC_OBJS= \
+ $(STATIC_OBJS)
+CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(LIBSS7_OPT) $(COVERAGE_CFLAGS)
INSTALL_PREFIX=$(DESTDIR)
INSTALL_BASE=/usr
libdir?=$(INSTALL_BASE)/lib
-STATIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o version.o isup_masq.o
-DYNAMIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o version.o isup_masq.o
-STATIC_LIBRARY=libss7.a
-DYNAMIC_LIBRARY=libss7.so.1.0
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC
+ifneq ($(findstring Darwin,$(OSARCH)),)
+ SOFLAGS=-dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
+ ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
+ SOFLAGS+=/usr/lib/bundle1.o
+ endif
+ LDCONFIG=/usr/bin/true
+else
+ SOFLAGS=-shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
+ LDCONFIG = /sbin/ldconfig
+endif
+ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX))
LDCONFIG_FLAGS=-n
-SOFLAGS=-Wl,-hlibss7.so.1
-LDCONFIG=/sbin/ldconfig
-
-#UTILITIES=parser_debug
+else
+ifeq (${OSARCH},FreeBSD)
+LDCONFIG_FLAGS=-m
+#CFLAGS += -I../zaptel -I../zapata
+INSTALL_BASE=/usr/local
+endif
+endif
+ifeq (${OSARCH},SunOS)
+#CFLAGS += -DSOLARIS -I../zaptel-solaris
+CFLAGS += -DSOLARIS
+LDCONFIG =
+LDCONFIG_FLAGS = \# # Trick to comment out the period in the command below
+#INSTALL_PREFIX = /opt/asterisk # Uncomment out to install in standard Solaris location for 3rd party code
+endif
+
+UTILITIES=parser_debug
ifneq ($(wildcard /usr/include/dahdi/user.h),)
UTILITIES+=ss7test ss7linktest
@@ -26,54 +84,124 @@
SS7VERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
+#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
+#This works for even old (2.96) versions of gcc and provides a small boost either way.
+#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesnt support it.
+ifeq ($(PROC),sparc64)
+PROC=ultrasparc
+LIBSS7_OPT = -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+else
+ ifneq ($(CODE_COVERAGE),)
+ LIBSS7_OPT=
+ COVERAGE_CFLAGS=-ftest-coverage -fprofile-arcs
+ COVERAGE_LDFLAGS=-ftest-coverage -fprofile-arcs
+ else
+ LIBSS7_OPT=-O2
+ endif
+endif
+
+ifeq ($(CPUARCH),i686)
+CFLAGS += -m32
+SOFLAGS += -m32
+endif
+
all: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) $(UTILITIES)
-MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$@).d -MP
-
-%.o: %.c
- $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
-
-%.lo: %.c
- $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
-
-clean:
- rm -f *.o *.so *.lo *.so.1 *.so.1.0
- rm -f parser_debug ss7linktest ss7test $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
- rm -f .*.d
+update:
+ @if [ -d .svn ]; then \
+ echo "Updating from Subversion..." ; \
+ fromrev="`svn info | $(AWK) '/Revision: / {print $$2}'`"; \
+ svn update | tee update.out; \
+ torev="`svn info | $(AWK) '/Revision: / {print $$2}'`"; \
+ echo "`date` Updated from revision $${fromrev} to $${torev}." >> update.log; \
+ rm -f .version; \
+ if [ `grep -c ^C update.out` -gt 0 ]; then \
+ echo ; echo "The following files have conflicts:" ; \
+ grep ^C update.out | cut -b4- ; \
+ fi ; \
+ rm -f update.out; \
+ else \
+ echo "Not under version control"; \
+ fi
install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
mkdir -p $(INSTALL_PREFIX)$(libdir)
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include
+ifneq (${OSARCH},SunOS)
install -m 644 libss7.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
- cp -dp *.so* $(INSTALL_PREFIX)$(libdir)
+ install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
+ #if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(libdir)/$(DYNAMIC_LIBRARY); fi
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf $(DYNAMIC_LIBRARY) libss7.so)
+ifeq ($(SONAME),1.0)
+ # Add this link for historic reasons
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf $(DYNAMIC_LIBRARY) libss7.so.1)
+endif
install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
- $(LDCONFIG) 2> /dev/null || :
+ if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(libdir); fi
+else
+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libss7.h
+ install -f $(INSTALL_PREFIX)$(libdir) -m 755 $(DYNAMIC_LIBRARY)
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf $(DYNAMIC_LIBRARY) libss7.so)
+ifeq ($(SONAME),1.0)
+ # Add this link for historic reasons
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf $(DYNAMIC_LIBRARY) libss7.so.1)
+endif
+ install -f $(INSTALL_PREFIX)$(libdir) -m 644 $(STATIC_LIBRARY)
+endif
+
+uninstall:
+ @echo "Removing Libss7"
+ rm -f $(INSTALL_PREFIX)$(libdir)/$(STATIC_LIBRARY)
+ rm -f $(INSTALL_PREFIX)$(libdir)/libss7.so
+ifeq ($(SONAME),1.0)
+ rm -f $(INSTALL_PREFIX)$(libdir)/libss7.so.1
+endif
+ rm -f $(INSTALL_PREFIX)$(libdir)/$(DYNAMIC_LIBRARY)
+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libss7.h
+
+ss7test: ss7test.o $(STATIC_LIBRARY)
+ $(CC) -o $@ $< $(STATIC_LIBRARY) -lpthread $(CFLAGS)
+
+ss7linktest: ss7linktest.o $(STATIC_LIBRARY)
+ $(CC) -o $@ $< $(STATIC_LIBRARY) -lpthread $(CFLAGS)
+
+parser_debug: parser_debug.o $(STATIC_LIBRARY)
+ $(CC) -o $@ $< $(STATIC_LIBRARY) $(CFLAGS)
+
+MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+
+%.o: %.c
+ $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
+
+%.lo: %.c
+ $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
$(STATIC_LIBRARY): $(STATIC_OBJS)
ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
ranlib $(STATIC_LIBRARY)
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
- $(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
+ $(CC) $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
$(LDCONFIG) $(LDCONFIG_FLAGS) .
- ln -sf libss7.so.1 libss7.so
- ln -sf libss7.so.1.0 libss7.so.1
+ ln -sf $(DYNAMIC_LIBRARY) libss7.so
+ifeq ($(SONAME),1.0)
+ # Add this link for historic reasons
+ ln -sf $(DYNAMIC_LIBRARY) libss7.so.1
+endif
version.c: FORCE
@build_tools/make_version_c > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
-ss7test: ss7test.c $(STATIC_LIBRARY)
- gcc -g -o ss7test ss7test.c libss7.a -lpthread
-
-ss7linktest: ss7linktest.c $(STATIC_LIBRARY)
- gcc -g -o ss7linktest ss7linktest.c libss7.a -lpthread
-
-parser_debug: parser_debug.c $(STATIC_LIBRARY)
- gcc -g -Wall -o parser_debug parser_debug.c libss7.a
-
-libss7: ss7_mtp.o mtp.o ss7.o ss7_sched.o
+clean:
+ rm -f *.o *.so *.lo
+ifeq ($(SONAME),1.0)
+ rm -f *.so.1
+endif
+ rm -f $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
+ rm -f parser_debug ss7linktest ss7test
+ rm -f .*.d
.PHONY:
Modified: trunk/isup.c
URL: http://svnview.digium.com/svn/libss7/trunk/isup.c?view=diff&rev=311&r1=310&r2=311
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Thu Aug 9 10:27:33 2012
@@ -31,12 +31,10 @@
#include <string.h>
#include <stdlib.h>
-#include <time.h>
#include "libss7.h"
#include "isup.h"
#include "ss7_internal.h"
#include "mtp3.h"
-#include "mtp2.h"
#define FUNC_DUMP(name) int ((name))(struct ss7 *ss7, int messagetype, unsigned char *parm, int len)
/* Length here is paramter length */
@@ -60,22 +58,13 @@
FUNC_SEND(*transmit);
};
-struct isup_timer_param {
- struct ss7 *ss7;
- struct isup_call *c;
- int timer;
-};
-
static int iam_params[] = {ISUP_PARM_NATURE_OF_CONNECTION_IND, ISUP_PARM_FORWARD_CALL_IND, ISUP_PARM_CALLING_PARTY_CAT,
- ISUP_PARM_TRANSMISSION_MEDIUM_REQS, ISUP_PARM_CALLED_PARTY_NUM, ISUP_PARM_CALLING_PARTY_NUM, ISUP_PARM_REDIRECTING_NUMBER,
- ISUP_PARM_REDIRECTION_INFO, ISUP_PARM_REDIRECT_COUNTER, ISUP_PARM_ORIGINAL_CALLED_NUM, ISUP_PARM_OPT_FORWARD_CALL_INDICATOR,
- ISUP_PARM_CUG_INTERLOCK_CODE, -1};
+ ISUP_PARM_TRANSMISSION_MEDIUM_REQS, ISUP_PARM_CALLED_PARTY_NUM, ISUP_PARM_CALLING_PARTY_NUM, -1};
static int ansi_iam_params[] = {ISUP_PARM_NATURE_OF_CONNECTION_IND, ISUP_PARM_FORWARD_CALL_IND, ISUP_PARM_CALLING_PARTY_CAT,
ISUP_PARM_USER_SERVICE_INFO, ISUP_PARM_CALLED_PARTY_NUM, ISUP_PARM_CALLING_PARTY_NUM, ISUP_PARM_CHARGE_NUMBER,
ISUP_PARM_ORIG_LINE_INFO, ISUP_PARM_GENERIC_ADDR, ISUP_PARM_GENERIC_DIGITS, ISUP_PARM_GENERIC_NAME, ISUP_PARM_JIP,
- ISUP_PARM_LOCAL_SERVICE_PROVIDER_IDENTIFICATION, ISUP_PARM_REDIRECTION_INFO, ISUP_PARM_REDIRECTING_NUMBER, ISUP_PARM_REDIRECT_COUNTER,
- ISUP_PARM_ORIGINAL_CALLED_NUM, ISUP_PARM_OPT_FORWARD_CALL_INDICATOR, ISUP_PARM_CUG_INTERLOCK_CODE, -1};
+ ISUP_PARM_LOCAL_SERVICE_PROVIDER_IDENTIFICATION, -1};
static int acm_params[] = {ISUP_PARM_BACKWARD_CALL_IND, -1};
@@ -84,9 +73,9 @@
static int far_params[] = {ISUP_PARM_FACILITY_IND, ISUP_PARM_CALL_REF, -1};
-static int anm_params[] = { ISUP_CONNECTED_NUMBER, -1};
-
-static int con_params[] = { ISUP_PARM_BACKWARD_CALL_IND, ISUP_CONNECTED_NUMBER, -1};
+static int anm_params[] = { -1};
+
+static int con_params[] = { ISUP_PARM_BACKWARD_CALL_IND, -1};
static int rel_params[] = { ISUP_PARM_CAUSE, -1};
@@ -100,13 +89,7 @@
static int cqr_params[] = { ISUP_PARM_RANGE_AND_STATUS, ISUP_PARM_CIRCUIT_STATE_IND, -1};
-static int susres_params[] = { ISUP_PARM_SUSRES_IND, ISUP_PARM_CALL_REF, -1};
-
-static int inr_params[] = { ISUP_PARM_INR_IND, -1};
-
-static int inf_params[] = { ISUP_PARM_INF_IND, ISUP_PARM_CALLING_PARTY_NUM, ISUP_PARM_CALLING_PARTY_CAT, -1};
-
-static int sam_params[] = { ISUP_PARM_SUBSEQUENT_NUMBER, -1};
+static int sus_res_params[] = { ISUP_PARM_SUSPEND_RESUME_IND, -1};
static int empty_params[] = { -1};
@@ -115,51 +98,42 @@
int mand_fixed_params;
int mand_var_params;
int opt_params;
- int ansi_priority;
int *param_list;
} messages[] = {
- {ISUP_IAM, 4, 1, 1, 0, iam_params},
- {ISUP_ACM, 1, 0, 1, 1, acm_params},
- {ISUP_ANM, 0, 0, 1, 2, anm_params},
- {ISUP_CON, 1, 0, 1, -1, con_params},
- {ISUP_REL, 0, 1, 1, 1, rel_params},
- {ISUP_RLC, 0, 0, 1, 2, empty_params},
- {ISUP_GRS, 0, 1, 0, 0, greset_params},
- {ISUP_GRA, 0, 1, 0, 0, greset_params},
- {ISUP_CGB, 1, 1, 0, 0, cicgroup_params},
- {ISUP_CGU, 1, 1, 0, 0, cicgroup_params},
- {ISUP_CGBA, 1, 1, 0, 0, cicgroup_params},
- {ISUP_CGUA, 1, 1, 0, 0, cicgroup_params},
- {ISUP_COT, 1, 0, 0, 1, cot_params},
- {ISUP_CCR, 0, 0, 0, 1, empty_params},
- {ISUP_BLO, 0, 0, 0, 0, empty_params},
- {ISUP_LPA, 0, 0, 0, 1, empty_params},
- {ISUP_UBL, 0, 0, 0, 0, empty_params},
- {ISUP_BLA, 0, 0, 0, 0, empty_params},
- {ISUP_UBA, 0, 0, 0, 0, empty_params},
- {ISUP_RSC, 0, 0, 0, 0, empty_params},
- {ISUP_CVR, 0, 0, 0, 0, empty_params},
- {ISUP_CVT, 0, 0, 0, 0, empty_params},
- {ISUP_CPG, 1, 0, 1, 1, cpg_params},
- {ISUP_UCIC, 0, 0, 0, 1, empty_params},
- {ISUP_CQM, 0, 1, 0, 0, greset_params},
- {ISUP_CQR, 0, 2, 0, 0, cqr_params},
- {ISUP_FAA, 1, 0, 1, -1, faa_params},
- {ISUP_FAR, 1, 0, 1, -1, far_params},
- {ISUP_CFN, 0, 1, 0, 0, rel_params},
- {ISUP_SUS, 1, 0, 1, 1, susres_params},
- {ISUP_RES, 1, 0, 1, 1, susres_params},
- {ISUP_INR, 1, 0, 0, 1, inr_params},
- {ISUP_INF, 1, 0, 2, 1, inf_params},
- {ISUP_SAM, 0, 1, 0, -1, sam_params}
+ {ISUP_IAM, 4, 1, 1, iam_params},
+ {ISUP_ACM, 1, 0, 1, acm_params},
+ {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, empty_params},
+ {ISUP_GRS, 0, 1, 0, greset_params},
+ {ISUP_GRA, 0, 1, 0, greset_params},
+ {ISUP_CGB, 1, 1, 0, cicgroup_params},
+ {ISUP_CGU, 1, 1, 0, cicgroup_params},
+ {ISUP_CGBA, 1, 1, 0, cicgroup_params},
+ {ISUP_CGUA, 1, 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},
+ {ISUP_LPA, 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},
+ {ISUP_RSC, 0, 0, 0, empty_params},
+ {ISUP_CVR, 0, 0, 0, empty_params},
+ {ISUP_CVT, 0, 0, 0, empty_params},
+ {ISUP_CPG, 1, 0, 1, cpg_params},
+ {ISUP_UCIC, 0, 0, 0, empty_params},
+ {ISUP_CQM, 0, 1, 0, greset_params},
+ {ISUP_CQR, 0, 2, 0, cqr_params},
+ {ISUP_FAA, 1, 0, 1, faa_params},
+ {ISUP_FAR, 1, 0, 1, far_params},
+ {ISUP_CFN, 0, 1, 0, rel_params},
+ {ISUP_SUS, 1, 0, 1, sus_res_params},
+ {ISUP_RES, 1, 0, 1, sus_res_params}
};
static int isup_send_message(struct ss7 *ss7, struct isup_call *c, int messagetype, int parms[]);
-
-static int isup_start_timer(struct ss7 *ss7, struct isup_call *c, int timer);
-static void isup_stop_all_timers(struct ss7 *ss7, struct isup_call *c);
-static int isup_timer2str(int timer, char *res);
-static void isup_stop_timer(struct ss7 *ss7, struct isup_call *c, int timer);
static char * message2str(unsigned char message)
{
@@ -170,8 +144,6 @@
return "ACM";
case ISUP_ANM:
return "ANM";
- case ISUP_CON:
- return "CON";
case ISUP_REL:
return "REL";
case ISUP_RLC:
@@ -224,12 +196,6 @@
return "SUS";
case ISUP_RES:
return "RES";
- case ISUP_INR:
- return "INR";
- case ISUP_INF:
- return "INF";
- case ISUP_SAM:
- return "SAM";
default:
return "Unknown";
}
@@ -365,9 +331,6 @@
if (c->cot_check_required)
parm[0] |= 0x04;
- if (c->local_echocontrol_ind)
- parm[0] |= 0x10;
-
return 1; /* Length plus size of type header */
}
@@ -375,28 +338,18 @@
{
unsigned char cci = (parm[0] >> 2) & 0x3;
- if (cci == 0x1)
- c->cot_check_required = 1;
+ if (cci != 0x3)
+ c->cot_check_required = cci;
else
c->cot_check_required = 0;
- if (cci == 0x2)
- c->cot_performed_on_previous_cic = 1;
- else
- c->cot_performed_on_previous_cic = 0;
-
- if (parm[0] & 0x10)
- c->echocontrol_ind = 1;
- else
- c->echocontrol_ind = 0;
-
return 1;
}
static FUNC_DUMP(nature_of_connection_ind_dump)
{
unsigned char con = parm[0];
- char *continuity;
+ char *continuity = "";
ss7_message(ss7, "\t\t\tSatellites in connection: %d\n", con&0x03);
con>>=2;
@@ -427,11 +380,7 @@
static FUNC_SEND(forward_call_ind_transmit)
{
parm[0] = 0x60;
- parm[1] = 0x0;
-
- if (ss7->flags & SS7_ISDN_ACCESS_INDICATOR)
- parm [1] |= 0x01;
-
+ parm[1] = 0x01;
return 2;
}
@@ -443,6 +392,8 @@
static FUNC_DUMP(forward_call_ind_dump)
{
char *cb_str, *hg_str, *kj_str;
+
+ cb_str = hg_str = kj_str = "";
switch ((parm[0] >> 1) & 3) {
case 0:
cb_str = "no end-to-end";
@@ -466,7 +417,7 @@
hg_str = "ISDN user part not preferred all the way";
break;
case 2:
- hg_str = "ISDN user part requried all the way";
+ hg_str = "ISDN user part required all the way";
break;
case 3:
hg_str = "spare";
@@ -507,7 +458,7 @@
static FUNC_SEND(calling_party_cat_transmit)
{
- parm[0] = c->calling_party_cat;
+ parm[0] = 0x0a; /* Default to Ordinary calling subscriber */
return 1;
}
@@ -681,21 +632,13 @@
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;
}
static FUNC_SEND(backward_call_ind_transmit)
{
parm[0] = 0x40;
- parm[1] = 0x04;
-
- if (c->local_echocontrol_ind)
- parm[1] |= 0x20;
-
- if (ss7->flags | SS7_ISDN_ACCESS_INDICATOR)
- parm[1] |= 0x10;
-
+ parm[1] = 0x14;
return 2;
}
@@ -748,50 +691,6 @@
return 1;
}
-static FUNC_DUMP(opt_forward_call_ind_dump)
-{
- char *desc;
-
- switch (parm[0] & 0x03) {
- case ISUP_CUG_NON:
- desc = "non-CUG call";
- break;
- case ISUP_CUG_OUTGOING_ALLOWED:
- desc = "closed user group call, outgoing access allowed";
- break;
- case ISUP_CUG_OUTGOING_NOT_ALLOWED:
- desc = "closed user group call, outgoing access not allowed";
- break;
- default:
- desc = "spare";
- }
-
- ss7_message(ss7, "\t\t\tClosed user group call indicator: %s\n", desc);
- ss7_message(ss7, "\t\t\tSimple segmentation indicator: %s\n", (parm[0] & (1 << 2)) ?
- "additional information will be sent in segmentation message" :
- "no additional message will be sent");
- ss7_message(ss7, "\t\t\tConnected line identify request indicator %s\n", (parm[0] & (1 << 7)) ?
- "requested": "not requested");
-
- return 1;
-}
-
-static FUNC_SEND(opt_forward_call_ind_transmit)
-{
- if (c->col_req || c->cug_indicator) {
- parm[0] = (c->cug_indicator & 0x03) | (c->col_req << 7);
- return 1;
- } else
- return 0;
-}
-
-static FUNC_RECV(opt_forward_call_ind_receive)
-{
- c->cug_indicator = parm[0] & 0x03;
- c->col_req = parm[0] >> 7;
- return 1;
-}
-
static FUNC_RECV(cause_receive)
{
c->causeloc = parm[0] & 0xf;
@@ -808,7 +707,7 @@
return 2;
}
-static FUNC_DUMP(cause_dump)
+static FUNC_DUMP(cause_dump) /* ITU-T Q.850 */
{
char *cause;
switch (parm[1] & 0x7f) {
@@ -902,7 +801,123 @@
case 42:
cause = "Switching equipment congestion";
break;
-/* TODO: Finish the rest of these */
+ case 43:
+ cause = "Access information discarded";
+ break;
+ case 44:
+ cause = "Requested circuit/channel not available";
+ break;
+ case 46:
+ cause = "Precedence call blocked";
+ break;
+ case 47:
+ cause = "Resource unavailable, unspecified";
+ break;
+ case 49:
+ cause = "Quality of service not available";
+ break;
+ case 50:
+ cause = "Requested facility not subscribed";
+ break;
+ case 53:
+ cause = "Outgoing calls barred within CUG";
+ break;
+ case 55:
+ cause = "Incoming calls barred within CUG";
+ break;
+ case 57:
+ cause = "Bearer capability not authorized";
+ break;
+ case 58:
+ cause = "Bearer capability not presently available";
+ break;
+ case 62:
+ cause = "Inconsistency in designated outgoing access information and subscriber class";
+ break;
+ case 63:
+ cause = "Service or option not available, unspecified";
+ break;
+ case 65:
+ cause = "Bearer capability not implemented";
+ break;
+ case 66:
+ cause = "Channel type not implemented";
+ break;
+ case 69:
+ cause = "Requested facility not implemented";
+ break;
+ case 70:
+ cause = "Only restricted digital information bearer capability is available";
+ break;
+ case 79:
+ cause = "Service or option not implemented, unspecified";
+ break;
+ case 81:
+ cause = "Invalid call reference value";
+ break;
+ case 82:
+ cause = "Identified channel does not exist";
+ break;
+ case 83:
+ cause = "A suspended call exists, but this call identity does not";
+ break;
+ case 84:
+ cause = "Call identity in use";
+ break;
+ case 85:
+ cause = "No call suspended";
+ break;
+ case 86:
+ cause = "Call having the requested call identity has been cleared";
+ break;
+ case 87:
+ cause = "User not member of CUG";
+ break;
+ case 88:
+ cause = "Incompatible destination";
+ break;
+ case 90:
+ cause = "Non-existent CUG";
+ break;
+ case 91:
+ cause = "Invalid transit network selection";
+ break;
+ case 95:
+ cause = "Invalid message, unspecified";
+ break;
+ case 96:
+ cause = "Mandatory information element is missing";
+ break;
+ case 97:
+ cause = "Message type non-existent or not implemented";
+ break;
+ case 98:
+ cause = "Message not compatible with call state or message type non-existent or not implemented";
+ break;
+ case 99:
+ cause = "Information element /parameter non-existent or not implemented";
+ break;
+ case 100:
+ cause = "Invalid information element contents";
+ break;
+ case 101:
+ cause = "Message not compatible with call state";
+ break;
+ case 102:
+ cause = "Recovery on timer expiry";
+ break;
+ case 103:
+ cause = "Parameter non-existent or not implemented, passed on";
+ break;
+ case 110:
+ cause = "Message with unrecognized parameter, discarded";
+ break;
+ case 111:
+ cause = "Protocol error, unspecified";
+ break;
+ case 127:
+ cause = "Interworking, unspecified";
+ break;
default:
cause = "Unknown";
}
@@ -957,9 +972,15 @@
statuslen = (numcics / 8) + !!(numcics % 8);
- for (i = 0; i < numcics; i++) {
- if (c->status[i])
- parm[1 + (i/8)] |= (1 << (i % 8));
+ if (messagetype == ISUP_GRA) {
+ for (i = 0; i < statuslen; i++) {
+ parm[1 + i] = 0;
+ }
+ } else {
+ for (i = 0; i < numcics; i++) {
+ if (c->status[i])
+ parm[1 + (i/8)] |= (1 << (i % 8));
+ }
}
return statuslen + 1;
@@ -1001,74 +1022,16 @@
{
int oddeven, datalen;
- if (!c->calling_party_num[0] && c->presentation_ind != SS7_PRESENTATION_ADDR_NOT_AVAILABLE)
+ if (!c->calling_party_num[0])
return 0;
- if (c->calling_party_num[0] && c->presentation_ind != SS7_PRESENTATION_ADDR_NOT_AVAILABLE)
- isup_put_number(&parm[2], c->calling_party_num, &datalen, &oddeven);
- else {
- datalen = 0;
- oddeven = 0;
- c->calling_nai = 0;
- }
+ isup_put_number(&parm[2], c->calling_party_num, &datalen, &oddeven);
parm[0] = (oddeven << 7) | c->calling_nai; /* Nature of Address Indicator */
- /* Assume E.164 ISDN numbering plan, calling number complete */
- parm[1] = ((c->presentation_ind == SS7_PRESENTATION_ADDR_NOT_AVAILABLE) ? 0 : (1 << 4)) |
+ parm[1] = (1 << 4) | /* Assume E.164 ISDN numbering plan, calling number complete */
((c->presentation_ind & 0x3) << 2) |
(c->screening_ind & 0x3);
-
- return datalen + 2;
-}
-
-static FUNC_DUMP(connected_num_dump)
-{
- int oddeven = (parm[0] >> 7) & 0x1;
- char numbuf[64] = "";
-
- ss7_message(ss7, "\t\t\tNature of address: %x\n", parm[0] & 0x7f);
- ss7_message(ss7, "\t\t\tNumbering plan: %x\n", (parm[1] >> 4) & 0x7);
- ss7_message(ss7, "\t\t\tPresentation: %x\n", (parm[1] >> 2) & 0x3);
- ss7_message(ss7, "\t\t\tScreening: %x\n", parm[1] & 0x3);
-
- isup_get_number(numbuf, &parm[2], len - 2, oddeven);
-
- ss7_message(ss7, "\t\t\tAddress signals: %s\n", numbuf);
-
- return len;
-}
-
-static FUNC_RECV(connected_num_receive)
-{
- int oddeven = (parm[0] >> 7) & 0x1;
-
- isup_get_number(c->connected_num, &parm[2], len - 2, oddeven);
-
- c->connected_nai = parm[0] & 0x7f; /* Nature of Address Indicator */
- c->connected_presentation_ind = (parm[1] >> 2) & 0x3;
- c->connected_screening_ind = parm[1] & 0x3;
-
- return len;
-
-}
-
-static FUNC_SEND(connected_num_transmit)
-{
- int oddeven = 0, datalen = 0;
-
- if (!c->col_req)
- return 0; /* if they don't ask we won't tell */
-
-
- if (!c->connected_num[0])
- c->connected_presentation_ind = SS7_PRESENTATION_ADDR_NOT_AVAILABLE;
- else
- isup_put_number(&parm[2], c->connected_num, &datalen, &oddeven);
-
-
- parm[0] = (oddeven << 7) | c->connected_nai; /* Nature of Address Indicator */
- /* Assume E.164 ISDN numbering plan, calling number complete */
- parm[1] = ((c->connected_presentation_ind & 0x3) << 2) | (c->connected_screening_ind & 0x3);
+
return datalen + 2;
}
@@ -1589,21 +1552,11 @@
static FUNC_RECV(redirection_info_receive)
{
- c->redirect_info = 1;
- c->redirect_info_ind = parm[0] & 0x7;
- c->redirect_info_orig_reas = (parm[0] >> 4) & 0xf;
- c->redirect_info_counter = parm[1] & 0x7;
- c->redirect_info_reas = (parm[1] >> 4) & 0xf;
return 2;
}
static FUNC_SEND(redirection_info_transmit)
{
- if (!c->redirect_info)
- return 0;
-
- parm[0] = (c->redirect_info_ind & 0x7) | ((c->redirect_info_orig_reas << 4) & 0xf0);
- parm[1] = (c->redirect_info_counter & 0x7) | ((c->redirect_info_reas << 4) & 0xf0);
return 2;
}
@@ -1780,19 +1733,7 @@
static FUNC_SEND(original_called_num_transmit)
{
- int oddeven, datalen;
-
- if (!c->orig_called_num[0])
- return 0;
-
- isup_put_number(&parm[2], c->orig_called_num, &datalen, &oddeven);
-
- parm[0] = (oddeven << 7) | c->orig_called_nai; /* Nature of Address Indicator */
- parm[1] = (1 << 4) | /* Assume E.164 ISDN numbering plan, calling number complete */
- ((c->orig_called_pres_ind & 0x3) << 2) |
- (c->orig_called_screening_ind & 0x3);
-
- return datalen + 2;
+ return len;
}
static FUNC_DUMP(echo_control_info_dump)
@@ -1904,6 +1845,8 @@
babits = parm[i] & 0x3;
dcbits = (parm[i] >> 2) & 0x3;
febits = (parm[i] >> 4) & 0x3;
+
+ ba_str = dc_str = fe_str = "";
if (dcbits == 0) {
switch (babits) {
@@ -1998,99 +1941,6 @@
}
static FUNC_RECV(tns_receive)
-{
- return len;
-}
-
-static FUNC_DUMP(generic_notofication_ind_dump)
-{
- int pos = 0;
- ss7_message(ss7, "\t\t\tNotification indicator: ");
-
- while (pos < len && (pos || !(parm[pos - 1] & 0x80))) {
- switch (parm[pos] & 0x7f) {
- case 0x00:
- ss7_message(ss7, "user suspended; ");
- break;
- case 0x01:
- ss7_message(ss7, "user resumed; ");
- break;
- case 0x02:
- ss7_message(ss7, "bearer service change; ");
- break;
- case 0x03:
- ss7_message(ss7, "discriminator for extension to ASN.1; ");
- break;
- case 0x04:
- ss7_message(ss7, "call completion delay; ");
- break;
- case 0x42:
- ss7_message(ss7, "conference established; ");
- break;
- case 0x43:
- ss7_message(ss7, "conference disconnected; ");
- break;
- case 0x44:
- ss7_message(ss7, "other party added; ");
- break;
- case 0x45:
- ss7_message(ss7, "isolated; ");
- break;
- case 0x46:
- ss7_message(ss7, "reattached; ");
- break;
- case 0x47:
- ss7_message(ss7, "other party isolated; ");
- break;
- case 0x48:
- ss7_message(ss7, "other party reattached; ");
- break;
- case 0x49:
- ss7_message(ss7, "other party split; ");
- break;
- case 0x4a:
- ss7_message(ss7, "other party disconnected; ");
- break;
- case 0x4b:
- ss7_message(ss7, "other party floating; ");
- break;
- case 0x60:
- ss7_message(ss7, "call is a waiting call; ");
- break;
- case 0x68:
- ss7_message(ss7, "diversion activated; ");
- break;
- case 0x69:
- ss7_message(ss7, "call transfer, alerting; ");
- break;
- case 0x6a:
- ss7_message(ss7, "call transfer, active; ");
- break;
- case 0x79:
- ss7_message(ss7, "remote hold; ");
- break;
- case 0x7a:
- ss7_message(ss7, "remote retrieval; ");
- break;
- case 0x7b:
- ss7_message(ss7, "remote is diverting; ");
- break;
-
- default:
- ss7_message(ss7, "reserved; ");
- }
- pos++;
- }
- ss7_message(ss7, "\n");
- return len;
-}
-
-static FUNC_SEND(generic_notofication_ind_transmit)
-{
- return 0;
-}
-
-static FUNC_RECV(generic_notofication_ind_receive)
{
return len;
}
@@ -2233,110 +2083,8 @@
static FUNC_SEND(redirecting_number_transmit)
{
- int oddeven, datalen;
-
- if (!c->redirecting_num[0])
- return 0;
-
- isup_put_number(&parm[2], c->redirecting_num, &datalen, &oddeven);
- parm[0] = (oddeven << 7) | c->redirecting_num_nai; /* Nature of Address Indicator */
- parm[1] = (1 << 4) | /* Assume E.164 ISDN numbering plan, calling number complete */
- ((c->redirecting_num_presentation_ind & 0x3) << 2) |
- (c->redirecting_num_screening_ind & 0x3);
-
- return datalen + 2;
+ return 0;
}
-
-static FUNC_DUMP(redirect_counter_dump)
-{
- ss7_message(ss7, "\t\t\tRedirect count: %i\n", parm[0] & 0x1f);
- return 1;
-}
-
-static FUNC_RECV(redirect_counter_receive)
-{
- c->redirect_counter = parm[0] & 0x1f;
- return 1;
-}
-
-static FUNC_SEND(redirect_counter_transmit)
-{
- if (!c->redirect_counter)
- return 0;
-
- parm[0] = c->redirect_counter & 0x1f;
- return 1;
-}
-
-static FUNC_DUMP(susres_ind_dump)
-{
- ss7_message(ss7, "\t\t\tSUS/RES indicator: %s (%i)\n", (parm[0] & 1) ? "network initiated" : "ISDN subscriber initiated", parm[0] & 1);
- return 1;
-}
-
-static FUNC_RECV(susres_ind_receive)
-{
- c->susres_ind = parm[0] & 1;
- return 1;
-}
-
-static FUNC_SEND(susres_ind_transmit)
-{
- parm[0] = c->susres_ind & 1;
- return 1;
-}
-
-static FUNC_DUMP(inr_ind_dump)
-{
- ss7_message(ss7, "\t\t\tCalling party address %srequested\n", (parm[0] & 0x1) ? "" : "not ");
- ss7_message(ss7, "\t\t\tHolding %srequested\n", (parm[0] & 0x2) ? "" : "not ");
- ss7_message(ss7, "\t\t\tCalling party category %srequested\n", (parm[0] & 0x8) ? "" : "not ");
- ss7_message(ss7, "\t\t\tCharge information %srequested\n", (parm[0] & 0x10) ? "" : "not ");
- ss7_message(ss7, "\t\t\tMalicous call identification %srequested\n", (parm[0] & 0x80) ? "" : "not ");
- return 2;
-}
-
-static FUNC_RECV(inr_ind_receive)
-{
- c->inr_ind[0] = parm[0];
- c->inr_ind[1] = parm[1];
- return 2;
-}
-
-static FUNC_SEND(inr_ind_transmit)
-{
- parm[0] = c->inr_ind[0];
- parm[1] = c->inr_ind[1];
- return 2;
-}
-
-static FUNC_DUMP(inf_ind_dump)
-{
- ss7_message(ss7, "\t\t\tCalling party address: %s\n",
- (parm[0] & 0x2) ? ((parm[0] & 0x1) ? "included" : "spare" ) : ((parm[0] & 0x1) ? "not available" : "not included") );
- ss7_message(ss7, "\t\t\tHold: %sprovided\n", (parm[0] & 0x4) ? "" : "not ");
- ss7_message(ss7, "\t\t\tCalling party's category %sincluded\n", (parm[0] & 0x20) ? "" : "not ");
- ss7_message(ss7, "\t\t\tCharge information %sincluded\n", (parm[0] & 0x40) ? "" : "not ");
- ss7_message(ss7, "\t\t\t%s\n", (parm[0] & 0x80) ? "Unsolicated" : "Solicated");
-
- return 2;
-}
-
-static FUNC_RECV(inf_ind_receive)
-{
- c->inf_ind[0] = parm[0];
- c->inf_ind[1] = parm[1];
- if ((parm[0] & 0x3) == 0x1)
- c->presentation_ind = SS7_PRESENTATION_ADDR_NOT_AVAILABLE;
- return 2;
-}
-
-static FUNC_SEND(inf_ind_transmit)
-{
- parm[0] = c->inf_ind[0];
- parm[1] = c->inf_ind[1];
- return 2;
-}
static FUNC_DUMP(access_transport_dump)
{
@@ -2352,79 +2100,19 @@
return len;
}
-static FUNC_DUMP(subs_num_dump)
-{
- int oddeven = (parm[0] >> 7) & 0x1;
- char numbuf[64];
-
- isup_get_number(numbuf, &parm[1], len - 1, oddeven);
- ss7_message(ss7, "\t\t\tSubsequent signals: %s\n", numbuf);
-
- return len;
-}
-
-static FUNC_RECV(subs_num_receive)
-{
- int oddeven = (parm[0] >> 7) & 0x1;
-
- isup_get_number(c->called_party_num, &parm[1], len - 1, oddeven);
-
- return len;
-}
-
-static FUNC_SEND(subs_num_transmit)
-{
- int oddeven, datalen;
-
- isup_put_number(&parm[1], c->called_party_num, &datalen, &oddeven);
- parm[0] = (oddeven << 7);
-
- return datalen + 1;
-}
-
-static FUNC_DUMP(cug_interlock_code_dump)
-{
- char ni[5];
- unsigned short code;
-
- ni[0] = digit2char(parm[0] >> 4);
- ni[1] = digit2char(parm[0] & 0x0f);
- ni[2] = digit2char(parm[1] >> 4);
- ni[3] = digit2char(parm[1] & 0x0f);
- ni[4] = '\0';
-
- code = (parm[2] << 8) | parm [3];
-
- ss7_message(ss7, "\t\t\tNetwork Identify: %s\n", ni);
- ss7_message(ss7, "\t\t\tBinary Code: %d\n", code);
- return 4;
-}
-
-static FUNC_RECV(cug_interlock_code_receive)
-{
- c->cug_interlock_ni[0] = digit2char(parm[0] >> 4);
- c->cug_interlock_ni[1] = digit2char(parm[0] & 0x0f);
- c->cug_interlock_ni[2] = digit2char(parm[1] >> 4);
- c->cug_interlock_ni[3] = digit2char(parm[1] & 0x0f);
- c->cug_interlock_ni[4] = '\0';
-
- c->cug_interlock_code = (parm[2] << 8) | parm [3];
- return 4;
-}
-
-static FUNC_SEND(cug_interlock_code_transmit)
-{
- if (!(c->cug_indicator == ISUP_CUG_OUTGOING_ALLOWED || c->cug_indicator == ISUP_CUG_OUTGOING_NOT_ALLOWED))
- return 0;
-
- parm[0] = (char2digit(c->cug_interlock_ni[0]) << 4) | char2digit(c->cug_interlock_ni[1]);
- parm[1] = (char2digit(c->cug_interlock_ni[2]) << 4) | char2digit(c->cug_interlock_ni[3]);
-
- parm[2] = c->cug_interlock_code >> 8;
- parm[3] = c->cug_interlock_code & 0xff;
-
- return 4;
-}
+static FUNC_DUMP(suspend_resume_ind_dump)
+{
+ int indicator = parm[0] & 1;
+
+ ss7_message(ss7, "\t\t\tSUS/RES indicator: %s (%d)", indicator ? "Network initiated" : "ISDN Subscriber initiated", indicator);
+ return 1;
+}
+
+static FUNC_RECV(suspend_resume_ind_receive)
+{
+ c->network_isdn_indicator = parm[0] & 1;
+ return 1;
+}
static struct parm_func parms[] = {
{ISUP_PARM_NATURE_OF_CONNECTION_IND, "Nature of Connection Indicator", nature_of_connection_ind_dump, nature_of_connection_ind_receive, nature_of_connection_ind_transmit },
@@ -2444,13 +2132,13 @@
{ISUP_PARM_CHARGE_NUMBER, "Charge Number", charge_number_dump, charge_number_receive, charge_number_transmit},
{ISUP_PARM_CIRCUIT_ASSIGNMENT_MAP, "Circuit Assignment Map"},
{ISUP_PARM_CONNECTION_REQ, "Connection Request"},
- {ISUP_PARM_CUG_INTERLOCK_CODE, "Interlock Code", cug_interlock_code_dump, cug_interlock_code_receive, cug_interlock_code_transmit},
+ {ISUP_PARM_CUG_INTERLOCK_CODE, "Interlock Code"},
{ISUP_PARM_EGRESS_SERV, "Egress Service"},
{ISUP_PARM_GENERIC_ADDR, "Generic Address", generic_address_dump, generic_address_receive, generic_address_transmit},
{ISUP_PARM_GENERIC_DIGITS, "Generic Digits", generic_digits_dump, generic_digits_receive, generic_digits_transmit},
{ISUP_PARM_GENERIC_NAME, "Generic Name", generic_name_dump, generic_name_receive, generic_name_transmit},
{ISUP_PARM_TRANSIT_NETWORK_SELECTION, "Transit Network Selection", tns_dump, tns_receive, tns_transmit},
- {ISUP_PARM_GENERIC_NOTIFICATION_IND, "Generic Notification Indication", generic_notofication_ind_dump, generic_notofication_ind_receive, generic_notofication_ind_transmit},
+ {ISUP_PARM_GENERIC_NOTIFICATION_IND, "Generic Notification Indication"},
{ISUP_PARM_PROPAGATION_DELAY, "Propagation Delay Counter", propagation_delay_cntr_dump},
{ISUP_PARM_HOP_COUNTER, "Hop Counter", hop_counter_dump, hop_counter_receive, hop_counter_transmit},
{ISUP_PARM_BACKWARD_CALL_IND, "Backward Call Indicator", backward_call_ind_dump, backward_call_ind_receive, backward_call_ind_transmit},
@@ -2458,7 +2146,7 @@
{ISUP_PARM_CIRCUIT_GROUP_SUPERVISION_IND, "Circuit Group Supervision Indicator", circuit_group_supervision_dump, circuit_group_supervision_receive, circuit_group_supervision_transmit},
{ISUP_PARM_RANGE_AND_STATUS, "Range and status", range_and_status_dump, range_and_status_receive, range_and_status_transmit},
{ISUP_PARM_EVENT_INFO, "Event Information", event_info_dump, event_info_receive, event_info_transmit},
- {ISUP_PARM_OPT_FORWARD_CALL_INDICATOR, "Optional forward call indicator", opt_forward_call_ind_dump, opt_forward_call_ind_receive, opt_forward_call_ind_transmit},
+ {ISUP_PARM_OPT_FORWARD_CALL_INDICATOR, "Optional forward call indicator"},
{ISUP_PARM_LOCATION_NUMBER, "Location Number"},
{ISUP_PARM_ORIG_LINE_INFO, "Originating line information", originating_line_information_dump, originating_line_information_receive, originating_line_information_transmit},
{ISUP_PARM_REDIRECTION_INFO, "Redirection Information", redirection_info_dump, redirection_info_receive, redirection_info_transmit},
@@ -2471,12 +2159,7 @@
{ISUP_PARM_FACILITY_IND, "Facility Indicator", facility_ind_dump, facility_ind_receive, facility_ind_transmit},
{ISUP_PARM_REDIRECTING_NUMBER, "Redirecting Number", redirecting_number_dump, redirecting_number_receive, redirecting_number_transmit},
{ISUP_PARM_ACCESS_DELIVERY_INFO, "Access Delivery Information", },
- {ISUP_PARM_REDIRECT_COUNTER, "Redirect Counter", redirect_counter_dump, redirect_counter_receive, redirect_counter_transmit},
- {ISUP_PARM_SUSRES_IND, "SUS/RES Indicator", susres_ind_dump, susres_ind_receive, susres_ind_transmit},
- {ISUP_PARM_INR_IND, "Information Request Indicators", inr_ind_dump, inr_ind_receive, inr_ind_transmit},
- {ISUP_PARM_INF_IND, "Information Indicators", inf_ind_dump, inf_ind_receive, inf_ind_transmit},
- {ISUP_PARM_SUBSEQUENT_NUMBER, "Subsequent Number", subs_num_dump, subs_num_receive, subs_num_transmit},
- {ISUP_CONNECTED_NUMBER, "Connected Number", connected_num_dump, connected_num_receive, connected_num_transmit}
+ {ISUP_PARM_SUSPEND_RESUME_IND, "Suspend/Resume Indicators", suspend_resume_ind_dump, suspend_resume_ind_receive},
};
static char * param2str(int parm)
@@ -2492,13 +2175,7 @@
static void init_isup_call(struct isup_call *c)
{
- int x;
- for (x = 0; x < ISUP_MAX_TIMERS; x++)
- c->timer[x] = -1;
c->oli_ani2 = -1;
- c->range = 0;
- c->got_sent_msg = 0;
- c->calling_party_cat = 0x0a; /* Default to Ordinary calling subscriber */
}
static struct isup_call * __isup_new_call(struct ss7 *ss7, int nolink)
@@ -2544,6 +2221,7 @@
snprintf(c->called_party_num, sizeof(c->called_party_num), "%s", called);
c->called_nai = called_nai;
}
+
}
void isup_set_oli(struct isup_call *c, int oli_ani2)
@@ -2553,75 +2231,12 @@
void isup_set_calling(struct isup_call *c, const char *calling, unsigned char calling_nai, unsigned char presentation_ind, unsigned char screening_ind)
{
- if ((calling && calling[0]) || presentation_ind == SS7_PRESENTATION_ADDR_NOT_AVAILABLE) {
- if (calling)
- strncpy(c->calling_party_num, calling, sizeof(c->calling_party_num));
+ if (calling && calling[0]) {
+ strncpy(c->calling_party_num, calling, sizeof(c->calling_party_num));
c->calling_nai = calling_nai;
c->presentation_ind = presentation_ind;
c->screening_ind = screening_ind;
}
-}
-
-void isup_set_connected(struct isup_call *c, const char *connected, unsigned char connected_nai, unsigned char connected_presentation_ind, unsigned char connected_screening_ind) {
- if ((connected && connected[0]) || connected_presentation_ind == SS7_PRESENTATION_ADDR_NOT_AVAILABLE) {
- if (connected)
- strncpy(c->connected_num, connected, sizeof(c->connected_num));
- c->connected_nai = connected_nai;
- c->connected_presentation_ind = connected_presentation_ind;
- c->connected_screening_ind = connected_screening_ind;
- }
-}
-
-void isup_set_redirecting_number(struct isup_call *c, const char *redirecting_number, unsigned char redirecting_num_nai, unsigned char redirecting_num_presentation_ind, unsigned char redirecting_num_screening_ind)
-{
- if (redirecting_number && redirecting_number[0]) {
- strncpy(c->redirecting_num, redirecting_number, sizeof(c->redirecting_num));
- c->redirecting_num_nai = redirecting_num_nai;
- c->redirecting_num_presentation_ind = redirecting_num_presentation_ind;
- c->redirecting_num_screening_ind = redirecting_num_screening_ind;
- }
-}
-
-void isup_set_redirectiong_info(struct isup_call *c, unsigned char redirect_info_ind, unsigned char redirect_info_orig_reas,
- unsigned char redirect_info_counter, unsigned char redirect_info_reas)
-{
- c->redirect_info = 1;
- c->redirect_info_ind = redirect_info_ind;
- c->redirect_info_orig_reas = redirect_info_orig_reas;
- c->redirect_info_counter = redirect_info_counter;
- c->redirect_info_reas = redirect_info_reas;
-}
-
-void isup_set_redirect_counter(struct isup_call *c, unsigned char redirect_counter)
-{
[... 6910 lines stripped ...]
More information about the libss7-commits
mailing list