Add National ISDN 1 switchtype

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@41 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Mark Spencer
2003-05-28 22:34:59 +00:00
parent 5478d68b2a
commit 5137d733f9
3 changed files with 9 additions and 3 deletions

View File

@@ -48,6 +48,7 @@
#define PRI_SWITCH_ATT4ESS 4 /* AT&T 4ESS */
#define PRI_SWITCH_EUROISDN_E1 5 /* Standard EuroISDN (CTR4, ETSI 300-102) */
#define PRI_SWITCH_EUROISDN_T1 6 /* T1 EuroISDN variant (ETSI 300-102) */
#define PRI_SWITCH_NI1 7 /* National ISDN 1 */
/* PRI D-Channel Events */
#define PRI_EVENT_DCHAN_UP 1 /* D-channel is up */

2
pri.c
View File

@@ -49,6 +49,8 @@ char *pri_switch2str(int sw)
return "Lucent 5E";
case PRI_SWITCH_ATT4ESS:
return "AT&T 4ESS";
case PRI_SWITCH_NI1:
return "National ISDN 1";
default:
return "Unknown switchtype";
}

9
q931.c
View File

@@ -911,9 +911,12 @@ static int receive_display(struct pri *pri, q931_call *call, int msgtype, q931_i
static int transmit_display(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len)
{
ie->data[0] = 0xb1;
memcpy(ie->data + 1, call->callername, strlen(call->callername));
return 3 + strlen(call->callername);
if (pri->switchtype != PRI_SWITCH_NI1) {
ie->data[0] = 0xb1;
memcpy(ie->data + 1, call->callername, strlen(call->callername));
return 3 + strlen(call->callername);
}
return 0;
}
static int receive_progress_indicator(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len)