Hello all, Prior PJSIP version 1.6 when a SDP-answer was received with multiple (audio) codecs, just the first codec was selected. The other was just ignored. From on PJSIP 1.6 this behavior has been changed such a way that PJSIP now starts reINVITE. In our situation this resulted sometimes in undesirable behavior, so we decided to revert back to old behavior. I think this patch (or part of it) has already been mentioned once, but it is offered again here. We've introduced "PJSUA_IGNORE_OTHER_THAN_FIRST_CODEC_IN_SDP_ANSWER"-flag for this. Credits to Arie Velthoen for his initial patch. It is likely this patch will never make it to the main-branch (or else in bit modified form), but we wanted to share it anyway. Please find the patch below (based upon stable 1.10): With regards, Eize Slange Index: pjsip/src/pjsua-lib/pjsua_call.c =================================================================== --- pjsip/src/pjsua-lib/pjsua_call.c (revision 3748) +++ pjsip/src/pjsua-lib/pjsua_call.c (working copy) @@ -3269,7 +3269,17 @@ call->lock_codec.retry_cnt = 0; return PJ_SUCCESS; } +#if PJSUA_IGNORE_OTHER_THAN_FIRST_CODEC_IN_SDP_ANSWER + else + { + /* Ignore other codecs, use the first codec. */ + PJ_LOG(3, (THIS_FILE, "Got answer with multiple codecs, use the first one.")); + call->lock_codec.retry_cnt = 0; + + return PJ_SUCCESS; + } +#else /* Remote keeps answering with multiple codecs, let's just give up * locking codec to avoid infinite retry loop. */ @@ -3291,6 +3301,7 @@ &call->lock_codec.reinv_timer, &delay); return PJ_SUCCESS; +#endif } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110913/61f4203e/attachment.html>