Changeset 2080 for pjproject


Ignore:
Timestamp:
Jun 27, 2008 9:22:12 PM (16 years ago)
Author:
bennylp
Message:

Added the ability to send a complete/arbitrary SIP INVITE message in mod_sendto.py Python test script

Location:
pjproject/trunk/pjsip-apps/src/test-pjsua
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/test-pjsua/inc_sip.py

    r2066 r2080  
    206206        # pjsua InstanceParam 
    207207        inst_param = None 
     208        # Complete INVITE message. If this is not empty, then this 
     209        # message will be sent instead and the "sdp" and "extra_headers" 
     210        # settings will be ignored. 
     211        complete_msg = "" 
    208212        # Initial SDP 
    209213        sdp = "" 
     
    221225        def __init__(self, name, pjsua_args, sdp, resp_code,  
    222226                     resp_inc=[], resp_exc=[], use_tcp=False, 
    223                      extra_headers=""): 
     227                     extra_headers="", complete_msg=""): 
     228                self.complete_msg = complete_msg 
    224229                self.sdp = sdp 
    225230                self.resp_code = resp_code 
  • pjproject/trunk/pjsip-apps/src/test-pjsua/mod_sendto.py

    r2078 r2080  
    1919        cfg = cfg_file.sendto_cfg 
    2020         
    21         req = dlg.create_invite(cfg.sdp, cfg.extra_headers) 
     21        if len(cfg.complete_msg) != 0: 
     22                req = cfg.complete_msg 
     23        else: 
     24                req = dlg.create_invite(cfg.sdp, cfg.extra_headers) 
    2225        resp = dlg.send_request_wait(req, 10) 
    2326        if resp=="": 
Note: See TracChangeset for help on using the changeset viewer.