diff --git a/libpri.h b/libpri.h index c0c4ecd..3fe9135 100755 --- a/libpri.h +++ b/libpri.h @@ -343,6 +343,7 @@ typedef struct pri_event_proceeding { int cref; int progress; int progressmask; + int cause; q931_call *call; } pri_event_proceeding; diff --git a/q931.c b/q931.c index e190704..ee3ed36 100755 --- a/q931.c +++ b/q931.c @@ -3189,6 +3189,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len) case Q931_CONNECT: case Q931_ALERTING: case Q931_PROGRESS: + c->cause = -1; case Q931_CALL_PROCEEDING: c->progress = -1; c->progressmask = 0; @@ -3463,6 +3464,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len) break; } pri->ev.e = PRI_EVENT_PROGRESS; + pri->ev.proceeding.cause = c->cause; /* Fall through */ case Q931_CALL_PROCEEDING: if (c->newcall) {