Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] SIP Presence across two servers


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
lincoln at controlwork...
Guest





PostPosted: Wed Nov 13, 2013 3:36 pm    Post subject: [asterisk-users] SIP Presence across two servers Reply with quote

Hi All,

We’ve been running Asterisk for years in our offices but just recently replaced an Asterisk Appliance* in our smaller office with an actual server, upgraded the server in hardware in our HQ location and upgrading both ends to 11.5.0 with Gareth’s patch for Cisco phones.
99.99% of our endpoints are Cisco 7961Gs.

Each office is more-or-less standalone for ease of management and fault tolerance but we have a unified dialplan and SIP “trunking” from site to site via our VPN.

Everything presence related works wonderfully for local users, but I’m hoping there’s a way we could get presence for the people “at the other end of the pipe” fairly transparently.
We have a lot of cross-office collaboration, and our office manager/receptionist (who has the battleship of a 7961G+7914+7914 BLF) would love to “at a glance” know if the remote folks are available for a call or not.

I’m sure this has been covered, but my Googlefu us turning up a ton of redundant, old, and deprecated information so I’ve resorted to asking here.
From what I have found it sounds like it may be “easier” with IAX2 but my experiments with IAX2 haven’t yielded wonderful results and management prefers “SIP everywhere”

If anyone has any pointers I’d greatly appreciate it – thanks in advance!

Lincoln

*- One of the worst IT decisions I’ve made for better or worse. Looked good on paper; in practice not a good idea for anything beyond a very simple SOHO.
--
Lincoln King-Cliby, CTS, DMC-D, CCMP-S
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I: http://www.controlworks.com
Crestron Services Provider
Back to top
ldardini at gmail.com
Guest





PostPosted: Thu Nov 14, 2013 3:55 am    Post subject: [asterisk-users] SIP Presence across two servers Reply with quote

Aligning presence over multiple servers is not simple and require some changes on the dialplan and some custom code to transmit the state from one server to the other.

The BLF on the phone is displayed using the "hint" of an extension. To be able to manually manage the "hint" of an extension, you need to first link the internal hint to the Custom hint. In the extensions.conf just add:


exten => _.,hint,Custom:${EXTEN}



I was unable to create the same entry in the AEL language or in the realtime extensions table... if any was able, I will appreciate.


If a phone want to know the status for the 100-TEST sip account, it will poll the hint for 100-TEST and in the end, it will check the status for Custom:100-TEST.


Now you need an application to capture the change in status of every extension on server A and send it to server B, so the Custom:100-TEST will have the same value on both servers.


I solved this problem creating a small pair of php application, using Asterisk Manager Interface to continuously listen to events. If I see a phone dialing out, I change its Custom state to IN_USE... if he hangups, I change the state back to AVAILABLE ... if it is ringing, I change the state in RINGING and so on. You need to take into account multiple calls can be made by the same phone and so it is not really so straightforward. When the php AMI application identify a change in the state for a phone, it notifies the same application running on the other server about the change, so both asterisk are taken aligned.


Let me know if you need additional details.


Leandro





2013/11/13 Lincoln King-Cliby <lincoln@controlworks.com (lincoln@controlworks.com)>
Quote:

Hi All,
 
We’ve been running Asterisk for years in our offices but just recently replaced an Asterisk Appliance* in our smaller office with an actual server, upgraded the server in hardware in our HQ location and upgrading both ends to 11.5.0 with Gareth’s patch for Cisco phones.
99.99% of our endpoints are Cisco 7961Gs.
 
Each office is more-or-less standalone for ease of management and fault tolerance but we have a unified dialplan and SIP “trunking” from site to site via our VPN.
 
Everything presence related works wonderfully for local users, but I’m hoping there’s a way we could get presence for the people “at the other end of the pipe” fairly transparently.
We have a lot of cross-office collaboration, and our office manager/receptionist (who has the battleship of a 7961G+7914+7914 BLF) would love to “at a glance” know if the remote folks are available for a call or not.
 
