diff --git a/contrib/yiax/engine.cpp b/contrib/yiax/engine.cpp index e266898d..011720a7 100644 --- a/contrib/yiax/engine.cpp +++ b/contrib/yiax/engine.cpp @@ -153,7 +153,7 @@ IAXTransaction* IAXEngine::addFrame(const SocketAddr& addr, IAXFrame* frame) if (frame->fullFrame()) { if (frame->fullFrame()->destCallNo()) XDebug(this,DebugAll,"Unmatched Frame(%u,%u) for (%u,%u)", - frame->type(),frame->subclass(),frame->fullFrame()->destCallNo(),frame->fullFrame()->sourceCallNo()); + frame->type(),frame->fullFrame()->subclass(),frame->fullFrame()->destCallNo(),frame->fullFrame()->sourceCallNo()); else DDebug(this,DebugAll,"Unsupported incoming transaction Frame(%u,%u). Source call no: %u", frame->type(),frame->fullFrame()->subclass(),frame->fullFrame()->sourceCallNo()); diff --git a/contrib/yiax/frame.cpp b/contrib/yiax/frame.cpp index 3bd364b1..5c6b476a 100644 --- a/contrib/yiax/frame.cpp +++ b/contrib/yiax/frame.cpp @@ -413,12 +413,12 @@ TokenDict IAXFormat::videoData[] = { {0, 0} }; -const char* IAXFormat::audioText(u_int8_t audio) +const char* IAXFormat::audioText(u_int32_t audio) { return lookup(audio,audioData); } -const char* IAXFormat::videoText(u_int8_t video) +const char* IAXFormat::videoText(u_int32_t video) { return lookup(video,videoData); } @@ -580,7 +580,7 @@ IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_i m_dCallNo(dCallNo), m_oSeqNo(oSeqNo), m_iSeqNo(iSeqNo), m_subclass(subclass) { XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]", - type,subClass,this); + type,subclass,this); } IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, @@ -591,7 +591,7 @@ IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_i m_dCallNo(dCallNo), m_oSeqNo(oSeqNo), m_iSeqNo(iSeqNo), m_subclass(subclass) { XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]", - type,subClass,this); + type,subclass,this); unsigned char header[12]; DataBlock ie; diff --git a/contrib/yiax/transaction.cpp b/contrib/yiax/transaction.cpp index ea9a90fc..f53a2228 100644 --- a/contrib/yiax/transaction.cpp +++ b/contrib/yiax/transaction.cpp @@ -660,8 +660,8 @@ bool IAXTransaction::enableTrunking(IAXMetaTrunkFrame* trunkFrame) void IAXTransaction::print() { Debug(m_engine,DebugInfo,"Transaction - START PRINT [%p]",this); - Output("Local call no: %u\nRemote call no: %u\nType: %u\nState: %u\nTimestamp: %llu", - localCallNo(),remoteCallNo(),type(),state(),(long unsigned long)timeStamp()); + Output("Local call no: %u\nRemote call no: %u\nType: %u\nState: %u\nTimestamp: " FMT64U, + localCallNo(),remoteCallNo(),type(),state(),(u_int64_t)timeStamp()); Output("Queues:\nOutgoing: %u",m_outFrames.count()); ObjList* l; int i; diff --git a/contrib/yiax/yateiax.h b/contrib/yiax/yateiax.h index e84ed0d6..e7e21d76 100644 --- a/contrib/yiax/yateiax.h +++ b/contrib/yiax/yateiax.h @@ -518,14 +518,14 @@ public: * @param audio The desired format * @return A pointer to the text associated with the format or 0 if the format doesn't exist */ - static const char* audioText(u_int8_t audio); + static const char* audioText(u_int32_t audio); /** * Get the text associated with a video format * @param video The desired format * @return A pointer to the text associated with the format or 0 if the format doesn't exist */ - static const char* videoText(u_int8_t video); + static const char* videoText(u_int32_t video); /** * Keep the texts associated with the audio formats @@ -692,7 +692,7 @@ public: * @param value Value to unpack * @return The unpacked subclass value */ - static u_int32_t IAXFrame::unpackSubclass(u_int8_t value); + static u_int32_t unpackSubclass(u_int8_t value); protected: Type m_type; // Frame type @@ -852,7 +852,7 @@ public: * @return True if the retransmission counter is 0 */ inline bool timeout() const - { return !(bool)m_retransCount; } + { return m_retransCount == 0; } /** * Ask the frame if it's time for retransmit @@ -1187,7 +1187,7 @@ public: * Retrive the expiring time for a register/unregister transaction * @return The expiring time for a register/unregister transaction */ - inline u_int16_t expire() const + inline u_int32_t expire() const { return m_expire; } /** diff --git a/modules/yiaxchan.cpp b/modules/yiaxchan.cpp index 3160c93c..f8936193 100644 --- a/modules/yiaxchan.cpp +++ b/modules/yiaxchan.cpp @@ -926,7 +926,7 @@ bool YIAXEngine::userreg(IAXTransaction* tr, bool regrel) // TODO: support number != username data << "/" << tr->username(); msg.addParam("data",data); - msg.addParam("expires",String(tr->expire())); + msg.addParam("expires",String((long)tr->expire())); } msg.addParam("ip_host",tr->remoteAddr().host()); msg.addParam("ip_port",String(tr->remoteAddr().port()));