summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h2
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c15
2 files changed, 9 insertions, 8 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 4890a87b..45515a9b 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -660,7 +660,7 @@ typedef struct pjsua_callback
/**
* Notify application on call being transfered (i.e. REFER is received).
* Application can decide to accept/reject transfer request
- * by setting the code (default is 200). When this callback
+ * by setting the code (default is 202). When this callback
* is not defined, the default behavior is to accept the
* transfer.
*
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 58330988..9e88a360 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -3005,14 +3005,14 @@ static void on_call_transfered( pjsip_inv_session *inv,
NULL);
/* Notify callback */
- code = PJSIP_SC_OK;
+ code = PJSIP_SC_ACCEPTED;
if (pjsua_var.ua_cfg.cb.on_call_transfer_request)
(*pjsua_var.ua_cfg.cb.on_call_transfer_request)(existing_call->index,
&refer_to->hvalue,
&code);
if (code < 200)
- code = PJSIP_SC_OK;
+ code = PJSIP_SC_ACCEPTED;
if (code >= 300) {
/* Application rejects call transfer request */
pjsip_dlg_respond( inv->dlg, rdata, code, NULL, NULL, NULL);
@@ -3027,15 +3027,16 @@ static void on_call_transfered( pjsip_inv_session *inv,
if (no_refer_sub) {
/*
- * Always answer with 200.
+ * Always answer with 2xx.
*/
pjsip_tx_data *tdata;
const pj_str_t str_false = { "false", 5};
pjsip_hdr *hdr;
- status = pjsip_dlg_create_response(inv->dlg, rdata, 200, NULL, &tdata);
+ status = pjsip_dlg_create_response(inv->dlg, rdata, code, NULL,
+ &tdata);
if (status != PJ_SUCCESS) {
- pjsua_perror(THIS_FILE, "Unable to create 200 response to REFER",
+ pjsua_perror(THIS_FILE, "Unable to create 2xx response to REFER",
status);
return;
}
@@ -3051,7 +3052,7 @@ static void on_call_transfered( pjsip_inv_session *inv,
status = pjsip_dlg_send_response(inv->dlg, pjsip_rdata_get_tsx(rdata),
tdata);
if (status != PJ_SUCCESS) {
- pjsua_perror(THIS_FILE, "Unable to create 200 response to REFER",
+ pjsua_perror(THIS_FILE, "Unable to create 2xx response to REFER",
status);
return;
}
@@ -3093,7 +3094,7 @@ static void on_call_transfered( pjsip_inv_session *inv,
}
- /* Accept the REFER request, send 200 (OK). */
+ /* Accept the REFER request, send 2xx. */
pjsip_xfer_accept(sub, rdata, code, &hdr_list);
/* Create initial NOTIFY request */