Apprently AT&T uses 0x43 for maintenance messages too

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@107 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Mark Spencer 2004-06-10 03:57:43 +00:00
parent de0e6ba4cc
commit 818a8cb57a

3
q931.c
View File

@ -1424,6 +1424,7 @@ static char *disc2str(int disc)
{ Q931_PROTOCOL_DISCRIMINATOR, "Q.931" }, { Q931_PROTOCOL_DISCRIMINATOR, "Q.931" },
{ GR303_PROTOCOL_DISCRIMINATOR, "GR-303" }, { GR303_PROTOCOL_DISCRIMINATOR, "GR-303" },
{ 0x3, "AT&T Maintenance" }, { 0x3, "AT&T Maintenance" },
{ 0x43, "New AT&T Maintenance" },
}; };
return code2str(disc, discs, sizeof(discs) / sizeof(discs[0])); return code2str(disc, discs, sizeof(discs) / sizeof(discs[0]));
} }
@ -2037,7 +2038,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
pri->q931_rxcount++; pri->q931_rxcount++;
#endif #endif
mh = (q931_mh *)(h->contents + h->crlen); mh = (q931_mh *)(h->contents + h->crlen);
if (h->pd == 0x3) { if ((h->pd == 0x3) || (h->pd == 0x43)) {
/* This is the weird maintenance stuff. We majorly /* This is the weird maintenance stuff. We majorly
KLUDGE this by changing byte 4 from a 0xf (SERVICE) KLUDGE this by changing byte 4 from a 0xf (SERVICE)
to a 0x7 (SERVICE ACKNOWLEDGE) */ to a 0x7 (SERVICE ACKNOWLEDGE) */