From d4b10cfb3e41e7635385866b7f96968c6b1e9cb1 Mon Sep 17 00:00:00 2001 From: Ward van Wanrooij Date: Sat, 26 Dec 2015 16:24:09 +0100 Subject: chan_sip: option 'notifyringing' change and doc fix In the sample sip.conf this is written with regard to notifyringing: ;notifyringing = no ; Control whether subscriptions already INUSE get sent RINGING when another call is sent (default: yes) However, this setting changes whether or not any RINGING indications are sent to subscriptions. There is no separate configurable setting that allows to control whether INUSE subscriptions also get sent RINGING. This is however a useful option, to see (using BLF) if somebody else is able to handle an incoming call or if everybody is busy. This patch corrects the documentation for notifyringing (so the documentation matches the functionality) and make notifyringing a tri-state option, by adding the value 'notinuse' (in addition to 'yes' and 'no'). When notifyringing = notinuse, only subscriptions that are not INUSE are sent the RINGING signal. The default setting for notifyringing remains set to yes, so the default behaviour is not affected. ASTERISK-25558 Change-Id: I88f7036ee084bb3f43b74f15612695c6708f74aa --- channels/sip/include/sip.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'channels/sip') diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h index 87b59f661..d60f49ecb 100644 --- a/channels/sip/include/sip.h +++ b/channels/sip/include/sip.h @@ -211,7 +211,7 @@ #define DEFAULT_ALLOW_EXT_DOM TRUE /*!< Allow external domains */ #define DEFAULT_REALM "asterisk" /*!< Realm for HTTP digest authentication */ #define DEFAULT_DOMAINSASREALM FALSE /*!< Use the domain option to guess the realm for registration and invite requests */ -#define DEFAULT_NOTIFYRINGING TRUE /*!< Notify devicestate system on ringing state */ +#define DEFAULT_NOTIFYRINGING NOTIFYRINGING_ENABLED /*!< Notify devicestate system on ringing state */ #define DEFAULT_NOTIFYCID DISABLED /*!< Include CID with ringing notifications */ #define DEFAULT_PEDANTIC TRUE /*!< Follow SIP standards for dialog matching */ #define DEFAULT_AUTOCREATEPEER AUTOPEERS_DISABLED /*!< Don't create peers automagically */ @@ -622,6 +622,13 @@ enum sipmethod { SIP_PING, /*!< Not supported at all, no standard but still implemented out there */ }; +/*! \brief Setting for the 'notifyringing' option, see sip.conf.sample for details. */ +enum notifyringing_setting { + NOTIFYRINGING_DISABLED = 0, + NOTIFYRINGING_ENABLED = 1, + NOTIFYRINGING_NOTINUSE = 2, +}; + /*! \brief Settings for the 'notifycid' option, see sip.conf.sample for details. */ enum notifycid_setting { DISABLED = 0, -- cgit v1.2.3