From f58301dc3d3da0e92ac077618730f628416546cb Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sat, 29 Apr 2006 08:31:09 +0000 Subject: Improve codec handling in pjsua cmd-line options, and add URI to call git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@422 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_call.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'pjsip/src/pjsua-lib/pjsua_call.c') diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index b5e32780..b8fff57f 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -1047,13 +1047,14 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv, pjmedia_conf_connect_port( pjsua.mconf, pjsua.wav_slot, call->conf_slot, 0); - } else if (pjsua.auto_loop && call->inv->role == PJSIP_ROLE_UAS) { + } + if (pjsua.auto_loop && call->inv->role == PJSIP_ROLE_UAS) { pjmedia_conf_connect_port( pjsua.mconf, call->conf_slot, call->conf_slot, 0); - } else if (pjsua.auto_conf) { - + } + if (pjsua.auto_conf) { int i; pjmedia_conf_connect_port( pjsua.mconf, 0, call->conf_slot, 0); @@ -1070,11 +1071,14 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv, call->conf_slot, 0); } - } else { - - /* Connect new call to the sound device port (port zero) in the - * main conference bridge. - */ + } + + /* Normal operation: if no auto_xx is given, connect new call to + * the sound device port (port zero) in the main conference bridge. + */ + if (pjsua.auto_play == 0 && pjsua.auto_loop == 0 && + pjsua.auto_conf == 0) + { pjmedia_conf_connect_port( pjsua.mconf, 0, call->conf_slot, 0); pjmedia_conf_connect_port( pjsua.mconf, call->conf_slot, 0, 0); } -- cgit v1.2.3