mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-10-25 09:03:48 +00:00
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6168 19bc5d8c-e614-43d4-8b26-e1612bc8e597
66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
/*
|
|
* Copyright 2008 Free Software Foundation, Inc.
|
|
*
|
|
* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribuion.
|
|
*
|
|
* This use of this software may be subject to additional restrictions.
|
|
* See the LEGAL file in the main directory for details.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef SIP_UTILITY_H
|
|
#define SIP_UTILITY_H
|
|
|
|
|
|
namespace SIP {
|
|
|
|
/**@name SIP-specific exceptions. */
|
|
//@{
|
|
class SIPException {
|
|
protected:
|
|
unsigned mTransactionID;
|
|
|
|
public:
|
|
SIPException(unsigned wTransactionID=0)
|
|
:mTransactionID(wTransactionID)
|
|
{ }
|
|
|
|
unsigned transactionID() const { return mTransactionID; }
|
|
};
|
|
|
|
class SIPError : public SIPException {};
|
|
class SIPTimeout : public SIPException {};
|
|
//@}
|
|
|
|
|
|
/** Codec codes, from RFC-3551, Table 4. */
|
|
enum RTPCodec {
|
|
RTPuLaw=0,
|
|
RTPGSM610=3
|
|
};
|
|
|
|
|
|
/** Get owner IP address; return NULL if none found. */
|
|
bool get_owner_ip( osip_message_t * msg, char * o_addr );
|
|
|
|
/** Get RTP parameters; return NULL if none found. */
|
|
bool get_rtp_params(const osip_message_t * msg, char * port, char * ip_addr );
|
|
|
|
void make_tag( char * tag );
|
|
|
|
void make_branch(char * branch);
|
|
|
|
string get_return_address(osip_message_t * msg);
|
|
|
|
|
|
};
|
|
#endif
|
|
// vim: ts=4 sw=4
|