diff --git a/libpri.h b/libpri.h index 30778dc..7fb25a1 100755 --- a/libpri.h +++ b/libpri.h @@ -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 { diff --git a/q931.c b/q931.c index b725ada..009e023 100755 --- a/q931.c +++ b/q931.c @@ -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) {