System information
subscribecontext
Allows you to set a specific context for subscriptions. Without this set, the context
defined by the context option will be used. This option may be set either in the
[general] section or in peer-specific sections of sip.conf.
notifyringing
Controls whether or not a notification will be sent when an extension goes into a
ringing state. This option is set to yes by default. It only has an effect on subscrip-
tions that use the dialog-info event package. This option can only be set globally
in the [general] section of sip.conf.
notifyhold
Allows chan_sip to set SIP devices’ states to ONHOLD. This is set to yes by default.
This option can only be set globally in the [general] section of sip.conf.
notifycid
Enables/disables sending of an inbound call’s caller ID information to an exten-
sion. This option applies to devices that subscribe to dialog-info+xml-based ex-
tension state notifications, such as Snom phones. Displaying caller ID information
can be useful to help an agent decide whether to execute a pickup on an incoming
call. This option is set to no by default.
This magic pickup only works if the extension and context of the
hint are the same as the extension and context of the incoming call.
Notably, the usage of the subscribecontext option usually breaks
this option. This option can also be set to the value ignore-con
text. This will bypass the context issue, but should only be used
in an environment where there is only a single instance of the ex-
tension that has been subscribed to. Otherwise, you might acci-
dentally pick up calls that you did not mean to pick up.
Using Custom Device States
Asterisk provides the ability to create custom device states. This lends itself to the
development of some interesting custom applications. We’ll start by showing the basic
syntax for controlling custom device states, and then we’ll build an example that uses
them.
Custom device states all start with a prefix of Custom:. The text that comes after the
prefix can be anything you want. To set or read the value of a custom device state, use
the DEVICE_STATE() dialplan function. For example, to set a custom device state:
exten => example,1,Set(DEVICE_STATE(Custom:example)=BUSY)
Similarly, to read the current value of a custom device state:
exten => Verbose(1,The state of Custom:example is ${DEVICE_STATE(Custom:example)})
Using Custom Device States | 307