Ignore:
Timestamp:
Feb 13, 2013 10:19:25 AM (10 years ago)
Author:
nanang
Message:

Close #1614: Added call redirect option PJSIP_REDIRECT_ACCEPT_REPLACE to accept call redirection with replaced 'To' header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r4330 r4347  
    378378    puts  ("  --no-force-lr       Allow strict-route to be used (i.e. do not force lr)"); 
    379379    puts  ("  --accept-redirect=N Specify how to handle call redirect (3xx) response."); 
    380     puts  ("                      0: reject, 1: follow automatically (default), 2: ask"); 
     380    puts  ("                      0: reject, 1: follow automatically,"); 
     381    puts  ("                      2: follow + replace To header (default), 3: ask"); 
    381382 
    382383    puts  (""); 
     
    405406    pjsua_transport_config_default(&cfg->rtp_cfg); 
    406407    cfg->rtp_cfg.port = 4000; 
    407     cfg->redir_op = PJSIP_REDIRECT_ACCEPT; 
     408    cfg->redir_op = PJSIP_REDIRECT_ACCEPT_REPLACE; 
    408409    cfg->duration = NO_LIMIT; 
    409410    cfg->wav_id = PJSUA_INVALID_ID; 
     
    22422243 
    22432244    /* accept-redirect */ 
    2244     if (config->redir_op != PJSIP_REDIRECT_ACCEPT) { 
     2245    if (config->redir_op != PJSIP_REDIRECT_ACCEPT_REPLACE) { 
    22452246        pj_ansi_sprintf(line, "--accept-redirect %d\n", 
    22462247                        config->redir_op); 
     
    30523053 
    30533054        PJ_LOG(3,(THIS_FILE, "Call %d is being redirected to %.*s. " 
    3054                   "Press 'Ra' to accept, 'Rr' to reject, or 'Rd' to " 
    3055                   "disconnect.", 
     3055                  "Press 'Ra' to accept+replace To header, 'RA' to accept, " 
     3056                  "'Rr' to reject, or 'Rd' to disconnect.", 
    30563057                  call_id, len, uristr)); 
    30573058    } 
     
    53825383            } else if (menuin[1] == 'a') { 
    53835384                pjsua_call_process_redirect(current_call,  
     5385                                            PJSIP_REDIRECT_ACCEPT_REPLACE); 
     5386            } else if (menuin[1] == 'A') { 
     5387                pjsua_call_process_redirect(current_call,  
    53845388                                            PJSIP_REDIRECT_ACCEPT); 
    53855389            } else if (menuin[1] == 'r') { 
Note: See TracChangeset for help on using the changeset viewer.