Compare commits

..

2 Commits
1.2.6 ... 1.2.4

Author SHA1 Message Date
Kevin P. Fleming
4adeac1d87 importing files for 1.2.4 release
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.2.4@379 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-10-17 22:45:09 +00:00
Kevin P. Fleming
a4bd50b8e9 Creating tag for the release of libpri-1.2.4
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.2.4@378 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2006-10-17 22:44:26 +00:00
6 changed files with 42 additions and 98 deletions

View File

@@ -1 +1 @@
1.2.6
1.2.4

View File

@@ -1,48 +1,3 @@
2007-10-16 Matthew Fredrickson <creslin@digium.com>
* libpri 1.2.6 Released
2007-09-25 21:33 +0000 [r467] Matthew Fredrickson <creslin@digium.com>
* q931.c: Fix user-user IE order in setup message (#10705)
2007-09-06 15:06 +0000 [r460] Matthew Fredrickson <creslin@digium.com>
* pri.c, pri_facility.c: TBCT now works. It should work for NI2,
4E, and 5E. This code was tested on NI2.
2007-08-27 19:20 +0000 [r445] Jason Parker <jparker@digium.com>
* Makefile: Make sure we build both the static and shared modules
with -fPIC.
2007-07-09 Russell Bryant <russell@digium.com>
* libpri 1.2.5 Released
2007-06-19 18:22 +0000 [r426] Matthew Fredrickson <creslin@digium.com>
* q931.c: Try to send pending facility messages if we receive
alerting (for when we don't get proceeding) (#9651)
2007-06-06 21:57 +0000 [r415-423] Matthew Fredrickson <creslin@digium.com>
* pri_facility.c: Oops, that should not be on one line
* pri_facility.c: Make sure we only send the NFE when we are
talking QSIG
2007-01-22 22:20 +0000 [r389] Matthew Fredrickson <creslin@digium.com>
* q931.c: Make sure we send DISCONNECT if we reached the active
state and a call is disconnected, regardless of cause code.
2006-12-30 19:16 +0000 [r385] Joshua Colp <jcolp@digium.com>
* Makefile: Specify full path to restorecon instead of assuming it
will be available from what is in $PATH. (issue #8670 reported by
djflux)
2006-10-17 Kevin P. Fleming <kpfleming@digium.com>
* libpri 1.2.4 Released

View File

@@ -38,7 +38,7 @@ STATIC_LIBRARY=libpri.a
DYNAMIC_LIBRARY=libpri.so.1.0
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
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS)
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
INSTALL_PREFIX=$(DESTDIR)
INSTALL_BASE=/usr
SOFLAGS = -Wl,-hlibpri.so.1.0
@@ -86,7 +86,7 @@ install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
ifneq (${OSARCH},SunOS)
install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
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 /sbin/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 )
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
@@ -122,7 +122,7 @@ include .depend
endif
%.lo : %.c
$(CC) $(CFLAGS) -o $@ -c $<
$(CC) -fPIC $(CFLAGS) -o $@ -c $<
$(STATIC_LIBRARY): $(STATIC_OBJS)
ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)

26
pri.c
View File

@@ -521,30 +521,24 @@ int pri_channel_bridge(q931_call *call1, q931_call *call2)
if (!call1 || !call2)
return -1;
/* Make sure we have compatible switchtypes */
if (call1->pri->switchtype != call2->pri->switchtype)
/* Check switchtype compatibility */
if (call1->pri->switchtype != PRI_SWITCH_LUCENT5E ||
call2->pri->switchtype != PRI_SWITCH_LUCENT5E)
return -1;
/* Check for bearer capability */
if (call1->transcapability != call2->transcapability)
return -1;
/* Check to see if we're on the same PRI */
/* Check to see if calls are on the same PRI dchannel
* Currently only support calls on the same dchannel
*/
if (call1->pri != call2->pri)
return -1;
switch (call1->pri->switchtype) {
case PRI_SWITCH_NI2:
case PRI_SWITCH_LUCENT5E:
case PRI_SWITCH_ATT4ESS:
if (eect_initiate_transfer(call1->pri, call1, call2))
return -1;
else
return 0;
break;
default:
return -1;
}
if (eect_initiate_transfer(call1->pri, call1, call2))
return -1;
return 0;
}
int pri_hangup(struct pri *pri, q931_call *call, int cause)

View File

