Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99ffe3759b | ||
|
|
f62a21f583 | ||
|
|
33a28eeda1 | ||
|
|
595154da5a | ||
|
|
cdb9c294c1 | ||
|
|
2a27c0f173 | ||
|
|
e498bef21f | ||
|
|
ac51a8e058 | ||
|
|
11f13f9b2d | ||
|
|
cd56dc1b1c | ||
|
|
a17ce5bdea | ||
|
|
fcd5775b8b | ||
|
|
199d4c7fc5 | ||
|
|
a22bd0df05 |
91
ChangeLog
91
ChangeLog
@@ -1,3 +1,94 @@
|
||||
2007-12-13 Russell Bryant <russell@digium.com>
|
||||
|
||||
* libpri 1.4.3 released.
|
||||
|
||||
2007-10-22 15:10 +0000 [r479] Kevin P. Fleming <kpfleming@digium.com>
|
||||
|
||||
* pri_internal.h, /: Merged revisions 478 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r478
|
||||
| kpfleming | 2007-10-22 10:09:27 -0500 (Mon, 22 Oct 2007) | 3
|
||||
lines we need to include stddef.h for 'size_t' ........
|
||||
|
||||
2007-10-16 Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* libpri 1.4.2 released.
|
||||
|
||||
2007-10-05 16:45 +0000 [r470] Jason Parker <jparker@digium.com>
|
||||
|
||||
* libpri.h: Fix an incorrect pri_event structure definition. Issue
|
||||
10832, patch by flefoll
|
||||
|
||||
2007-09-25 21:37 +0000 [r468] Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* q931.c: Fix user-user IE order in setup message (#10705)
|
||||
|
||||
2007-09-14 21:32 +0000 [r465] Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* q931.c, libpri.h: Fix for #10189. Make sure we properly report
|
||||
the user layer 1 for H.223 and H.245
|
||||
|
||||
2007-09-06 15:11 +0000 [r462] Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* pri.c, pri_facility.c, /: Merged revisions 460 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r460
|
||||
| mattf | 2007-09-06 10:06:42 -0500 (Thu, 06 Sep 2007) | 1 line
|
||||
TBCT now works. It should work for NI2, 4E, and 5E. This code was
|
||||
tested on NI2. ........
|
||||
|
||||
2007-08-27 19:21 +0000 [r446] Jason Parker <jparker@digium.com>
|
||||
|
||||
* Makefile, /: Merged revisions 445 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r445
|
||||
| qwell | 2007-08-27 14:20:23 -0500 (Mon, 27 Aug 2007) | 2 lines
|
||||
Make sure we build both the static and shared modules with -fPIC.
|
||||
........
|
||||
|
||||
2007-08-06 19:58 +0000 [r441] Jason Parker <jparker@digium.com>
|
||||
|
||||
* Makefile: Allow setting CC to something with a space, such as
|
||||
`make CC="gcc -m32"` Issue 10253.
|
||||
|
||||
2007-07-09 Russell Bryant <russell@digium.com>
|
||||
|
||||
* libpri 1.4.1 released.
|
||||
|
||||
2007-06-19 18:23 +0000 [r427] Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* q931.c, /: Merged revisions 426 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r426
|
||||
| mattf | 2007-06-19 13:22:33 -0500 (Tue, 19 Jun 2007) | 1 line
|
||||
Try to send pending facility messages if we receive alerting (for
|
||||
when we don't get proceeding) (#9651) ........
|
||||
|
||||
2007-06-06 21:58 +0000 [r416-424] Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* pri_facility.c, /: Merged revisions 423 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r423
|
||||
| mattf | 2007-06-06 16:57:15 -0500 (Wed, 06 Jun 2007) | 1 line
|
||||
Oops, that should not be on one line ........
|
||||
|
||||
* pri_facility.c, /: Merged revisions 415 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r415
|
||||
| mattf | 2007-06-06 08:20:05 -0500 (Wed, 06 Jun 2007) | 2 lines
|
||||
Make sure we only send the NFE when we are talking QSIG ........
|
||||
|
||||
2007-01-22 22:29 +0000 [r390] Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* q931.c, /: Merged revisions 389 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r389
|
||||
| mattf | 2007-01-22 16:20:59 -0600 (Mon, 22 Jan 2007) | 2 lines
|
||||
Make sure we send DISCONNECT if we reached the active state and a
|
||||
call is disconnected, regardless of cause code. ........
|
||||
|
||||
2006-12-30 19:17 +0000 [r386] Joshua Colp <jcolp@digium.com>
|
||||
|
||||
* Makefile, /: Merged revisions 385 via svnmerge from
|
||||
https://origsvn.digium.com/svn/libpri/branches/1.2 ........ r385
|
||||
| file | 2006-12-30 14:16:17 -0500 (Sat, 30 Dec 2006) | 2 lines
|
||||
Specify full path to restorecon instead of assuming it will be
|
||||
available from what is in $PATH. (issue #8670 reported by djflux)
|
||||
........
|
||||
|
||||
2006-12-23 Kevin P. Fleming <kpfleming@digium.com>
|
||||
|
||||
* libpri 1.4.0 released.
|
||||
|
||||
8
Makefile
8
Makefile
@@ -36,7 +36,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 $(ALERTING) $(LIBPRI_COUNTERS)
|
||||
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS)
|
||||
INSTALL_PREFIX=$(DESTDIR)
|
||||
INSTALL_BASE=/usr
|
||||
SOFLAGS = -Wl,-hlibpri.so.1.0
|
||||
@@ -82,7 +82,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 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 /sbin/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
|
||||
@@ -118,7 +118,7 @@ include .depend
|
||||
endif
|
||||
|
||||
%.lo : %.c
|
||||
$(CC) -fPIC $(CFLAGS) -o $@ -c $<
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
$(STATIC_LIBRARY): $(STATIC_OBJS)
|
||||
ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
|
||||
@@ -140,4 +140,4 @@ clean:
|
||||
depend: .depend
|
||||
|
||||
.depend:
|
||||
CC=$(CC) ./mkdep ${CFLAGS} `ls *.c`
|
||||
CC="$(CC)" ./mkdep ${CFLAGS} `ls *.c`
|
||||
|
||||
4
libpri.h
4
libpri.h
@@ -202,7 +202,7 @@
|
||||
#define PRI_LAYER_1_ALAW 0x23
|
||||
#define PRI_LAYER_1_G721 0x24
|
||||
#define PRI_LAYER_1_G722_G725 0x25
|
||||
#define PRI_LAYER_1_G7XX_384K 0x26
|
||||
#define PRI_LAYER_1_H223_H245 0x26
|
||||
#define PRI_LAYER_1_NON_ITU_ADAPT 0x27
|
||||
#define PRI_LAYER_1_V120_RATE_ADAPT 0x28
|
||||
#define PRI_LAYER_1_X31_RATE_ADAPT 0x29
|
||||
@@ -386,7 +386,7 @@ typedef union {
|
||||
pri_event_ring ring; /* Ring */
|
||||
pri_event_hangup hangup; /* Hang up */
|
||||
pri_event_ringing ringing; /* Ringing */
|
||||
pri_event_ringing answer; /* Answer */
|
||||
pri_event_answer answer; /* Answer */
|
||||
pri_event_restart_ack restartack; /* Restart Acknowledge */
|
||||
pri_event_proceeding proceeding; /* Call proceeding & Progress */
|
||||
pri_event_setup_ack setup_ack; /* SETUP_ACKNOWLEDGE structure */
|
||||
|
||||
34
pri.c
34
pri.c
@@ -529,22 +529,36 @@ 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)
|
||||
return -1;
|
||||
|
||||
/* Check for bearer capability */
|
||||
if (call1->transcapability != call2->transcapability)
|
||||
return -1;
|
||||
/* Check to see if calls are on the same PRI dchannel
|
||||
* Currently only support calls on the same dchannel
|
||||
*/
|
||||
|
||||
/* Check to see if we're on the same PRI */
|
||||
if (call1->pri != call2->pri)
|
||||
return -1;
|
||||
|
||||
if (call1->pri->switchtype == PRI_SWITCH_LUCENT5E)
|
||||
return eect_initiate_transfer(call1->pri, call1, call2);
|
||||
|
||||
if (call1->pri->switchtype == PRI_SWITCH_DMS100)
|
||||
return rlt_initiate_transfer(call1->pri, call1, call2);
|
||||
|
||||
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;
|
||||
case PRI_SWITCH_DMS100:
|
||||
if (rlt_initiate_transfer(call1->pri, call1, call2))
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int pri_hangup(struct pri *pri, q931_call *call, int cause)
|
||||
|
||||
@@ -943,11 +943,13 @@ static int add_callername_facility_ies(struct pri *pri, q931_call *c, int cpe)
|
||||
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);
|
||||
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_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
|
||||
|
||||
@@ -984,11 +986,13 @@ static int add_callername_facility_ies(struct pri *pri, q931_call *c, int cpe)
|
||||
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);
|
||||
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_BYTECOMP(comp, COMP_TYPE_INTERPRETATION, buffer, i, 0);
|
||||
|
||||
@@ -1077,13 +1081,10 @@ int mwi_message_send(struct pri* pri, q931_call *call, struct pri_sr *req, int a
|
||||
/* EECT functions */
|
||||
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] = "";
|
||||
unsigned short call_reference = c2->cr;
|
||||
short call_reference = c2->cr ^ 0x8000; /* Let's do the trickery to make sure the flag is correct */
|
||||
struct rose_component *comp = NULL, *compstk[10];
|
||||
int compsp = 0;
|
||||
static unsigned char op_tag[] = {
|
||||
@@ -1096,16 +1097,7 @@ int eect_initiate_transfer(struct pri *pri, q931_call *c1, q931_call *c2)
|
||||
0x08,
|
||||
};
|
||||
|
||||
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);
|
||||
buffer[i++] = (ASN1_CONTEXT_SPECIFIC | Q932_PROTOCOL_ROSE);
|
||||
|
||||
ASN1_ADD_SIMPLE(comp, COMP_TYPE_INVOKE, buffer, i);
|
||||
ASN1_PUSH(compstk, compsp, comp);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef _PRI_INTERNAL_H
|
||||
#define _PRI_INTERNAL_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define DBGHEAD __FILE__ ":%d %s: "
|
||||
|
||||
26
q931.c
26
q931.c
@@ -548,7 +548,7 @@ static char *l12str(int proto)
|
||||
{ PRI_LAYER_1_ALAW, "A-Law" },
|
||||
{ PRI_LAYER_1_G721, "G.721 ADPCM" },
|
||||
{ PRI_LAYER_1_G722_G725, "G.722/G.725 7kHz Audio" },
|
||||
{ PRI_LAYER_1_G7XX_384K, "G.7xx 384k Video" },
|
||||
{ PRI_LAYER_1_H223_H245, "H.223 and H.245" }, /* Recommendation Q.931(05/98) page 60) */
|
||||
{ PRI_LAYER_1_NON_ITU_ADAPT, "Non-ITU Rate Adaption" },
|
||||
{ PRI_LAYER_1_V120_RATE_ADAPT, "V.120 Rate Adaption" },
|
||||
{ PRI_LAYER_1_X31_RATE_ADAPT, "X.31 Rate Adaption" },
|
||||
@@ -662,7 +662,8 @@ static FUNC_SEND(transmit_bearer_capability)
|
||||
}
|
||||
ie->data[0] = 0x80 | tc;
|
||||
ie->data[1] = call->transmoderate | 0x80;
|
||||
if ((tc & PRI_TRANS_CAP_DIGITAL)&&(pri->switchtype == PRI_SWITCH_EUROISDN_E1)) {
|
||||
if ( (tc & PRI_TRANS_CAP_DIGITAL) && (pri->switchtype == PRI_SWITCH_EUROISDN_E1) &&
|
||||
(call->transmoderate == TRANS_MODE_PACKET) ) {
|
||||
/* Apparently EuroISDN switches don't seem to like user layer 2/3 */
|
||||
return 4;
|
||||
}
|
||||
@@ -2776,8 +2777,9 @@ 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_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 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 gr303_setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, -1 };
|
||||
|
||||
@@ -2963,8 +2965,6 @@ 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 */
|
||||
@@ -2978,6 +2978,10 @@ 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);
|
||||
@@ -3346,6 +3350,16 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user