From 2a27c0f1733830b2b654878445cb2750727b4d5b Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Fri, 14 Sep 2007 21:32:54 +0000 Subject: [PATCH] Fix for #10189. Make sure we properly report the user layer 1 for H.223 and H.245 git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@465 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- libpri.h | 2 +- q931.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libpri.h b/libpri.h index d699fe0..4906ea5 100644 --- a/libpri.h +++ b/libpri.h @@ -202,7 +202,7 @@ #define PRI_LAYER_1_ALAW 0x23 #define PRI_LAYER_1_G721 0x24 #define PRI_LAYER_1_G722_G725 0x25 -#define PRI_LAYER_1_G7XX_384K 0x26 +#define PRI_LAYER_1_H223_H245 0x26 #define PRI_LAYER_1_NON_ITU_ADAPT 0x27 #define PRI_LAYER_1_V120_RATE_ADAPT 0x28 #define PRI_LAYER_1_X31_RATE_ADAPT 0x29 diff --git a/q931.c b/q931.c index 485febd..1bcbfd4 100644 --- a/q931.c +++ b/q931.c @@ -548,7 +548,7 @@ static char *l12str(int proto) { PRI_LAYER_1_ALAW, "A-Law" }, { PRI_LAYER_1_G721, "G.721 ADPCM" }, { PRI_LAYER_1_G722_G725, "G.722/G.725 7kHz Audio" }, - { PRI_LAYER_1_G7XX_384K, "G.7xx 384k Video" }, + { PRI_LAYER_1_H223_H245, "H.223 and H.245" }, /* Recommendation Q.931(05/98) page 60) */ { PRI_LAYER_1_NON_ITU_ADAPT, "Non-ITU Rate Adaption" }, { PRI_LAYER_1_V120_RATE_ADAPT, "V.120 Rate Adaption" }, { PRI_LAYER_1_X31_RATE_ADAPT, "X.31 Rate Adaption" }, @@ -662,7 +662,8 @@ static FUNC_SEND(transmit_bearer_capability) } ie->data[0] = 0x80 | tc; ie->data[1] = call->transmoderate | 0x80; - if ((tc & PRI_TRANS_CAP_DIGITAL)&&(pri->switchtype == PRI_SWITCH_EUROISDN_E1)) { + if ( (tc & PRI_TRANS_CAP_DIGITAL) && (pri->switchtype == PRI_SWITCH_EUROISDN_E1) && + (call->transmoderate == TRANS_MODE_PACKET) ) { /* Apparently EuroISDN switches don't seem to like user layer 2/3 */ return 4; }