SIP UAS 请求选项

发布于 2024-09-03 21:31:16 字数 2644 浏览 10 评论 0原文

我有向 UAS 注册的 UAC,注册后 UAS 向我发送 OPTIONS 请求,我应该回答什么?

只有音频媒体流?

更新一:

请允许我更好地解释自己...如果我想邀请某人参加会议,我会使用 INVITE 方法并与媒体协商,针对该特定会议 。但是,一旦我注册到服务器,它会要求我提供选项,那么我应该提供什么,我的客户端支持的所有内容?一旦我回答,是否会推断出我从现在开始请求的每个邀请都会使用这些媒体?或者我是否需要为每个请求提供新媒体?

更新二:

嗨 Wiz, 我当时正在构建一个协商系统,所以我尝试了一下并回复了 UAS,这是我们的排序对话框:

OPTIONS sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK45b197cb;rport=5060;received=xx.xx.xx.xx
From: "Unknown" <sip:[email protected]>;tag=as66cf26df
To: <sip:[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 OPTIONS
User-Agent: Freeswitch 1.2.3
Max-Forwards: 70
Date: Sat, 05 Jun 2010 12:06:43 GMT
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Content-Length: 0

选项响应 102:

SIP/2.0 200 OK
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK45b197cb;rport=5060;received=xx.xx.xx.xx
From: "Unknown" <sip:[email protected]>;tag=as66cf26df
To: <sip:[email protected]>
CSeq: 102 OPTIONS
Call-ID: [email protected]
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS
Content-Type: application/sdp
Content-Length: 248

v=0
o=310 4515233118481497946 4515233118481497946 IN IP4 10.0.0.1
s=-
i=Nu-Art Software - TacB0sS VoIP information
c=IN IP4 10.0.0.1
m=audio 40000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000

此响应导致服务器停止向我发送选项请求,这是否意味着我现在只能在服务器上使用这些参数吗?还是像你说的那样,没关系?

谢谢, 亚当.

I have UAC that registers to a UAS, after registration the UAS sends me an OPTIONS request, what should I answer it?

only the audio media streams?

Update I:

Allow me to explain myself better... if I want to invite someone to a session I USE the INVITE method and negotiate the media then, for that specific session. But once I register to the server, and it asks me for OPTIONS, then what should I supply, everything my client supports? once I answer it would it deduce that every INVITE I would request from now on would use these medias? or would I need to supply new media with every request?

Update II:

Hi Wiz,
I was in the process of building a negotiation system, so i tried it out and replied the UAS here is the sort dialog we had:

OPTIONS sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK45b197cb;rport=5060;received=xx.xx.xx.xx
From: "Unknown" <sip:[email protected]>;tag=as66cf26df
To: <sip:[email protected]>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 OPTIONS
User-Agent: Freeswitch 1.2.3
Max-Forwards: 70
Date: Sat, 05 Jun 2010 12:06:43 GMT
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Content-Length: 0

OPTIONS In Response To 102:

SIP/2.0 200 OK
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK45b197cb;rport=5060;received=xx.xx.xx.xx
From: "Unknown" <sip:[email protected]>;tag=as66cf26df
To: <sip:[email protected]>
CSeq: 102 OPTIONS
Call-ID: [email protected]
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS
Content-Type: application/sdp
Content-Length: 248

v=0
o=310 4515233118481497946 4515233118481497946 IN IP4 10.0.0.1
s=-
i=Nu-Art Software - TacB0sS VoIP information
c=IN IP4 10.0.0.1
m=audio 40000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000

This response caused the server to stop sending me the options request, does this means I can only use these parameters with the server now? or as you said, it does not matter?

Thanks,
Adam.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

素染倾城色 2024-09-10 21:31:16

OPTIONS 请求可用于查询 SIP 设备的功能,因此根据法律规定,您应该在 OPTIONS 响应 SDP 中返回所有支持的编解码器。

需要记住的一件事是,某些用户代理(尤其是 Asterisk)使用 OPTIONS 请求作为保持活动机制,并且它们实际上并不关心响应,实际上只是将其丢弃。如果处理 OPTIONS 请求会花费您一些处理时间,请记住这一事实。

在我自己的 SIP 代理上,我返回 405 Method Not Supported for OPTIONS requests,并且从未产生过任何副作用。

An OPTIONS request can be used to query a SIP device for capabilities so yes by the letter of the law you should return all supported codecs in the OPTIONS response SDP.

One thing to keep in mind is that some user agents, particularly Asterisk, use OPTIONS requests as a keep-alive mechanism and they don't actually care about the response and in fact simply drop it. If processing an OPTIONS request is going to to cost you a bit of processing time keep that fact in mind.

On my own SIP Proxy I return a 405 Method Not Supported for OPTIONS requests and have never had any side effects.

凌乱心跳 2024-09-10 21:31:16

您应该返回与邀请相同的状态。

除了 SDP(同样与邀请相同)之外,您还应该使用“Allow”、“Accept”、“Accept-Encoding”、“Accept-Language”和“Supported”标头字段。

了解更多:http://www.faqs.org/rfcs/rfc3261.html#ixzz0pnjJjKfl

You should return the same status as you would for an invite.

Besides your SDP (again same as an invite would) you should use Allow, Accept, Accept-Encoding, Accept-Language, and Supported header fields.

Read more: http://www.faqs.org/rfcs/rfc3261.html#ixzz0pnjJjKfl

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文