diff --git a/apps/gateway/GWSession.cpp b/apps/gateway/GWSession.cpp index 20212bdc..f7c3b00a 100644 --- a/apps/gateway/GWSession.cpp +++ b/apps/gateway/GWSession.cpp @@ -92,7 +92,8 @@ void GWSession::onSipRequest(const AmSipRequest& req) void GWSession::onSipReply(const AmSipReply& reply) { int status = dlg.getStatus(); - DBG("GWSession::onSipReply: code = %i, reason = %s\n, status = %i\n", reply.code,reply.reason.c_str(),dlg.getStatus()); + DBG("GWSession::onSipReply: code = %i, reason = %s\n, status = %i\n", + reply.code,reply.reason.c_str(),dlg.getStatus()); if((dlg.getStatus()==AmSipDialog::Pending)&&(reply.code==183)) { onProgress(reply); } if((dlg.getStatus()==AmSipDialog::Pending)&&(reply.code>=300)) { int ret=((mISDNChannel*)m_OtherLeg)->hangup(); @@ -145,3 +146,10 @@ GWSession* GWSession::CallFromOutside(std::string &fromnumber, std::string &tonu // ((GWSession*)s)->setInOut(chan,chan); return (GWSession *)s; } + +/** EMACS ** + * Local variables: + * mode: c++ + * c-basic-offset: 4 + * End: + */ diff --git a/apps/gateway/GatewayFactory.cpp b/apps/gateway/GatewayFactory.cpp index 8cc7f267..3b3bfa9c 100644 --- a/apps/gateway/GatewayFactory.cpp +++ b/apps/gateway/GatewayFactory.cpp @@ -91,3 +91,10 @@ GatewayFactory::~GatewayFactory() } + +/** EMACS ** + * Local variables: + * mode: c++ + * c-basic-offset: 4 + * End: + */ diff --git a/apps/gateway/mISDNChannel.cpp b/apps/gateway/mISDNChannel.cpp index f4511b7f..1608217d 100644 --- a/apps/gateway/mISDNChannel.cpp +++ b/apps/gateway/mISDNChannel.cpp @@ -100,12 +100,14 @@ static signed char _mISDN_l3_ie2pos[128] = { 24,25,-1,-1,26,-1,-1,-1,27,28,-1,-1,29,30,31,-1 }; +/* static unsigned char _mISDN_l3_pos2ie[32] = { 0x04, 0x08, 0x10, 0x14, 0x18, 0x1c, 0x1e, 0x20, 0x27, 0x28, 0x29, 0x2c, 0x34, 0x40, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x4c, 0x4d, 0x6c, 0x6d, 0x70, 0x71, 0x74, 0x78, 0x79, 0x7c, 0x7d, 0x7e }; +*/ int mISDN_get_free_ext_ie(mISDN::Q931_info_t *qi) { int i; @@ -226,7 +228,6 @@ void mISDNChannel::unregister_BC() { } int mISDNChannel::placeCall(const AmSipRequest &req, std::string tonumber, std::string fromnumber) { - int ret; m_called=tonumber; m_TON_d=0; //Unknown m_NPI_d=1; // ISDN E.164 @@ -244,7 +245,7 @@ int mISDNChannel::placeCall(const AmSipRequest &req, std::string tonumber, std:: int mISDNChannel::accept() { mISDNStack* stack=mISDNStack::instance(); char buf[MAX_MSG_SIZE]; - mISDN::Q931_info_t *qi; + // mISDN::Q931_info_t *qi; mISDN::iframe_t *frame = (mISDN::iframe_t *)buf; DBG("mISDNChannel::accept\n"); frame->prim = CC_CONNECT | REQUEST; @@ -260,7 +261,7 @@ int mISDNChannel::accept() { int mISDNChannel::hangup() { mISDNStack* stack=mISDNStack::instance(); char buf[MAX_MSG_SIZE]; - mISDN::Q931_info_t *qi; + // mISDN::Q931_info_t *qi; mISDN::iframe_t *frame = (mISDN::iframe_t *)buf; DBG("mISDNChannel::hangup\n"); @@ -276,11 +277,12 @@ int mISDNChannel::hangup() { int mISDNChannel::call() { mISDNStack* stack=mISDNStack::instance(); - unsigned char buf[MAX_MSG_SIZE], *np, *p, *msg, ie[64]; + unsigned char buf[MAX_MSG_SIZE], *p, *msg, ie[64]; mISDN::Q931_info_t *qi; mISDN::iframe_t *frame = (mISDN::iframe_t *)buf; - int ret,len,i; - + int ret; + size_t i; + INFO("mISDN is making outbound call from %s to %s\n", m_caller.c_str(), m_called.c_str()); //making new isdn call ref m_CR=stack->GenerateCR(); @@ -349,8 +351,7 @@ int mISDNChannel::call() { int mISDNChannel::processMsg(char *msg_buf,int msg_buf_s) { mISDNStack* stack=mISDNStack::instance(); char buf[MAX_MSG_SIZE]; - int buf_s; - mISDN::Q931_info_t *qi; + // mISDN::Q931_info_t *qi; mISDN::iframe_t *frame = (mISDN::iframe_t *)buf; char *p; @@ -371,7 +372,7 @@ int mISDNChannel::processMsg(char *msg_buf,int msg_buf_s) { unsigned char buf[MAX_MSG_SIZE]; // mISDN::Q931_info_t *qi; mISDN::iframe_t *frame = (mISDN::iframe_t *)buf; - int ret,len; + int ret; frame->prim = CC_PROCEEDING | REQUEST; frame->addr = m_port->upper_id | FLG_MSG_DOWN; frame->dinfo= m_CR; @@ -654,3 +655,10 @@ int mISDNChannel::bchan_destroy() { return OK; } + +/** EMACS ** + * Local variables: + * mode: c++ + * c-basic-offset: 4 + * End: + */ diff --git a/apps/gateway/mISDNNames.cpp b/apps/gateway/mISDNNames.cpp index d7704163..0de36d3d 100644 --- a/apps/gateway/mISDNNames.cpp +++ b/apps/gateway/mISDNNames.cpp @@ -97,3 +97,11 @@ const char* mISDNNames::Screening(int i) { } return "ERROR"; } + + +/** EMACS ** + * Local variables: + * mode: c++ + * c-basic-offset: 4 + * End: + */ diff --git a/apps/gateway/mISDNStack.cpp b/apps/gateway/mISDNStack.cpp index 30e47a4c..0bcb71bb 100644 --- a/apps/gateway/mISDNStack.cpp +++ b/apps/gateway/mISDNStack.cpp @@ -170,9 +170,9 @@ int mISDNStack::init() { struct mISDNport *mISDNport, **mISDNportp; int i, cnt,port; int pri, ports; - int nt, ptp, ptmp; - net_stack_t *nst; - manager_t *mgr; + int nt, ptp; + //net_stack_t *nst; + //manager_t *mgr; layer_info_t li; stack_info_t *stinf; @@ -492,6 +492,7 @@ y[qi->_x_.off+1],\ y[qi->_x_.off+2],\ y[qi->_x_.off+3]\ );ret.append(x);} else ret.append(" \n"); + std::string mISDNStack::dumpIE(char *buf,int len) { Q931_info_t* qi; ie_info_t *ie; @@ -499,8 +500,9 @@ std::string mISDNStack::dumpIE(char *buf,int len) { u16 *arr; char *p,*x,*y; std::string ret,tmp_a,tmp_b; - int i,j; - + int j; + size_t i; + qi = (Q931_info_t*)(buf + mISDN_HEADER_LEN); x =(char*)&buf2; arr=(u16 *)qi; @@ -546,3 +548,10 @@ std::string mISDNStack::dumpIE(char *buf,int len) { return ret; } + +/** EMACS ** + * Local variables: + * mode: c++ + * c-basic-offset: 4 + * End: + */