Compare commits
4 Commits
1.2.3
...
1.2.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c362443bfa | ||
|
|
52c6ae7729 | ||
|
|
400b3fca62 | ||
|
|
0c747df13b |
74
ChangeLog
74
ChangeLog
@@ -1,64 +1,16 @@
|
|||||||
2006-05-30 Kevin P. Fleming <kpfleming@digium.com>
|
libpri 0.3.0
|
||||||
|
-- Fix talking to switch
|
||||||
|
-- Add pri dump
|
||||||
|
-- Add test application
|
||||||
|
-- Fix strncpy stuff
|
||||||
|
libpri 0.1.2
|
||||||
|
-- Added PRI_EVENT_HANGUP_ACK so you can know when the disconnect was
|
||||||
|
acknowledged
|
||||||
|
|
||||||
* libpri 1.2.3 Released
|
libpri 0.1.1
|
||||||
|
-- Added PRI_DEBUG_Q931_ANOMALY flag so that certain non-error-related
|
||||||
2006-04-30 15:17 +0000 [r332] Kevin P. Fleming <kpfleming@digium.com>
|
messages would not be output unless specifically desired.
|
||||||
|
|
||||||
* Makefile: set LDCONFIG_FLAGS for GNU/kFreeBSD as well use the
|
|
||||||
flags during installation
|
|
||||||
|
|
||||||
2006-04-27 16:08 +0000 [r327] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* q931.c, libpri.h: Make sure we pass the call back in the
|
|
||||||
setup_ack
|
|
||||||
|
|
||||||
2006-04-04 15:36 +0000 [r323] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* Makefile: Fix for #6566 (Makefile does not honor DESTDIR)
|
|
||||||
|
|
||||||
2006-02-17 18:55 +0000 [r316] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* q931.c: Backport of 6480
|
|
||||||
|
|
||||||
2006-02-15 17:59 +0000 [r311] Matt O'Gorman <mogorman@digium.com>
|
|
||||||
|
|
||||||
* README: bug 6500 typo in README.
|
|
||||||
|
|
||||||
2006-02-13 23:06 +0000 [r306] Kevin P. Fleming <kpfleming@digium.com>
|
|
||||||
|
|
||||||
* pri_facility.c: suppress annoying message about unsupported
|
|
||||||
components in facility messages
|
|
||||||
|
|
||||||
2006-01-18 Russell Bryant <russell@digium.com>
|
|
||||||
|
|
||||||
* Libpri 1.2.2 Released
|
|
||||||
|
|
||||||
2006-01-17 13:43 +0000 [r291] Kevin P. Fleming <kpfleming@digium.com>
|
|
||||||
|
|
||||||
* q931.c: ensure that user-user info field in call is properly
|
|
||||||
reset when not needed
|
|
||||||
|
|
||||||
2006-01-10 20:19 +0000 [r290] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* Makefile: Backport of doing correct minor numbers to 1.2 (#6188)
|
|
||||||
|
|
||||||
2005-12-27 14:01 +0000 [r284] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* q931.c: Fix for issue #6039 backported to 1.2
|
|
||||||
|
|
||||||
2005-12-06 21:35 +0000 [r280] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* q921.c: Send RR as command instead of response when T200 expires
|
|
||||||
after receiving RNR.
|
|
||||||
|
|
||||||
2005-12-01 23:13 +0000 [r274] Kevin P. Fleming <kpfleming@digium.com>
|
|
||||||
|
|
||||||
* Makefile: Makefile 'update' target now supports Subversion
|
|
||||||
repositories (issue #5875)
|
|
||||||
|
|
||||||
2005-12-01 02:34 +0000 [r270] Matt Frederickson <creslin@digium.com>
|
|
||||||
|
|
||||||
* q931.c: Backport of fix from trunk. Fix broken single digit
|
|
||||||
keypad facility code.
|
|
||||||
|
|
||||||
|
libpri 0.1.0
|
||||||
|
-- Initial release
|
||||||
|
|
||||||
|
|||||||
22
Makefile
22
Makefile
@@ -39,11 +39,11 @@ DYNAMIC_LIBRARY=libpri.so.1.0
|
|||||||
STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
|
STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
|
||||||
DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
|
DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
|
||||||
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
|
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
|
||||||
INSTALL_PREFIX=$(DESTDIR)
|
INSTALL_PREFIX?=
|
||||||
INSTALL_BASE=/usr
|
INSTALL_BASE=/usr
|
||||||
SOFLAGS = -Wl,-hlibpri.so.1.0
|
SOFLAGS = -Wl,-hlibpri.so.1
|
||||||
LDCONFIG = /sbin/ldconfig
|
LDCONFIG = /sbin/ldconfig
|
||||||
ifneq (,$(findstring $(OSARCH), Linux GNU/kFreeBSD))
|
ifeq (${OSARCH},Linux)
|
||||||
LDCONFIG_FLAGS=-n
|
LDCONFIG_FLAGS=-n
|
||||||
else
|
else
|
||||||
ifeq (${OSARCH},FreeBSD)
|
ifeq (${OSARCH},FreeBSD)
|
||||||
@@ -70,14 +70,11 @@ endif
|
|||||||
all: depend $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
|
all: depend $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
|
||||||
|
|
||||||
update:
|
update:
|
||||||
@if [ -d .svn ]; then \
|
@if [ -d CVS ]; then \
|
||||||
echo "Updating from Subversion..." ; \
|
|
||||||
svn update -q; \
|
|
||||||
elif [ -d CVS ]; then \
|
|
||||||
echo "Updating from CVS..." ; \
|
echo "Updating from CVS..." ; \
|
||||||
cvs -q -z3 update -Pd; \
|
cvs -q -z3 update -Pd; \
|
||||||
else \
|
else \
|
||||||
echo "Not under version control"; \
|
echo "Not CVS"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
|
install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
|
||||||
@@ -87,13 +84,13 @@ ifneq (${OSARCH},SunOS)
|
|||||||
install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
|
install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
|
||||||
install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
|
install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
|
||||||
if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi
|
if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi
|
||||||
( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 )
|
( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so )
|
||||||
install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
|
install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
|
||||||
if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib; fi
|
if test $$(id -u) = 0; then $(LDCONFIG); fi
|
||||||
else
|
else
|
||||||
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
|
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
|
||||||
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY)
|
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY)
|
||||||
( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; $(SOSLINK) )
|
( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so ; $(SOSLINK) )
|
||||||
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY)
|
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -131,8 +128,7 @@ $(STATIC_LIBRARY): $(STATIC_OBJS)
|
|||||||
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
|
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
|
||||||
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
|
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
|
||||||
$(LDCONFIG) $(LDCONFIG_FLAGS) .
|
$(LDCONFIG) $(LDCONFIG_FLAGS) .
|
||||||
ln -sf libpri.so.1.0 libpri.so
|
ln -sf libpri.so.1 libpri.so
|
||||||
ln -sf libpri.so.1.0 libpri.so.1
|
|
||||||
$(SOSLINK)
|
$(SOSLINK)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
2
README
2
README
@@ -1,4 +1,4 @@
|
|||||||
libpri: An implementation of Primary Rate ISDN
|
libpri: An implementation of Primate Rate ISDN
|
||||||
|
|
||||||
Written by Mark Spencer <markster@digium.com>
|
Written by Mark Spencer <markster@digium.com>
|
||||||
|
|
||||||
|
|||||||
1
libpri.h
1
libpri.h
@@ -359,7 +359,6 @@ typedef struct pri_event_proceeding {
|
|||||||
typedef struct pri_event_setup_ack {
|
typedef struct pri_event_setup_ack {
|
||||||
int e;
|
int e;
|
||||||
int channel;
|
int channel;
|
||||||
q931_call *call;
|
|
||||||
} pri_event_setup_ack;
|
} pri_event_setup_ack;
|
||||||
|
|
||||||
typedef struct pri_event_notify {
|
typedef struct pri_event_notify {
|
||||||
|
|||||||
@@ -1136,17 +1136,13 @@ extern int rose_invoke_decode(struct pri *pri, q931_call *call, unsigned char *d
|
|||||||
do {
|
do {
|
||||||
/* Invoke ID stuff */
|
/* Invoke ID stuff */
|
||||||
GET_COMPONENT(comp, i, vdata, len);
|
GET_COMPONENT(comp, i, vdata, len);
|
||||||
#if 0
|
|
||||||
CHECK_COMPONENT(comp, INVOKE_IDENTIFIER, "Don't know what to do if first ROSE component is of type 0x%x\n");
|
CHECK_COMPONENT(comp, INVOKE_IDENTIFIER, "Don't know what to do if first ROSE component is of type 0x%x\n");
|
||||||
#endif
|
|
||||||
invokeid = comp;
|
invokeid = comp;
|
||||||
NEXT_COMPONENT(comp, i);
|
NEXT_COMPONENT(comp, i);
|
||||||
|
|
||||||
/* Operation Tag */
|
/* Operation Tag */
|
||||||
GET_COMPONENT(comp, i, vdata, len);
|
GET_COMPONENT(comp, i, vdata, len);
|
||||||
#if 0
|
|
||||||
CHECK_COMPONENT(comp, ASN1_INTEGER, "Don't know what to do if second ROSE component is of type 0x%x\n");
|
CHECK_COMPONENT(comp, ASN1_INTEGER, "Don't know what to do if second ROSE component is of type 0x%x\n");
|
||||||
#endif
|
|
||||||
operationid = comp;
|
operationid = comp;
|
||||||
ASN1_GET_INTEGER(comp, operation_tag);
|
ASN1_GET_INTEGER(comp, operation_tag);
|
||||||
NEXT_COMPONENT(comp, i);
|
NEXT_COMPONENT(comp, i);
|
||||||
|
|||||||
2
q921.c
2
q921.c
@@ -338,7 +338,7 @@ static void t200_expire(void *vpri)
|
|||||||
if (pri->debug & PRI_DEBUG_Q921_STATE)
|
if (pri->debug & PRI_DEBUG_Q921_STATE)
|
||||||
pri_message(pri, "-- Retransmitting %d bytes\n", pri->txqueue->len);
|
pri_message(pri, "-- Retransmitting %d bytes\n", pri->txqueue->len);
|
||||||
if (pri->busy)
|
if (pri->busy)
|
||||||
q921_rr(pri, 1, 1);
|
q921_rr(pri, 1, 0);
|
||||||
else {
|
else {
|
||||||
if (!pri->txqueue->transmitted)
|
if (!pri->txqueue->transmitted)
|
||||||
pri_error(pri, "!! Not good - head of queue has not been transmitted yet\n");
|
pri_error(pri, "!! Not good - head of queue has not been transmitted yet\n");
|
||||||
|
|||||||
18
q931.c
18
q931.c
@@ -736,7 +736,7 @@ char *pri_pres2str(int pres)
|
|||||||
|
|
||||||
static void q931_get_number(unsigned char *num, int maxlen, unsigned char *src, int len)
|
static void q931_get_number(unsigned char *num, int maxlen, unsigned char *src, int len)
|
||||||
{
|
{
|
||||||
if ((len < 0) || (len > maxlen - 1)) {
|
if (len > maxlen - 1) {
|
||||||
num[0] = 0;
|
num[0] = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -780,7 +780,7 @@ static FUNC_DUMP(dump_calling_party_number)
|
|||||||
static FUNC_DUMP(dump_calling_party_subaddr)
|
static FUNC_DUMP(dump_calling_party_subaddr)
|
||||||
{
|
{
|
||||||
unsigned char cnum[256];
|
unsigned char cnum[256];
|
||||||
q931_get_number(cnum, sizeof(cnum), ie->data + 1, len - 3);
|
q931_get_number(cnum, sizeof(cnum), ie->data + 2, len - 4);
|
||||||
pri_message(pri, "%c Calling Sub-Address (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n",
|
pri_message(pri, "%c Calling Sub-Address (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n",
|
||||||
prefix, len, ie->data[0] >> 7,
|
prefix, len, ie->data[0] >> 7,
|
||||||
subaddrtype2str((ie->data[0] & 0x70) >> 4), (ie->data[0] & 0x70) >> 4,
|
subaddrtype2str((ie->data[0] & 0x70) >> 4), (ie->data[0] & 0x70) >> 4,
|
||||||
@@ -889,7 +889,7 @@ static FUNC_DUMP(dump_redirecting_subaddr)
|
|||||||
static FUNC_RECV(receive_calling_party_subaddr)
|
static FUNC_RECV(receive_calling_party_subaddr)
|
||||||
{
|
{
|
||||||
/* copy digits to call->callingsubaddr */
|
/* copy digits to call->callingsubaddr */
|
||||||
q931_get_number((unsigned char *) call->callingsubaddr, sizeof(call->callingsubaddr), ie->data + 1, len - 3);
|
q931_get_number((unsigned char *) call->callingsubaddr, sizeof(call->callingsubaddr), ie->data + 2, len - 4);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1382,14 +1382,12 @@ static FUNC_RECV(receive_keypad_facility)
|
|||||||
if (ie->len == 0)
|
if (ie->len == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ie->len > (sizeof(call->digitbuf) - 1))
|
if (ie->len > sizeof(call->digitbuf))
|
||||||
mylen = (sizeof(call->digitbuf) - 1);
|
mylen = sizeof(call->digitbuf);
|
||||||
else
|
else
|
||||||
mylen = ie->len;
|
mylen = ie->len;
|
||||||
|
|
||||||
memcpy(call->digitbuf, ie->data, mylen);
|
libpri_copy_string(call->digitbuf, (char *) ie->data, mylen);
|
||||||
|
|
||||||
call->digitbuf[mylen] = 0;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2798,8 +2796,6 @@ int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req)
|
|||||||
|
|
||||||
if (req->useruserinfo)
|
if (req->useruserinfo)
|
||||||
libpri_copy_string(c->useruserinfo, req->useruserinfo, sizeof(c->useruserinfo));
|
libpri_copy_string(c->useruserinfo, req->useruserinfo, sizeof(c->useruserinfo));
|
||||||
else
|
|
||||||
c->useruserinfo[0] = '\0';
|
|
||||||
|
|
||||||
if (req->nonisdn && (pri->switchtype == PRI_SWITCH_NI2))
|
if (req->nonisdn && (pri->switchtype == PRI_SWITCH_NI2))
|
||||||
c->progressmask = PRI_PROG_CALLER_NOT_ISDN;
|
c->progressmask = PRI_PROG_CALLER_NOT_ISDN;
|
||||||
@@ -3084,7 +3080,6 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
|
|||||||
c->channelno = -1;
|
c->channelno = -1;
|
||||||
break;
|
break;
|
||||||
case Q931_INFORMATION:
|
case Q931_INFORMATION:
|
||||||
c->callednum[0] = '\0';
|
|
||||||
break;
|
break;
|
||||||
case Q931_STATUS_ENQUIRY:
|
case Q931_STATUS_ENQUIRY:
|
||||||
break;
|
break;
|
||||||
@@ -3530,7 +3525,6 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
|
|||||||
c->peercallstate = Q931_CALL_STATE_OVERLAP_RECEIVING;
|
c->peercallstate = Q931_CALL_STATE_OVERLAP_RECEIVING;
|
||||||
pri->ev.e = PRI_EVENT_SETUP_ACK;
|
pri->ev.e = PRI_EVENT_SETUP_ACK;
|
||||||
pri->ev.setup_ack.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
|
pri->ev.setup_ack.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
|
||||||
pri->ev.setup_ack.call = c;
|
|
||||||
|
|
||||||
cur = c->apdus;
|
cur = c->apdus;
|
||||||
while (cur) {
|
while (cur) {
|
||||||
|
|||||||
Reference in New Issue
Block a user