I’m sure this has been covered, but my Googlefu us turning up a ton of redundant, old, and deprecated information so I’ve resorted to asking here.
From what I have found it sounds like it may be “easier” with IAX2 but my experiments with IAX2 haven’t yielded wonderful results and management prefers “SIP everywhere”
 
If anyone has any pointers I’d greatly appreciate it – thanks in advance!
 
Lincoln
 
*- One of the worst IT decisions I’ve made for better or worse. Looked good on paper; in practice not a good idea for anything beyond a very simple SOHO.
--
Lincoln King-Cliby, CTS, DMC-D, CCMP-S
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: [url=tel:440.449.1100%20x1107]440.449.1100 x1107[/url] F: [url=tel:440-449-1106]440-449-1106[/url] I: http://www.controlworks.com
Crestron Services Provider
 


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
rswagoner at gmail.com
Guest





PostPosted: Thu Nov 14, 2013 7:58 am    Post subject: [asterisk-users] SIP Presence across two servers Reply with quote

I haven't tried it, but the res_corosync module states it will sync device state across servers.

https://wiki.asterisk.org/wiki/display/AST/Corosync



On Thu, Nov 14, 2013 at 3:54 AM, Leandro Dardini <ldardini@gmail.com (ldardini@gmail.com)> wrote:
Quote:
Aligning presence over multiple servers is not simple and require some changes on the dialplan and some custom code to transmit the state from one server to the other.

The BLF on the phone is displayed using the "hint" of an extension. To be able to manually manage the "hint" of an extension, you need to first link the internal hint to the Custom hint. In the extensions.conf just add:


exten => _.,hint,Custom:${EXTEN}



I was unable to create the same entry in the AEL language or in the realtime extensions table... if any was able, I will appreciate.


If a phone want to know the status for the 100-TEST sip account, it will poll the hint for 100-TEST and in the end, it will check the status for Custom:100-TEST.


Now you need an application to capture the change in status of every extension on server A and send it to server B, so the Custom:100-TEST will have the same value on both servers.


I solved this problem creating a small pair of php application, using Asterisk Manager Interface to continuously listen to events. If I see a phone dialing out, I change its Custom state to IN_USE... if he hangups, I change the state back to AVAILABLE ... if it is ringing, I change the state in RINGING and so on. You need to take into account multiple calls can be made by the same phone and so it is not really so straightforward. When the php AMI application identify a change in the state for a phone, it notifies the same application running on the other server about the change, so both asterisk are taken aligned.


Let me know if you need additional details.


Leandro





2013/11/13 Lincoln King-Cliby <lincoln@controlworks.com (lincoln@controlworks.com)>
Quote:

Hi All,
 
We’ve been running Asterisk for years in our offices but just recently replaced an Asterisk Appliance* in our smaller office with an actual server, upgraded the server in hardware in our HQ location and upgrading both ends to 11.5.0 with Gareth’s patch for Cisco phones.
99.99% of our endpoints are Cisco 7961Gs.
 
Each office is more-or-less standalone for ease of management and fault tolerance but we have a unified dialplan and SIP “trunking” from site to site via our VPN.
 
Everything presence related works wonderfully for local users, but I’m hoping there’s a way we could get presence for the people “at the other end of the pipe” fairly transparently.
We have a lot of cross-office collaboration, and our office manager/receptionist (who has the battleship of a 7961G+7914+7914 BLF) would love to “at a glance” know if the remote folks are available for a call or not.
 
I’m sure this has been covered, but my Googlefu us turning up a ton of redundant, old, and deprecated information so I’ve resorted to asking here.
From what I have found it sounds like it may be “easier” with IAX2 but my experiments with IAX2 haven’t yielded wonderful results and management prefers “SIP everywhere”
 
If anyone has any pointers I’d greatly appreciate it – thanks in advance!
 
Lincoln
 
