Compare commits

..

3 Commits
0.3.1 ... 0.3.0

Author SHA1 Message Date
Kevin P. Fleming
2a08465d55 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/0.3.0@266 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-11-29 18:39:18 +00:00
Kevin P. Fleming
ebe2cae963 automatic tag renames
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/0.3.0@263 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-11-27 04:17:23 +00:00
Admin Commit
ea6c293782 This commit was manufactured by cvs2svn to create tag 'v0-3-0'.
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/v0-3-0@24 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2002-03-22 17:17:47 +00:00
4 changed files with 5 additions and 43 deletions

View File

@@ -59,7 +59,6 @@
#define PRI_EVENT_RINGING 7 /* Call is ringing (alerting) */
#define PRI_EVENT_ANSWER 8 /* Call has been answered */
#define PRI_EVENT_HANGUP_ACK 9 /* Call hangup has been acknowledged */
#define PRI_EVENT_RESTART_ACK 10 /* Restart complete on a given channel */
/* Simple states */
#define PRI_STATE_DOWN 0
@@ -228,11 +227,6 @@ typedef struct pri_event_hangup {
q931_call *call; /* Opaque call pointer */
} pri_event_hangup;
typedef struct pri_event_restart_ack {
int e;
int channel;
} pri_event_restart_ack;
typedef union {
int e;
pri_event_generic gen; /* Generic view */
@@ -242,7 +236,6 @@ typedef union {
pri_event_hangup hangup; /* Hang up */
pri_event_ringing ringing; /* Ringing */
pri_event_ringing answer; /* Answer */
pri_event_restart_ack restartack; /* Restart Acknowledge */
} pri_event;
struct pri;
@@ -303,8 +296,6 @@ extern int pri_release(struct pri *pri, q931_call *call, int cause);
/* Hangup / Disconnect a call */
extern int pri_disconnect(struct pri *pri, q931_call *call, int cause);
extern int pri_reset(struct pri *pri, int channel);
/* Create a new call */
extern q931_call *pri_new_call(struct pri *pri);

7
pri.c
View File

@@ -199,13 +199,6 @@ int pri_disconnect(struct pri *pri, q931_call *call, int cause)
return q931_disconnect(pri, call, cause);
}
int pri_reset(struct pri *pri, int channel)
{
if (!pri)
return -1;
return q931_restart(pri, channel);
}
q931_call *pri_new_call(struct pri *pri)
{
if (!pri)

View File

@@ -229,8 +229,6 @@ extern int q931_release(struct pri *pri, q931_call *call, int cause);
extern int q931_disconnect(struct pri *pri, q931_call *call, int cause);
extern int q931_restart(struct pri *pri, int channel);
extern q931_call *q931_new_call(struct pri *pri);
extern int q931_setup(struct pri *pri, q931_call *c, int transmode, int channel, int exclusive,

30
q931.c
View File

@@ -1377,23 +1377,6 @@ int q931_release(struct pri *pri, q931_call *c, int cause)
return 0;
}
static int restart_ies[] = { Q931_CHANNEL_IDENT, Q931_RESTART_INDICATOR, -1 };
int q931_restart(struct pri *pri, int channel)
{
struct q931_call *c;
c = q931_getcall(pri, 0 | 0x8000);
if (!c)
return -1;
if (!channel)
return -1;
c->ri = 0;
c->channelno = channel;
c->chanflags &= ~FLAG_PREFERRED;
c->chanflags |= FLAG_EXCLUSIVE;
return send_message(pri, c, Q931_RESTART, restart_ies);
}
static int disconnect_ies[] = { Q931_CAUSE, -1 };
int q931_disconnect(struct pri *pri, q931_call *c, int cause)
@@ -1562,10 +1545,9 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
c->causeloc = -1;
c->callstate = -1;
break;
case Q931_RESTART_ACKNOWLEDGE:
c->channelno = -1;
break;
case Q931_SETUP_ACKNOWLEDGE:
case Q931_RESTART_ACKNOWLEDGE:
case Q931_STATUS_ENQUIRY:
case Q931_USER_INFORMATION:
case Q931_SEGMENT:
@@ -1585,7 +1567,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
case Q931_SUSPEND:
case Q931_SUSPEND_ACKNOWLEDGE:
case Q931_SUSPEND_REJECT:
fprintf(stderr, "!! Not yet handling pre-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
fprintf(stderr, "!! Not yet handling post-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
return -1;
default:
@@ -1702,11 +1684,9 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
pri->ev.hangup.cause = c->cause;
pri->ev.hangup.call = c;
return Q931_RES_HAVEEVENT;
case Q931_RESTART_ACKNOWLEDGE:
pri->ev.e = PRI_EVENT_RESTART_ACK;
pri->ev.restartack.channel = c->channelno;
return Q931_RES_HAVEEVENT;
case Q931_SETUP_ACKNOWLEDGE:
case Q931_RESTART_ACKNOWLEDGE:
case Q931_STATUS_ENQUIRY:
case Q931_USER_INFORMATION:
case Q931_SEGMENT: