Ticket #976: Fixed pjsua_call_make_call() to associate call with account before media channel initialization.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2955 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 06cddb5..5a19d95 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -384,13 +384,16 @@
call_id = alloc_call_id();
if (call_id == PJSUA_INVALID_ID) {
- pjsua_perror(THIS_FILE, "Error making file", PJ_ETOOMANY);
+ pjsua_perror(THIS_FILE, "Error making call", PJ_ETOOMANY);
PJSUA_UNLOCK();
return PJ_ETOOMANY;
}
call = &pjsua_var.calls[call_id];
+ /* Associate session with account */
+ call->acc_id = acc_id;
+
/* Create temporary pool */
tmp_pool = pjsua_pool_create("tmpcall10", 512, 256);
@@ -499,7 +502,6 @@
}
/* Create and associate our data in the session. */
- call->acc_id = acc_id;
call->inv = inv;
dlg->mod_data[pjsua_var.mod.id] = call;