diff --git a/libpri.h b/libpri.h index 2c764c9..9776371 100755 --- a/libpri.h +++ b/libpri.h @@ -71,6 +71,7 @@ #define PRI_EVENT_SETUP_ACK 14 /* When we get SETUP_ACKNOWLEDGE */ #define PRI_EVENT_HANGUP_REQ 15 /* Requesting the higher layer to hangup */ #define PRI_EVENT_NOTIFY 16 /* Notification received */ +#define PRI_EVENT_PROGRESS 17 /* When we get CALL_PROCEEDING or PROGRESS */ /* Simple states */ #define PRI_STATE_DOWN 0 diff --git a/q931.c b/q931.c index 311dc5f..3de3c41 100755 --- a/q931.c +++ b/q931.c @@ -2431,6 +2431,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len) q931_destroycall(pri, c->cr); break; } + pri->ev.e = PRI_EVENT_PROGRESS; /* Fall through */ case Q931_CALL_PROCEEDING: if (c->newcall) { @@ -2444,9 +2445,9 @@ int q931_receive(struct pri *pri, q931_h *h, int len) q931_status(pri,c,PRI_CAUSE_WRONG_MESSAGE); break; } - pri->ev.e = PRI_EVENT_PROCEEDING; pri->ev.proceeding.channel = c->channelno | (c->ds1no << 8); if (mh->msg == Q931_CALL_PROCEEDING) { + pri->ev.e = PRI_EVENT_PROCEEDING; c->ourcallstate = Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING; c->peercallstate = Q931_CALL_STATE_INCOMING_CALL_PROCEEDING; }