Ignore:
Timestamp:
Nov 27, 2008 12:06:46 AM (15 years ago)
Author:
bennylp
Message:

Ticket #10: handle redirection response in the invite session

File:
1 edited

Legend:

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

    r2110 r2370  
    1 # $Id:$ 
     1# $Id$ 
    22import imp 
    33import sys 
     
    6868                                raise TestError("Excluded pattern " + pat + " found" + tname) 
    6969                # Create response 
    70                 response = dlg.create_response(request, t.resp_code, "Status reason") 
    71                 # Add headers to response 
    72                 for h in t.resp_hdr: 
    73                         response = response + h + "\r\n" 
    74                 # Add message body if required 
    75                 if t.body: 
    76                         response = response + t.body 
    77                 # Send response 
    78                 dlg.send_msg(response, src_addr) 
     70                if t.resp_code!=0: 
     71                        response = dlg.create_response(request, t.resp_code, "Status reason") 
     72                        # Add headers to response 
     73                        for h in t.resp_hdr: 
     74                                response = response + h + "\r\n" 
     75                        # Add message body if required 
     76                        if t.body: 
     77                                response = response + t.body 
     78                        # Send response 
     79                        dlg.send_msg(response, src_addr) 
     80 
    7981                # Expect something to happen in pjsua 
    8082                if t.expect != "": 
Note: See TracChangeset for help on using the changeset viewer.