Manipulating the media address and port in the outgoing SDP

DL
dragos liciu
Wed, Oct 28, 2020 10:58 AM

Hi,I am designing a SIP client based on PJSip with the following characteristics:- coding in NodeJS (for several reasons) and therefore use PJSUA2 API;- no ICE;- audio-only;- incoming RTP audio will not be received by the SIP client, but by a different entity (different IP address and port).
My question is: how do I manipulate the outgoing SDP from NodeJS (or PJSUA2 API level) to achieve this?
 As far as I could see in the RFC 4566, changing the destination for the incoming audio in the outgoing SDP could be achieved by changing the connection address in "c=" line in session or media description and changing the media port in audio "m=" line in the media description.
I know it's possible (at least using the pjsip C API) to capture the outgoing SDP (after being created by the library)  and change the values of the fields above (c= and m=) by brute force but is there a better way to achieve that - and using the PJSUA2 API?

I also have concerns about the RTCP reports - since media will not be received by the SIP agent - but I'll save it for another email.Kind Regards,Dragos.

Hi,I am designing a SIP client based on PJSip with the following characteristics:- coding in NodeJS (for several reasons) and therefore use PJSUA2 API;- no ICE;- audio-only;- incoming RTP audio will not be received by the SIP client, but by a different entity (different IP address and port). My question is: how do I manipulate the outgoing SDP from NodeJS (or PJSUA2 API level) to achieve this?  As far as I could see in the RFC 4566, changing the destination for the incoming audio in the outgoing SDP could be achieved by changing the connection address in "c=" line in session or media description and changing the media port in audio "m=" line in the media description. I know it's possible (at least using the pjsip C API) to capture the outgoing SDP (after being created by the library)  and change the values of the fields above (c= and m=) by brute force but is there a better way to achieve that - and using the PJSUA2 API? I also have concerns about the RTCP reports - since media will not be received by the SIP agent - but I'll save it for another email.Kind Regards,Dragos.