Add progress support reporting to PRI (bug #2759)

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@156 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Mark Spencer 2004-10-30 20:19:18 +00:00
parent 5b2bc04f41
commit b6d1f4016f
2 changed files with 11 additions and 0 deletions

View File

@ -253,6 +253,7 @@ typedef struct pri_event_ringing {
int e;
int channel;
int cref;
int progress;
q931_call *call;
} pri_event_ringing;
@ -260,6 +261,7 @@ typedef struct pri_event_answer {
int e;
int channel;
int cref;
int progress;
q931_call *call;
} pri_event_answer;
@ -309,6 +311,9 @@ typedef struct pri_event_restart_ack {
typedef struct pri_event_proceeding {
int e;
int channel;
int cref;
int progress;
q931_call *call;
} pri_event_proceeding;
typedef struct pri_event_setup_ack {

6
q931.c
View File

@ -2714,6 +2714,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
pri->ev.ringing.channel = c->channelno | (c->ds1no << 8);
pri->ev.ringing.cref = c->cr;
pri->ev.ringing.call = c;
pri->ev.ringing.progress = c->progress;
return Q931_RES_HAVEEVENT;
case Q931_CONNECT:
if (c->newcall) {
@ -2730,6 +2731,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
pri->ev.answer.channel = c->channelno | (c->ds1no << 8);
pri->ev.answer.cref = c->cr;
pri->ev.answer.call = c;
pri->ev.answer.progress = c->progress;
q931_connect_acknowledge(pri, c);
return Q931_RES_HAVEEVENT;
case Q931_FACILITY:
@ -2773,6 +2775,10 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
c->ourcallstate = Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING;
c->peercallstate = Q931_CALL_STATE_INCOMING_CALL_PROCEEDING;
}
else
pri->ev.proceeding.progress = c->progress;
pri->ev.proceeding.cref = c->cr;
pri->ev.proceeding.call = c;
return Q931_RES_HAVEEVENT;
case Q931_CONNECT_ACKNOWLEDGE:
if (c->newcall) {