Add PRI_EVENT_PROCEEDING when we get CALL_PROCEEDING or PROGRESS
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@37 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
426336f4e6
commit
e4d3ca388b
8
libpri.h
8
libpri.h
@ -62,6 +62,7 @@
|
||||
#define PRI_EVENT_RESTART_ACK 10 /* Restart complete on a given channel */
|
||||
#define PRI_EVENT_FACNAME 11 /* Caller*ID Name received on Facility */
|
||||
#define PRI_EVENT_INFO_RECEIVED 12 /* Additional info (keypad) received */
|
||||
#define PRI_EVENT_PROCEEDING 13 /* When we get CALL_PROCEEDING or PROGRESS */
|
||||
|
||||
/* Simple states */
|
||||
#define PRI_STATE_DOWN 0
|
||||
@ -247,6 +248,12 @@ typedef struct pri_event_restart_ack {
|
||||
int channel;
|
||||
} pri_event_restart_ack;
|
||||
|
||||
typedef struct pri_event_proceeding {
|
||||
int e;
|
||||
int channel;
|
||||
} pri_event_proceeding;
|
||||
|
||||
|
||||
typedef union {
|
||||
int e;
|
||||
pri_event_generic gen; /* Generic view */
|
||||
@ -258,6 +265,7 @@ typedef union {
|
||||
pri_event_ringing ringing; /* Ringing */
|
||||
pri_event_ringing answer; /* Answer */
|
||||
pri_event_restart_ack restartack; /* Restart Acknowledge */
|
||||
pri_event_proceeding proceeding; /* Call proceeding & Progress */
|
||||
} pri_event;
|
||||
|
||||
struct pri;
|
||||
|
9
q931.c
9
q931.c
@ -1906,17 +1906,20 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
|
||||
#endif
|
||||
return Q931_RES_HAVEEVENT;
|
||||
case Q931_PROGRESS:
|
||||
case Q931_CALL_PROCEEDING:
|
||||
pri->ev.e = PRI_EVENT_PROCEEDING;
|
||||
pri->ev.proceeding.channel = c->channelno;
|
||||
c->ourcallstate = Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING;
|
||||
return Q931_RES_HAVEEVENT;
|
||||
case Q931_CONNECT_ACKNOWLEDGE:
|
||||
c->ourcallstate = Q931_CALL_STATE_ACTIVE;
|
||||
break;
|
||||
case Q931_STATUS:
|
||||
/* Do nothing */
|
||||
if ((pri->debug & PRI_DEBUG_Q931_ANOMALY) &&
|
||||
(c->cause != PRI_CAUSE_INTERWORKING))
|
||||
pri_error("Received unsolicited status: %s\n", pri_cause2str(c->cause));
|
||||
break;
|
||||
case Q931_CALL_PROCEEDING:
|
||||
c->ourcallstate = Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING;
|
||||
break;
|
||||
case Q931_RELEASE_COMPLETE:
|
||||
c->ourcallstate = Q931_CALL_STATE_NULL;
|
||||
/* Free resources */
|
||||
|
Loading…
Reference in New Issue
Block a user