远程服务器向我发送了 OPTION 包,但我的 asterisk 服务器发送了“404 NOT FOUND”响应。sip.conf 中是否有选项或其他内容?
sip.conf
[remote-server]
type=friend
host=10.1.1.1
context=test
qualify=yes
disallow=all
insecure=invite,port
allowguest=yes
nat=force_rport,comedia
allow=g729
allow=alaw
allow=ulaw
allow=gsm
要求:
OPTIONS sip:10.1.1.1:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.1:5060
Call-ID: XXXXXX@YYYYY
From: <sip:[email protected]>;tag=1oz35123
To: <sip:10.1.1.2>
CSeq: 1 OPTIONS
Contact: <sip:10.1.1.1:36808;transport=udp>;expires=65535
Accept: application/sdp
Max-Forwards: 70
Content-Length: 0
回复:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.1.1.1:5060
From: <sip:<[email protected]>;tag=1oz35123
To: <sip:10.1.1.2>;tag=as53fc8169
Call-ID: XXXXXX@YYYYY
CSeq: 1 OPTIONS
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0
答案1
我已通过将 extension.conf 添加到
[default]
exten => s,1,NoOp( DEFAULT context )
答案2
对于大多数开关来说,“未找到”选项上的答案是可以的。
如果您想在默认上下文中执行 s-extension,为了安全目的最好使用 Hangup。