- VoIP-Forum - https://www.voip-forum.com -

Discover Asterisk 1.4 :: SIP subscriptions (blinking lamps)

Posted By oej On January 15, 2008 @ 16:38 In Asterisk 1.4 Hints,Asterisk news | Comments Disabled

Asterisk 1.4 delivers many new features. In regards to call state subscriptions, there are many news for you. Call state subscriptions are what makes the lamps blink on your phone when your collegue’s phone rings. In 1.4, you can make it blink based on activity in parking lots and meetme conferences as well. Read on!Here’s an overview of the news:

  • Deny subscriptions: If you don’t want you Asterisk server to accept any registrations, you can simply add “allowsubscribe=no” to your sip.conf and stop reading here.This can be done on a per-account basis, as well as in the [general] configuration section.
  • Display hold states: Asterisk can now display hold state in both XML-RPID (SIMPLE) mode and dialog-info subscriptions. On most phones, this will be shown as a slowly blinking lamp. To enable this, add “notifyhold=yes” to the sip.conf [general] section.
  • Show inbound and outbound calls: In 1.2, the subscription only applied to the peer part of a type=friend object. This meant that incoming calls from a phone did not turn on the lamp, indicating busy. In Asterisk 1.4, you can add “limitonpeer=yes” so that the call limit and counters always will apply on the peer part of a friend. Suddenly, you have blinking lamps for both inbound and outbound calls.
  • Subscribe to parking lots: With the “metermaid” subsystem, you can add a subscription to the state of a parking lot. You specify a hint like “exten => 6600,hint,park:701@parkedcalls” in your diaplan and then subscribe to the extension, in this case 6600. If you want to watch if there’s an active conference, you add “meetme:1234″ to the hint if you want to check conference number 1234.

As in Asterisk 1.2, in order to get full notification, you need to add “notifyringing=yes” and set a call limit for each device. You don’t need to set it at a level where it actually enforces a limit, but setting it enables a call counter that is the basis for notifications.

Example configuration:

[general
limitonpeer=yes
notifyringing=yes
notifyhold=yes
allowsubscribe=no
[bobphone
type=friend
call-limit=99
allowsubscribe=yes

Then in the dialplan, you add a hint on Bob’s extension, pointing to Bob’s phone.

exten = 3300,hint,SIP/bobphone 

Although you subscribe in SIP, you can add a hint to almost any channel’s device or line object. The difference is in the level of details reported.

CLI commands

To check the hints, and their last known state, use the CLI command “core show hints“. In order to check all the active SIP subscriptions, use the CLI command “sip show subscriptions“.

Subscription security

Like in Asterisk 1.2, you control the available extensions for each phone with the “subscribecontext” configuration option in sip.conf. Set this to the context where you have extensions with hints for the phones that you want to make available for subscriptions. If you sell virtual PBX services, you don’t want anyone with an account on your server to subscribe to any extension.Asterisk now supports three different subscription formats for call status notifications, which covers a lot of SIP business-class phones.

Enjoy the blinking lamps on your Asterisk-connected phones!


Article printed from VoIP-Forum: https://www.voip-forum.com

URL to article: https://www.voip-forum.com/asterisk/2008-01/sip-subscriptions/

Copyright © 2008-2011 Edvina AB, Sollentuna Sweden. All rights reserved.