From 8f0078e1663ab2d5d6b25a0d5745f5c14ed9ab18 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 22 Sep 2006 12:48:18 +0000 Subject: In pjsua, outgoing REFER now always put Refer-Sub: false git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@733 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/pjsua/pjsua_app.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'pjsip-apps/src/pjsua') diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 0a495b03..be4cc418 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -2104,6 +2104,10 @@ void console_app_main(const pj_str_t *uri_to_call) } else { int call = current_call; + pjsua_msg_data msg_data; + pjsip_generic_string_hdr refer_sub; + pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 }; + pj_str_t STR_FALSE = { "false", 5 }; ui_input_url("Transfer to URL", buf, sizeof(buf), &result); @@ -2114,19 +2118,25 @@ void console_app_main(const pj_str_t *uri_to_call) continue; } + /* Add Refer-Sub: false in outgoing REFER request */ + pjsua_msg_data_init(&msg_data); + pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB, + &STR_FALSE); + pj_list_push_back(&msg_data.hdr_list, &refer_sub); + if (result.nb_result != NO_NB) { if (result.nb_result == -1 || result.nb_result == 0) puts("You can't do that with transfer call!"); else { pjsua_buddy_info binfo; pjsua_buddy_get_info(result.nb_result-1, &binfo); - pjsua_call_xfer( current_call, &binfo.uri, NULL); + pjsua_call_xfer( current_call, &binfo.uri, &msg_data); } } else if (result.uri_result) { pj_str_t tmp; tmp = pj_str(result.uri_result); - pjsua_call_xfer( current_call, &tmp, NULL); + pjsua_call_xfer( current_call, &tmp, &msg_data); } } break; -- cgit v1.2.3