>you can use the "user_data" argument in pjsua_call_make_call() to put your >app data into the call, to associate the new call id with app logic. I ran into a problem with user_data in pjsua_call_make_call; the user_data was being set too late in call_make_call, so the call_state callback was happening with user_data set to NULL. I modified pjsua_call_make_call (version 1.10) as follows to fix this: Index: pjproject-1.10/pjsip/src/pjsua-lib/pjsua_call.c =================================================================== --- pjproject-1.10/pjsip/src/pjsua-lib/pjsua_call.c???? (revision 36179) +++ pjproject-1.10/pjsip/src/pjsua-lib/pjsua_call.c???? (revision 36789) @@ -410,6 +410,7 @@ ???? /* Associate session with account */ ???? call->acc_id = acc_id; ???? call->call_hold_type = acc->cfg.call_hold_type; +??? call->user_data = user_data; ? ???? /* Create temporary pool */ ???? tmp_pool = pjsua_pool_create("tmpcall10", 512, 256); @@ -529,7 +530,6 @@ ???? inv->mod_data[pjsua_var.mod.id] = call; ? ???? /* Attach user data */ -??? call->user_data = user_data; ? ???? /* If account is locked to specific transport, then lock dialog ????? * to this transport too. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111115/02d60e64/attachment.html>