/* * call.cc * Copyright (C) 1997-2000 SpellCaster Telecommunications Inc. * $Id: call.cc,v 1.2 2004/04/07 15:15:51 bcrl Exp $ * Released under the GNU Public License. See LICENSE file for details. */ #include #include #include "debug.h" #include "config.h" #include "ctrlfd.h" unsigned int callIdent; void DialReport(DialResponse_t *msg) { char buf[16]; if (!msg->call) { Log(LF_DEBUG|LF_CALL, "DialReport: call_ident == NULL from %p", __builtin_return_address(0)); return; } if (!msg->call->m_cfd) return; if (msg->call->m_cfd->c_fd == -1) return; if (msg->status == -1 && msg->call->m_wait_for_hangup) msg->status = 0; sprintf(buf, "[%u] %d: ", msg->call->ident, msg->status); /* FIXME! */ write(msg->call->m_cfd->c_fd, buf, strlen(buf)); write(msg->call->m_cfd->c_fd, msg->msg, strlen(msg->msg)); write(msg->call->m_cfd->c_fd, "\n", 1); }