I am attempting to use SIP.js in an environment where I need to do a blind transfer request from a non webRTC endpoint that initiates the request with and SDP describing a g711 voice codec.
When I do this, SIP.js _correctly_ rejects the session as a 'bad media'.... however, in this call flow, I am not actually sending any media; and the call flow works well if I ignore the check for bad media.
After downloading and building from source the devel version of SIP.js, I made the following modification to comment out the check and just fire the new session in function fireNewSession() starting from line 5609:
this.mediaHandler.setDescription(
request.body,
/*
* onSuccess
* SDP Offer is valid. Fire UA newRTCSession
*/
fireNewSession,
/*
* onFailure
* Bad media description
*/
/*--IGNORE_BAD_MEDIA_HACK--*/
fireNewSession
/*
function(e) {
self.logger.warn('invalid SDP');
self.logger.warn(e);
request.reply(488);
}
*/
Every time I download from source, I am making this modification to support my needed call flow. I wanted to see if you would consider an enhancement to SIP.js (maybe even a stack configuration option) to ignore the check for the bad media.
Thanks for your consideration.