@@ -721,13 +721,11 @@ static int add_callername_facility_ies(struct pri *pri, q931_call *c, int cpe)
buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_EXTENSIONS);
/* Interpretation component */
if (pri->switchtype == PRI_SWITCH_QSIG) {
ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
ASN1_FIXUP(compstk, compsp, buffer, i);
}
ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
ASN1_FIXUP(compstk, compsp, buffer, i);
ASN1_ADD_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
@@ -764,13 +762,11 @@ static int add_callername_facility_ies(struct pri *pri, q931_call *c, int cpe)
buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_EXTENSIONS);
/* Interpretation component */
if (pri->switchtype == PRI_SWITCH_QSIG) {
ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
ASN1_FIXUP(compstk, compsp, buffer, i);
}
ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
ASN1_FIXUP(compstk, compsp, buffer, i);
ASN1_ADD_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
@@ -859,10 +855,13 @@ extern int mwi_message_send(struct pri* pri, q931_call *call, struct pri_sr *req
/* EECT functions */
extern int eect_initiate_transfer(struct pri *pri, q931_call *c1, q931_call *c2)
{
/* Did all the tests to see if we're on the same PRI and
* are on a compatible switchtype */
/* TODO */
int i = 0;
int res = 0;
unsigned char buffer[255] = "";
short call_reference = c2->cr ^ 0x8000; /* Let's do the trickery to make sure the flag is correct */
unsigned short call_reference = c2->cr;
struct rose_component *comp = NULL, *compstk[10];
int compsp = 0;
static unsigned char op_tag[] = {
@@ -875,7 +874,16 @@ extern int eect_initiate_transfer(struct pri *pri, q931_call *c1, q931_call *c2)
0x08,
};
buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_ROSE);
buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_EXTENSIONS);
/* Interpretation component */
ASN1_ADD_SIMPLE(comp, COMP_TYPE_NFE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_0), buffer, i, 0);
ASN1_ADD_BYTECOMP(comp, (ASN1_CONTEXT_SPECIFIC | ASN1_TAG_2), buffer, i, 0);
ASN1_FIXUP(compstk, compsp, buffer, i);
ASN1_ADD_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
ASN1_ADD_SIMPLE(comp, COMP_TYPE_INVOKE, buffer, i);
ASN1_PUSH(compstk, compsp, comp);

21
q931.c
View File

@@ -2725,9 +2725,8 @@ int q931_disconnect(struct pri *pri, q931_call *c, int cause)
return 0;
}
static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY,
Q931_CALLING_PARTY_NUMBER, Q931_CALLED_PARTY_NUMBER, Q931_REDIRECTING_NUMBER, Q931_IE_USER_USER, Q931_SENDING_COMPLETE,
Q931_IE_ORIGINATING_LINE_INFO, Q931_IE_GENERIC_DIGITS, -1 };
static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY, Q931_IE_USER_USER,
Q931_CALLING_PARTY_NUMBER, Q931_CALLED_PARTY_NUMBER, Q931_REDIRECTING_NUMBER, Q931_SENDING_COMPLETE, Q931_IE_ORIGINATING_LINE_INFO, Q931_IE_GENERIC_DIGITS, -1 };
static int gr303_setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, -1 };
@@ -2913,6 +2912,8 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause)
/* sent CONNECT */
case Q931_CALL_STATE_INCOMING_CALL_PROCEEDING:
/* we sent CALL_PROCEEDING */
case Q931_CALL_STATE_ACTIVE:
/* received CONNECT */
case Q931_CALL_STATE_OVERLAP_RECEIVING:
/* received SETUP_ACKNOWLEDGE */
/* send DISCONNECT in general */
@@ -2926,10 +2927,6 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause)
} else
pri_error(pri, "Wierd, doing nothing but this shouldn't happen, ourstate %s, peerstate %s\n",callstate2str(c->ourcallstate),callstate2str(c->peercallstate));
break;
case Q931_CALL_STATE_ACTIVE:
/* received CONNECT */
q931_disconnect(pri,c,cause);
break;
case Q931_CALL_STATE_DISCONNECT_REQUEST:
/* sent DISCONNECT */
q931_release(pri,c,cause);
@@ -3295,16 +3292,6 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
pri->ev.ringing.progressmask = c->progressmask;
libpri_copy_string(pri->ev.ringing.useruserinfo, c->useruserinfo, sizeof(pri->ev.ringing.useruserinfo));
c->useruserinfo[0] = '\0';
cur = c->apdus;
while (cur) {
if (!cur->sent && cur->message == Q931_FACILITY) {
q931_facility(pri, c);
break;
}
cur = cur->next;
}
return Q931_RES_HAVEEVENT;
case Q931_CONNECT:
if (c->newcall) {