pjsua定制sdp [英] pjsua custom sdp

查看:223
本文介绍了pjsua定制sdp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用pjsua创建简单的SIP UA.我需要在传出的INVITE请求中插入自定义主体(SDP).据我所知,pjsua不支持自定义SDP,因此我需要使用更多低级API来实现.但是现在,我必须找到任何粗鲁的技巧/黑客/修补程序,才能在pjsua生成的INVITE中插入自定义SDP.

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 use more low-level API to do it. But for now I have to find any rude trick/hack/hotfix to insert custom SDP in pjsua-generated INVITE.

这就是问题:我该怎么办?

So that's the question: how could I do it?

推荐答案

看似简单的解决方案是修改pjsua源.关键是要在传入和传出呼叫的代码路径上从您的自定义SDP中创建一个pjmedia_session.您想查看pjsua_call_make_call()pjsua_call_answer()pjsua_call_get_media_session().如果我没记错,则在应答呼叫之前不会处理SDP.

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.

您仍然必须学习核心pjsip库.毕竟,pjsua使用它.该解决方案并不十分简单,但适合黑客的一般定义. :)

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. :)

这篇关于pjsua定制sdp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