Re #1347: Fixed case 1, 2, and 3 above:
 - Generating a deactivated pre-answer media by cloning remote media. There was a case that the media transport in the offer is bad/unrecognized, PJSUA still generated the preanswer with RTP/AVP.
 - When generating answer, it should apply max media count (max_audio/video_cnt in account setting) after SDP negotiation instead of in the pjsua_media_channel_init()). This will require PJSUA to perform SDP re-negotiation when the SDP answer get changed.
 - Fixed media priority/acceptibility sorting, e.g: media with RTP/SAVP transport still got acceptable score in SRTP disabled mode, this messed up the algorithm of applying max media count setting.
 - Fixed SDP negotiator to skip format match in generating answer when the pre-answer provided is deactivated (port 0).




git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3714 74dad513-b988-da41-8d7b-12977e46ad98
2 files changed