我需要实现对资源列表的 SIP 订阅,我应该将包含所需 SIP ID 的 xml 好友列表放在该标签下(以监视其状态)。请注意,我使用的是 Jain-SIP API,并且我实现了单个订阅并且工作正常,但是在使用多个资源进行监控时我遇到了困难。应添加的 XML,如http://tools.ietf.org/search/rfc5367中所示
<?xml version="1.0" encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<list>
<entry uri="sip:bill@example.com" />
<entry uri="sip:joe@example.org" />
<entry uri="sip:ted@example.net" />
</list>
</resource-lists>
我用好友列表 xml 构建 sip 请求:
SUBSCRIBE sip:rls@example.com SIP/2.0
Via: SIP/2.0/TCP terminal.example.com;branch=z9hG4bKwYb6QREiCL
Max-Forwards: 70
To: RLS <sip:rls@example.com>
From: <sip:adam@example.com>;tag=ie4hbb8t
Call-ID: cdB34qLToC@terminal.example.com
CSeq: 1 SUBSCRIBE
Contact: <sip:terminal.example.com>
Event: presence
Expires: 7200
Require: recipient-list-subscribe
Supported: eventlist
Accept: application/cpim-pidf+xml
Accept: application/rlmi+xml
Content-Type: application/resource-lists+xml
Content-Disposition: recipient-list
Content-Length: 337
<?xml version="1.0" encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<list>
<entry uri="sip:bill@example.com" />
<entry uri="sip:joe@example.org" />
<entry uri="sip:ted@example.net" />
</list>
</resource-lists>
最好的,