# Path: sippy/SdpOrigin.py
# class SdpOrigin(object):
#     _session_id = int(random() * time() * 1000.0)
#     username = None
#     session_id = None
#     version = None
#     network_type = None
#     address_type = None
#     address = None
#     session_id = None
# 
#     def __init__(self, body = None, cself = None):
#         if body != None:
#             self.username, self.session_id, self.version, self.network_type, self.address_type, self.address = body.split()
#         elif cself == None:
#             self.username = '-'
#             self.session_id = SdpOrigin._session_id
#             SdpOrigin._session_id += 1
#             self.version = self.session_id
#             self.network_type = 'IN'
#             self.address_type = 'IP4'
#             self.address = SipConf.my_address
#         else:
#             self.username = cself.username
#             self.session_id = cself.session_id
#             self.version = cself.version
#             self.network_type = cself.network_type
#             self.address_type = cself.address_type
#             self.address = cself.address
# 
#     def __str__(self):
#         return '%s %s %s %s %s %s' % (self.username, self.session_id, self.version, self.network_type, self.address_type, self.address)
# 
#     def localStr(self, local_addr = None, local_port = None):
#         if local_addr != None and 'my' in dir(self.address):
#             if local_addr.startswith('['):
#                 address_type = 'IP6'
#                 local_addr = local_addr[1:-1]
#             else:
#                 address_type = 'IP4'
#             return '%s %s %s %s %s %s' % (self.username, self.session_id, self.version, self.network_type, address_type, local_addr)
#         return '%s %s %s %s %s %s' % (self.username, self.session_id, self.version, self.network_type, self.address_type, self.address)
# 
#     def getCopy(self):
#         return self.__class__(cself = self)
# 
# Path: sippy/Core/Exceptions.py
# def dump_exception(msg, f = sys.stdout, extra = None):
#     exc_type, exc_value, exc_traceback = sys.exc_info()
#     if isinstance(exc_value, StdException):
#         cus_traceback = exc_value.traceback
#     else:
#         if hasattr(exc_value, 'traceback'):
#             exc_traceback = exc_value.traceback
#         cus_traceback = None
#     f.write('%s @%s[%d] %s:\n' % (datetime.now(), sys.argv[0], os.getpid(), msg))
#     f.write(SEPT)
#     if cus_traceback != None:
#         f.write('Traceback (most recent call last):\n')
#         print_list(cus_traceback, file = f)
#         f.write(format_exception_only(exc_type, exc_value)[0])
#     else:
#         print_exception(exc_type, exc_value, exc_traceback, file = f)
#     f.write(SEPT)
#     if extra != None:
#         f.write(extra)
#         f.write(SEPT)
#     f.flush()


from sippy.SdpOrigin import SdpOrigin
from hashlib import md5
from random import random
from time import time
    from _thread import get_ident
    from thread import get_ident
from sippy.Core.Exceptions import dump_exception
from sippy.Core.EventDispatcher import ED2
    from sippy.Time.Timeout import Timeout
    from sippy.Rtp_proxy_client import Rtp_proxy_client
import sys
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


try:
except ImportError:


class _rtpps_callback_params(object):
    proxy_address = None
    callback_parameters = None
    atype = None
    remote_ip = None

    def __init__(self, proxy_address, callback_parameters, atype):
        self.proxy_address = proxy_address
        self.callback_parameters = callback_parameters
        self.atype = atype

class _rtpps_side(object):
    session_exists = False
    codecs = None
    raddress = None
    laddress = None
    origin = None
    oh_remote = None
    repacketize = None

    def __init__(self):

# Path: sippy/SdpOrigin.py
# class SdpOrigin(object):
#     _session_id = int(random() * time() * 1000.0)
#     username = None
#     session_id = None
#     version = None
#     network_type = None
#     address_type = None
#     address = None
#     session_id = None
# 
#     def __init__(self, body = None, cself = None):
#         if body != None:
#             self.username, self.session_id, self.version, self.network_type, self.address_type, self.address = body.split()
#         elif cself == None:
#             self.username = '-'
#             self.session_id = SdpOrigin._session_id
#             SdpOrigin._session_id += 1
#             self.version = self.session_id
#             self.network_type = 'IN'
#             self.address_type = 'IP4'
#             self.address = SipConf.my_address
#         else:
#             self.username = cself.username
#             self.session_id = cself.session_id
#             self.version = cself.version
#             self.network_type = cself.network_type
#             self.address_type = cself.address_type
#             self.address = cself.address
# 
#     def __str__(self):
#         return '%s %s %s %s %s %s' % (self.username, self.session_id, self.version, self.network_type, self.address_type, self.address)
# 
#     def localStr(self, local_addr = None, local_port = None):
#         if local_addr != None and 'my' in dir(self.address):
#             if local_addr.startswith('['):
#                 address_type = 'IP6'
#                 local_addr = local_addr[1:-1]
#             else:
#                 address_type = 'IP4'
#             return '%s %s %s %s %s %s' % (self.username, self.session_id, self.version, self.network_type, address_type, local_addr)
#         return '%s %s %s %s %s %s' % (self.username, self.session_id, self.version, self.network_type, self.address_type, self.address)
# 
#     def getCopy(self):
#         return self.__class__(cself = self)
# 
# Path: sippy/Core/Exceptions.py
# def dump_exception(msg, f = sys.stdout, extra = None):
#     exc_type, exc_value, exc_traceback = sys.exc_info()
#     if isinstance(exc_value, StdException):
#         cus_traceback = exc_value.traceback
#     else:
#         if hasattr(exc_value, 'traceback'):
#             exc_traceback = exc_value.traceback
#         cus_traceback = None
#     f.write('%s @%s[%d] %s:\n' % (datetime.now(), sys.argv[0], os.getpid(), msg))
#     f.write(SEPT)
#     if cus_traceback != None:
#         f.write('Traceback (most recent call last):\n')
#         print_list(cus_traceback, file = f)
#         f.write(format_exception_only(exc_type, exc_value)[0])
#     else:
#         print_exception(exc_type, exc_value, exc_traceback, file = f)
#     f.write(SEPT)
#     if extra != None:
#         f.write(extra)
#         f.write(SEPT)
#     f.flush()


# Path: sippy/Rtp_proxy_session.py
from sippy.SdpOrigin import SdpOrigin
from hashlib import md5
from random import random
from time import time
    from _thread import get_ident
    from thread import get_ident
from sippy.Core.Exceptions import dump_exception
from sippy.Core.EventDispatcher import ED2
    from sippy.Time.Timeout import Timeout
    from sippy.Rtp_proxy_client import Rtp_proxy_client
import sys

# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


try:
except ImportError:


class _rtpps_callback_params(object):
    proxy_address = None
    callback_parameters = None
    atype = None
    remote_ip = None

    def __init__(self, proxy_address, callback_parameters, atype):
        self.proxy_address = proxy_address
        self.callback_parameters = callback_parameters
        self.atype = atype

class _rtpps_side(object):
    session_exists = False
    codecs = None
    raddress = None
    laddress = None
    origin = None
    oh_remote = None
    repacketize = None

    def __init__(self):

        self.origin = SdpOrigin()