*- One of the worst IT decisions I’ve made for better or worse. Looked good on paper; in practice not a good idea for anything beyond a very simple SOHO.
--
Lincoln King-Cliby, CTS, DMC-D, CCMP-S
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: [url=tel:440.449.1100%20x1107]440.449.1100 x1107[/url] F: [url=tel:440-449-1106]440-449-1106[/url] I: http://www.controlworks.com
Crestron Services Provider
 




--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
ldardini at gmail.com
Guest





PostPosted: Thu Nov 14, 2013 11:28 am    Post subject: [asterisk-users] SIP Presence across two servers Reply with quote

It seems very good! I am going to test it when I have a bit of time!

Leandro



2013/11/14 Ryan Wagoner <rswagoner@gmail.com (rswagoner@gmail.com)>
Quote:
I haven't tried it, but the res_corosync module states it will sync device state across servers.

https://wiki.asterisk.org/wiki/display/AST/Corosync



On Thu, Nov 14, 2013 at 3:54 AM, Leandro Dardini <ldardini@gmail.com (ldardini@gmail.com)> wrote:
Quote:
Aligning presence over multiple servers is not simple and require some changes on the dialplan and some custom code to transmit the state from one server to the other.

The BLF on the phone is displayed using the "hint" of an extension. To be able to manually manage the "hint" of an extension, you need to first link the internal hint to the Custom hint. In the extensions.conf just add:


exten => _.,hint,Custom:${EXTEN}



I was unable to create the same entry in the AEL language or in the realtime extensions table... if any was able, I will appreciate.


If a phone want to know the status for the 100-TEST sip account, it will poll the hint for 100-TEST and in the end, it will check the status for Custom:100-TEST.


Now you need an application to capture the change in status of every extension on server A and send it to server B, so the Custom:100-TEST will have the same value on both servers.


I solved this problem creating a small pair of php application, using Asterisk Manager Interface to continuously listen to events. If I see a phone dialing out, I change its Custom state to IN_USE... if he hangups, I change the state back to AVAILABLE ... if it is ringing, I change the state in RINGING and so on. You need to take into account multiple calls can be made by the same phone and so it is not really so straightforward. When the php AMI application identify a change in the state for a phone, it notifies the same application running on the other server about the change, so both asterisk are taken aligned.


Let me know if you need additional details.


Leandro





2013/11/13 Lincoln King-Cliby <lincoln@controlworks.com (lincoln@controlworks.com)>
Quote:

Hi All,
 
We’ve been running Asterisk for years in our offices but just recently replaced an Asterisk Appliance* in our smaller office with an actual server, upgraded the server in hardware in our HQ location and upgrading both ends to 11.5.0 with Gareth’s patch for Cisco phones.
99.99% of our endpoints are Cisco 7961Gs.
 
Each office is more-or-less standalone for ease of management and fault tolerance but we have a unified dialplan and SIP “trunking” from site to site via our VPN.
 
Everything presence related works wonderfully for local users, but I’m hoping there’s a way we could get presence for the people “at the other end of the pipe” fairly transparently.
We have a lot of cross-office collaboration, and our office manager/receptionist (who has the battleship of a 7961G+7914+7914 BLF) would love to “at a glance” know if the remote folks are available for a call or not.
 
I’m sure this has been covered, but my Googlefu us turning up a ton of redundant, old, and deprecated information so I’ve resorted to asking here.
From what I have found it sounds like it may be “easier” with IAX2 but my experiments with IAX2 haven’t yielded wonderful results and management prefers “SIP everywhere”
 
If anyone has any pointers I’d greatly appreciate it – thanks in advance!
 
Lincoln
 
*- One of the worst IT decisions I’ve made for better or worse. Looked good on paper; in practice not a good idea for anything beyond a very simple SOHO.
--
Lincoln King-Cliby, CTS, DMC-D, CCMP-S
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: [url=tel:440.449.1100%20x1107]440.449.1100 x1107[/url] F: [url=tel:440-449-1106]440-449-1106[/url] I: http://www.controlworks.com
Crestron Services Provider
 




--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users






--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services