/* Parameter: card = pointer to card struct. loc = location: 0 = local, 1 = remote. cau = cause: 1 = busy, 2 = nonexistent callerid, 3 = no user responding. Return: Pointer to buffer containing the assembled message.  */
static char* isdnloop_unicause(isdnloop_card *card, int loc, int cau)
/* Parameter: card = pointer to card struct. loc = location: 0 = local, 1 = remote. cau = cause: 1 = busy, 2 = nonexistent callerid, 3 = no user responding. Return: Pointer to buffer containing the assembled message.  */
static char* isdnloop_unicause(isdnloop_card *card, int loc, int cau)
{
	static char buf[6];
	switch (card->ptype) {
		case ISDN_PTYPE_EURO:
			sprintf(buf, "E%02X%02X", (loc) ? 4 : 2, ctable_eu[cau]);
			break;
		case ISDN_PTYPE_1TR6:
			sprintf(buf, "%02X44", ctable_1t[cau]);
			break;
		default:
			return ("0000");
	}
	return (buf);
}