前面看sip相关知识,看来看去,不知道怎么回事,只是记住了些皮毛的东西。
今天正是开始项目,才搞明白:sip是会话初始化协议,只是建立会话,voice传输是要用RTP协议的。运用sip的ip电话准确应该是sip/rtp方式的。
不知是因为认真开始做了有了新的发现,还是放了一段时间之后对知识有了新的体悟。
一个完整的运用sip协议的网络电话,应该包含下面部分的:
1、用sip协议来完成会话的建立,修改,管理等。
2、rtp协议来传输digital voice。
3、RADIUS协议完成远端用户拨入验证服务。
4、LDAP(Lightweight Directory Access Protocol)负责定位。
一个通话为以下过程:
|UAc|→拨号→|server|→定位、转发→|UAs|→回应→|server|→回应→|UAc|
sip,sdp,RTP的关系:
An SDP packet is often carried as the message body of a SIP request;
As part of a SIP INVITE request, an SDP offer is made, detailing a number of characteristics that define the proposed session (such as codec type, contact information, and RTP ports to be used).
至于三者到底是怎样的组合方式呢?我搜到了下面一段话。
/*
Try to search on keyword "re-INVITE" and appropriate examples. As soon as you found yourself in need of another audio / video stream into existing SIP call with already established media you need to start new INVITE / OK / ACK sequence. New streams could replace your existing media streams or could be added. It's your choice and this depends on signalling. Of course you need RTP stack with capability / codecs supported to satisfy your actual needs.
People often implement this to handle T.38 fax switching inside SIP calls. You can obtain required reference logs dumping call from device which supports T.38 (or actually having any modem over IP support). Remember your voice streams should be LBR (low bit rate) codecs such as G.729 or G.723.1. This could bring you with many answers at least 'when' to start RTP and how to signal this. At least initiating INVITE with proposed new RTP stream you should be ready to receive this stream right from the start. You can start sending RTP after OK with proposed ports 'where' to send RTP.
*/
Try to search on keyword "re-INVITE" and appropriate examples. As soon as you found yourself in need of another audio / video stream into existing SIP call with already established media you need to start new INVITE / OK / ACK sequence. New streams could replace your existing media streams or could be added. It's your choice and this depends on signalling. Of course you need RTP stack with capability / codecs supported to satisfy your actual needs.
People often implement this to handle T.38 fax switching inside SIP calls. You can obtain required reference logs dumping call from device which supports T.38 (or actually having any modem over IP support). Remember your voice streams should be LBR (low bit rate) codecs such as G.729 or G.723.1. This could bring you with many answers at least 'when' to start RTP and how to signal this. At least initiating INVITE with proposed new RTP stream you should be ready to receive this stream right from the start. You can start sending RTP after OK with proposed ports 'where' to send RTP.
*/