From 97f33e32864aa8dff7073ad8a978f9cc69706d10 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 25 Aug 2009 16:50:56 +0000 Subject: [PATCH] Put connected name in display ie for CONNECT message. git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1019 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/q931.c b/q931.c index 95155b2..92cad58 100644 --- a/q931.c +++ b/q931.c @@ -1792,6 +1792,18 @@ static int receive_display(int full_ie, struct pri *ctrl, q931_call *call, int m { unsigned char *data; + switch (msgtype) { + case Q931_SETUP: + case Q931_CONNECT: + /* + * Only keep the display message on SETUP and CONNECT messages + * as the remote name. + */ + break; + default: + return 0; + } + call->remote_id.name.valid = 1; data = ie->data; @@ -3660,7 +3672,7 @@ static void pri_disconnect_timeout(void *data) q931_release(ctrl, c, PRI_CAUSE_NORMAL_CLEARING); } -static int connect_ies[] = { Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_IE_CONNECTED_NUM, -1 }; +static int connect_ies[] = { Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_DISPLAY, Q931_IE_CONNECTED_NUM, -1 }; int q931_connect(struct pri *ctrl, q931_call *c, int channel, int nonisdn) {