Exemplo n.º 1
0
SIPTransactionManager(request_q, response_q).start()

register_dict = {sip_parser.r_SEND :
                 (register.process,
                  {
                      sip_parser.r_4XX :
                      (register.process,
                       {
                           sip_parser.r_2XX : (sip_agent.require, None),
                           sip_parser.r_1XX : (None, None)
                           }
                       ),
                      sip_parser.r_1XX : (None, None),
                      sip_parser.r_2XX : (sip_agent.require, None),
                   }
                  )
                 }
                
result = sip_agent.process_transaction(
register_dict,
response_q,
request_q,
{'user' : sys.argv[1],
 'password' : sys.argv[2],
 'host' : sys.argv[3],
 'port' : int(sys.argv[4]),}
)



Exemplo n.º 2
0
register = SIPRegister()
invite = SIPInvite()

SIPTransactionManager(request_q, response_q).start()

invite_dict = {sip_parser.r_SEND :
                 (invite.process,
                  {
                      sip_parser.r_1XX :
                      (cancel.process,
                       {
                           sip_parser.r_1XX : (None, None),
                           sip_parser.r_2XX : (None, None),                           
                           sip_parser.r_6XX : (ack.process, None),
                           sip_parser.r_4XX : (ack.process, None)
                           }
                       )
                   }
                  )
                }

result = sip_agent.process_transaction(
    invite_dict,
    response_q,
    request_q,
    {'user' : sys.argv[1],
     'host' : sys.argv[2],
     'port' : int(sys.argv[3])}
    )

Exemplo n.º 3
0
options = SIPOptions()

SIPTransactionManager(request_q, response_q).start()

options_dict = {sip_parser.r_SEND :
                 (options.process,
                    {
                        sip_parser.r_1XX : (None, None),                                                                             
                        sip_parser.r_2XX : (None, None),  
                        sip_parser.r_3XX : (None, None),                                                                           
                        sip_parser.r_4XX : (None, None),
                        sip_parser.r_5XX : (None, None),
                        sip_parser.r_6XX : (None, None),                                                                             
                    }
                  )
                }            
                  
                  
result = sip_agent.process_transaction(
    options_dict,
    response_q,
    request_q,
    {
     'host' : sys.argv[1],
     'port' : int(sys.argv[2]),
     'user' : sys.argv[3],
     'target_user' : sys.argv[4]}
    )


Exemplo n.º 4
0
from sip_agent import SIPOptions
from sip_agent import SIPAgent

response_q = Queue(0)
request_q = Queue(0)

sip_agent = SIPAgent()
options = SIPOptions()

SIPTransactionManager(request_q, response_q).start()

options_dict = {
    sip_parser.r_SEND: (options.process, {
        sip_parser.r_1XX: (None, None),
        sip_parser.r_2XX: (None, None),
        sip_parser.r_3XX: (None, None),
        sip_parser.r_4XX: (None, None),
        sip_parser.r_5XX: (None, None),
        sip_parser.r_6XX: (None, None),
    })
}

result = sip_agent.process_transaction(
    options_dict, response_q, request_q, {
        'host': sys.argv[1],
        'port': int(sys.argv[2]),
        'user': sys.argv[3],
        'target_user': sys.argv[4]
    })
Exemplo n.º 5
0
from sip_agent import SIPInvite

response_q = Queue(0)
request_q = Queue(0)

sip_agent = SIPAgent()

ack = SIPAck()
cancel = SIPCancel()
register = SIPRegister()
invite = SIPInvite()

SIPTransactionManager(request_q, response_q).start()

invite_dict = {
    sip_parser.r_SEND: (invite.process, {
        sip_parser.r_1XX: (cancel.process, {
            sip_parser.r_1XX: (None, None),
            sip_parser.r_2XX: (None, None),
            sip_parser.r_6XX: (ack.process, None),
            sip_parser.r_4XX: (ack.process, None)
        })
    })
}

result = sip_agent.process_transaction(invite_dict, response_q, request_q, {
    'user': sys.argv[1],
    'host': sys.argv[2],
    'port': int(sys.argv[3])
})
from sip_agent import SIPAgent
from sip_agent import SIPRegister
from sip_agent import SIPInvite

response_q = Queue(0)
request_q = Queue(0)

sip_agent = SIPAgent()
register = SIPRegister()

SIPTransactionManager(request_q, response_q).start()

register_dict = {
    sip_parser.r_SEND: (register.process, {
        sip_parser.r_4XX: (register.process, {
            sip_parser.r_2XX: (sip_agent.require, None),
            sip_parser.r_1XX: (None, None)
        }),
        sip_parser.r_1XX: (None, None),
        sip_parser.r_2XX: (sip_agent.require, None),
    })
}

result = sip_agent.process_transaction(
    register_dict, response_q, request_q, {
        'user': sys.argv[1],
        'password': sys.argv[2],
        'host': sys.argv[3],
        'port': int(sys.argv[4]),
    })