Friday, January 6, 2012

Asterisk "hint" explained

As we all know that Asterisk acts as a SIP server and it supports SUBSCRIBE/NOTIFY mechanism for the event notification. Asterisk is aware of the state of various things attached to it like phones, voicemail boxes, queues and more.
SIP protocol allows us to use the general framework for event notification without defining the actual events or device names. Asterisk uses 'hint' to map an extension number or name to a device.

[subscribers]
exten => 57644,hint,SIP/57644

In this example, SIP device SIP/57644 is mapped to 57644 using hint.

[subscribers]
exten => john,hint,SIP/57644

SIP/57644 can also be mapped to name 'john' using hint. It's all up to you, how you want to name it.


Asterisk receives a SIP SUBSCRIBE request, it checks for a 'hint' in a dialplan that matches the name of the device to be monitored. 'hint' tells Asterisk which device this corresponds to.

The connection between an extension and a device in Asterisk is called a hint.

Hint can also map special internal states (virtual devices) like Agent, SLA, park, Meetme and more.

It is very important to specify the location/context of the hints. It is recommended to use subscribecontext parameter in your sip.conf to identify the location of all hints within extensions.conf.

Asterisk CLI command #core show hints can be issued to list all defined hints.
#sip show subscriptions command can be used to list the current status of each subscriptions

1 comment:

  1. Of course, no one should have any doubts now a days that voip is ideal for long run. As I see, it is the telephone system of future. It is astounding that holding a nice mid range smart cell phone with internet access, a person can utilize the mobile operator services as well voip services being anywhere in the world. The cost of a voip service provider like Axvoice, Vonage and many others is much less as compared to the tariff of any mobile operator with a bunch of other facilities like voice mail, call forwarding etc. Hence there is also no question of roaming in voip world.

    ReplyDelete