From 3e8f5869ae16ee4cf9797332a93d216f4487d87b Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Thu, 21 Apr 2005 21:58:21 +0000 Subject: [PATCH] More little callername tweaks git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@213 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- pri_facility.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pri_facility.c b/pri_facility.c index 860ee88..b99fc04 100755 --- a/pri_facility.c +++ b/pri_facility.c @@ -641,6 +641,7 @@ static int add_callername_facility_ies(struct pri *pri, q931_call *c, int cpe) unsigned char namelen = 0; struct rose_component *comp = NULL, *compstk[10]; int compsp = 0; + int mymessage = 0; static unsigned char op_tag[] = { 0x2a, /* informationFollowing 42 */ 0x86, @@ -722,7 +723,12 @@ static int add_callername_facility_ies(struct pri *pri, q931_call *c, int cpe) i += res; ASN1_FIXUP(compstk, compsp, buffer, i); - if (pri_call_apdu_queue(c, Q931_FACILITY, buffer, i, NULL, NULL)) + if (cpe) + mymessage = Q931_SETUP; + else + mymessage = Q931_FACILITY; + + if (pri_call_apdu_queue(c, mymessage, buffer, i, NULL, NULL)) return -1; return 0;