通过URI进行authentication的SIP呼叫

我正在尝试将电话号码redirect到仅在经过身份validation时可访问的SIP地址。

鉴于以下情况,SIP URI将如何(如果可能)?
SIP服务器: sip.example.com
validation用户: myuser
authentication密码: mypass
用户要调用: targetuser

如果未经过身份validation,则调用[email protected]将不会通过。
我只能select指定一个SIP URI。

一般SIP URI的格式是

 sip:user:password@host:port;uri-parameters?headers 

所以在这种情况下,你需要

 sip:myuser:[email protected]?to=sip:targetuser%40sip.example.com 

注意区别:

  • sip.example.com:port调用gethostbyname()来parsingDNS
  • 没有端口号的sip.example.com使用SRVlogging。

您还必须注意, RFC3261不鼓励使用password SIP URI组件:

password :与用户关联的密码。 虽然SIP和SIPS URI语法允许该字段存在,但是不build议使用该字段,因为以明文forms传递身份validation信息(例如URI)在几乎所有情况下都被certificate是安全风险。 例如,在此字段中inputPIN码会显示PIN。