diff --git a/q931.c b/q931.c index b8599f2..5696e32 100755 --- a/q931.c +++ b/q931.c @@ -992,10 +992,15 @@ static FUNC_RECV(receive_display) static FUNC_SEND(transmit_display) { + int i; if ((pri->switchtype != PRI_SWITCH_NI1) && strlen(call->callername)) { - ie->data[0] = 0xb1; - memcpy(ie->data + 1, call->callername, strlen(call->callername)); - return 3 + strlen(call->callername); + i = 0; + if(pri->switchtype != PRI_SWITCH_EUROISDN_E1) { + ie->data[0] = 0xb1; + ++i; + } + memcpy(ie->data + i, call->callername, strlen(call->callername)); + return 2 + i + strlen(call->callername); } return 0; }