From b6d1f4016f12ce2eab28d353d084bb7babe3ba28 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sat, 30 Oct 2004 20:19:18 +0000 Subject: [PATCH] Add progress support reporting to PRI (bug #2759) git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@156 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- libpri.h | 5 +++++ q931.c | 6 ++++++ 2 files changed, 11 insertions(+) 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) {