pjsua custom sdp

前端 未结 3 483
孤街浪徒
孤街浪徒 2021-01-16 12:15

I\'m using pjsua to create simple SIP UA. I need to insert custom body (SDP) in outgoing INVITE requests. As far as I know, pjsua does not support custom SDP, and I need to

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-16 13:04

    The seemingly simple solution is to modify the pjsua source. The key is to create a pjmedia_session out of your custom SDP on code paths of both incoming and outgoing calls. You wanna look into pjsua_call_make_call(), pjsua_call_answer() and pjsua_call_get_media_session(). If my memory serves me right, SDP is not processed until a call is answered.

    You will still have to learn the core pjsip library. After all, pjsua uses it. This solution is not exactly simple but fits the general definition of a hack. :)

提交回复
热议问题