FreeSWITCH技巧:notify与message-waiting

FreeSWITCH技巧:notify与message-waiting

@(Freeswitch经验点滴)

现象描述

在客户端登陆抓包时,发现了FreeSWITCH发来的包:

NOTIFY sip:9988002@192.168.168.106:63984;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.168.204:11160;rport;branch=z9hG4bKyDmpeXc5757jD
Max-Forwards: 70
From: sip:9988002@192.168.168.204;tag=2r7dkoK0sQmO
To: sip:9988002@192.168.168.204;tag=46645800
Call-ID: 27392434-dc88-1daf-88da-27412056899c
CSeq: 1086796376 NOTIFY
Contact: sip:9988002@192.168.168.204:11160;transport=udp
User-Agent: FreeSWITCH-mod_sofia/1.2.23~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Event: message-summary
Allow-Events: talk, hold, conference, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Subscription-State: active;expires=120
Content-Type: application/simple-message-summary
Content-Length: 70
...(下面为消息体)
Messages-Waiting: no
Message-Account: sip:9988002@192.168.168.204

该消息的目的是在话机登陆的时候,即通知话机目前有几个未读的消息
具体可参阅RFC文档:http://tools.ietf.org/html/rfc3842

问题分析

之所以在客户端一登陆就发送该条消息,可在Athnomy的邮件回复中找到答案:

You must be new to SIP, you will soon learn that almost every SIP device just stupidly expects you to send this and never does it the correct way by subscribing to it which is why this option is the default.

Email Link

FreeSWITCH设置

将该项功能关闭,配置如下:
文件:conf/sip-profiles/internal.xml
修改项:

    <!-- 'true' means every time 'first-only' means on the first register -->
    <param name="send-message-query-on-register" value="false"/>

或者,将值修改为first-only,只在客户端登陆时发,其他时间不发。

转载于:https://www.cnblogs.com/jizha/p/freeswitch_notify_message_waitings.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值