Re: [asterisk-users] Realtime vs Static Files
It is really unbelievable ... I was thinking: Asterisk uses an internal database to maintain states of peers. It is usually located in /var/lib/asterisk/astdb and it is a berkely db, but other database backends seem available. Are you sharing also this database between the two servers? It is the only option left... The only thing shared is the sip realtime db. I think i'm going to try removing the sip realtime db and automate the creation of the sip.conf file and issuing of the 'sip reload' and see if the problem goes away. -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
It is a shame we were unable to find the solution to your problem. Do you want to setup a test system like the good one and let me access it to check what is going on? I am really really curious. Leandro Il giorno 26/gen/2013 19:49, Dan Journo d...@keshercommunications.com ha scritto: It is really unbelievable ... I was thinking: Asterisk uses an internal database to maintain states of peers. It is usually located in /var/lib/asterisk/astdb and it is a berkely db, but other database backends seem available. Are you sharing also this database between the two servers? It is the only option left... ** ** The only thing shared is the sip realtime db. ** ** I think i'm going to try removing the sip realtime db and automate the creation of the sip.conf file and issuing of the 'sip reload' and see if the problem goes away. ** ** ** ** -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
Upgrading to the latest version didn't help. After about 30 minutes, Asterisk2 tries to send out OPTIONS keepalive packets to peers listed as Registered on Asterisk1. It is something really amazing... Can you run sip show peers on each one of the servers and post the response? You said the second asterisk is completely opaque to your peers. Can you run a tcpdump on secondary server to see if for some obscure reason the phones try to contact the secondary asterisk? I'll monitor one peer using tcpdump over a few hours and then review the packets. However, SIP DEBUG isn't showing any REGISTER packets. Here's the sip peers output. Values and names have been hidden. Some appear as Unreachable the secondary server and some appear as OK. I think some are listed as OK because the endpoint routers are performing some type of SIP ALG and routing packets based on port number and not source ip address. However, from the SIP DEBUG output, it seems clear that the secondary server in this example is sending out Keepalives based on the information that the primary server has entered into the realtime DB. Show peers Output from a primary server Name/username HostDyn Forcerport ACL Port Status Realtime a201/A201 217.x.x.48D N 65229OK (88 ms) Cached RT a202 (Unspecified)D N 0UNREACHABLE Cached RT b201/44845287 78.x.x.101 D N 5060 OK (26 ms) Cached RT c201/s 193.x.x.174 D N 5060 OK (52 ms) Cached RT d201/d201 94.x.x.228 D N 5060 OK (33 ms) Cached RT e201/e20194.x.x.44 D N 55018 OK (40 ms) Cached RT e202/e20294.x.x.44 D N 55022 OK (46 ms) Cached RT e203/e20394.x.x.44 D N 55024 OK (40 ms) Cached RT e204/e20494.x.x.44 D N 55008 OK (40 ms) Cached RT e205/e20594.x.x.44 D N 55016 OK (41 ms) Cached RT e206/e20694.x.x.44 D N 55014 OK (40 ms) Cached RT e207/e20794.x.x.44 D N 55020 OK (41 ms) Cached RT e208/e20894.x.x.44 D N 5060 OK (41 ms) Cached RT e209/e20994.x.x.44 D N 55012 OK (40 ms) Cached RT e210/e21094.x.x.44 D N 55010 OK (41 ms) Cached RT e211/e21194.x.x.44 D N 55026 OK (38 ms) Cached RT e212/e21281.x.x.93D N 5060 OK (46 ms) Cached RT f201 (Unspecified)D N 0 UNREACHABLE Cached RT g201/g 78.x.x.207 D N 5060 OK (29 ms) Cached RT h201/h201 217.x.x.78 D N 38980OK (22 ms) Cached RT i201 (Unspecified)D N 0 UNREACHABLE Cached RT i203/ i203 109.x.x.103 D N 5060 OK (32 ms) Cached RT i204/ i204 109.x.x.103 D N 1025 OK (31 ms) Cached RT i205/ i205 81.x.x.144 D N 5060 OK (32 ms) Cached RT i206/ i206 109.x.x.103 D N 1035 OK (31 ms) Cached RT i207/ i207 109.x.x.103 D N 1032 OK (32 ms) Cached RT i208/ i208 109.x.x.103 D N 1024 OK (31 ms) Cached RT j201/s 94.x.x.62D N 57813 OK (35 ms) Cached RT o201/o201 92.x.x.86 D N 51824 OK (47 ms) Cached RT o202/o202 92.x.x.86 D N 58641 OK (48 ms) Cached RT o203/o203 92.x.x.86 D N 49172 OK (47 ms) Cached RT j204/j204 176.x.x.214 D N 34824 OK (49 ms) Cached RT k201/k201 2.x.x.169 D N 52757OK (53 ms) Cached RT k202/k202 (Unspecified)D N 0 UNKNOWNCached RT l201/l201(Unspecified)D N 0 UNKNOWNCached RT m201/s 92.x.x.95 D N 54020 OK (32 ms) Cached RT n201 (Unspecified)
Re: [asterisk-users] Realtime vs Static Files
2013/1/25 Dan Journo d...@keshercommunications.com Upgrading to the latest version didn't help. After about 30 minutes, Asterisk2 tries to send out OPTIONS keepalive packets to peers listed as Registered on Asterisk1. It is something really amazing... Can you run sip show peers on each one of the servers and post the response? ** ** You said the second asterisk is completely opaque to your peers. Can you run a tcpdump on secondary server to see if for some obscure reason the phones try to contact the secondary asterisk? ** ** I'll monitor one peer using tcpdump over a few hours and then review the packets. However, SIP DEBUG isn't showing any REGISTER packets. ** ** Here's the sip peers output. Values and names have been hidden. Some appear as Unreachable the secondary server and some appear as OK. I think some are listed as OK because the endpoint routers are performing some type of SIP ALG and routing packets based on port number and not source ip address. However, from the SIP DEBUG output, it seems clear that the secondary server in this example is sending out Keepalives based on the information that the primary server has entered into the realtime DB. ** ** *Show peers Output from a primary server* Name/username HostDyn Forcerport ACL Port Status Realtime a201/A201 217.x.x.48D N 65229OK (88 ms) Cached RT a202 (Unspecified)D N 0UNREACHABLE Cached RT b201/44845287 78.x.x.101 D N 5060 OK (26 ms) Cached RT c201/s 193.x.x.174 D N 5060 OK (52 ms) Cached RT d201/d201 94.x.x.228 D N 5060 OK (33 ms) Cached RT e201/e20194.x.x.44 D N 55018OK (40 ms) Cached RT e202/e20294.x.x.44 D N 55022OK (46 ms) Cached RT e203/e20394.x.x.44 D N 55024OK (40 ms) Cached RT e204/e20494.x.x.44 D N 55008OK (40 ms) Cached RT e205/e20594.x.x.44 D N 55016OK (41 ms) Cached RT e206/e20694.x.x.44 D N 55014OK (40 ms) Cached RT e207/e20794.x.x.44 D N 55020OK (41 ms) Cached RT e208/e20894.x.x.44 D N 5060 OK (41 ms) Cached RT e209/e20994.x.x.44 D N 55012OK (40 ms) Cached RT e210/e21094.x.x.44 D N 55010OK (41 ms) Cached RT e211/e21194.x.x.44 D N 55026OK (38 ms) Cached RT e212/e21281.x.x.93D N 5060 OK (46 ms) Cached RT f201 (Unspecified)D N 0UNREACHABLE Cached RT g201/g 78.x.x.207 D N 5060 OK (29 ms) Cached RT h201/h201 217.x.x.78 D N 38980 OK (22 ms) Cached RT i201 (Unspecified)D N 0UNREACHABLE Cached RT i203/ i203 109.x.x.103 D N 5060 OK (32 ms) Cached RT i204/ i204 109.x.x.103 D N 1025 OK (31 ms) Cached RT i205/ i205 81.x.x.144 D N 5060 OK (32 ms) Cached RT i206/ i206 109.x.x.103 D N 1035 OK (31 ms) Cached RT i207/ i207 109.x.x.103 D N 1032 OK (32 ms) Cached RT i208/ i208 109.x.x.103 D N 1024 OK (31 ms) Cached RT j201/s 94.x.x.62D N 57813OK (35 ms) Cached RT o201/o201 92.x.x.86 D N 51824OK (47 ms) Cached RT o202/o202 92.x.x.86 D N 58641OK (48 ms) Cached RT o203/o203 92.x.x.86 D N 49172OK (47 ms) Cached RT j204/j204 176.x.x.214 D N 34824OK (49 ms) Cached RT k201/k201 2.x.x.169 D N 52757OK (53 ms) Cached RT k202/k202 (Unspecified)D N 0UNKNOWNCached RT l201/l201(Unspecified)D N 0UNKNOWNCached RT m201/s 92.x.x.95 D N 54020OK (32 ms) Cached RT n201 (Unspecified)
Re: [asterisk-users] Realtime vs Static Files
I am curious, is your version of asterisk correctly compiling the regserver field? Each server needs to have a distinct server name. Upgrading to the latest version didn't help. After about 30 minutes, Asterisk2 tries to send out OPTIONS keepalive packets to peers listed as Registered on Asterisk1. -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
2013/1/24 Dan Journo d...@keshercommunications.com I am curious, is your version of asterisk correctly compiling the regserver field? Each server needs to have a distinct server name. ** ** Upgrading to the latest version didn't help. After about 30 minutes, Asterisk2 tries to send out OPTIONS keepalive packets to peers listed as Registered on Asterisk1. It is something really amazing... Can you run sip show peers on each one of the servers and post the response? You said the second asterisk is completely opaque to your peers. Can you run a tcpdump on secondary server to see if for some obscure reason the phones try to contact the secondary asterisk? Leandro -- _ -- 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
[asterisk-users] Realtime vs Static Files
Hi, We're trying to decide whether to switch back to a static file for sip.conf. Currently we use mysql realtime but can't see any real benefit. Why would someone choose realtime sip over static files? Thanks Dan Journo Kesher Communications (UK) Business Phone Systemshttp://www.keshercommunications.com/ | Hosted PBXhttp://www.keshercommunications.com/hostedpbx.html T: 0161 820 8353 -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
2013/1/23 Dan Journo d...@keshercommunications.com Hi, ** ** We're trying to decide whether to switch back to a static file for sip.conf. Currently we use mysql realtime but can't see any real benefit.* *** ** ** Why would someone choose realtime sip over static files? ** ** Thanks ** ** Dan Journo Kesher Communications (UK) Business Phone Systems http://www.keshercommunications.com/ | Hosted PBXhttp://www.keshercommunications.com/hostedpbx.html T: 0161 820 8353 All depends by the number of sip peers and the number of addition/deletion you make. If you have static files, you have to sip reload every time you add/remove a peer. With realtime is all realtime. I have switched to realtime peers some times ago with great benefit. Leandro -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
All depends by the number of sip peers and the number of addition/deletion you make. If you have static files, you have to sip reload every time you add/remove a peer. With realtime is all realtime. I have switched to realtime peers some times ago with great benefit. However, there are limitations with realtime. For example, I've noticed that if two asterisk servers share the database, often they both think that the peer is registered. Also the issues with MWI and Qualify= If I automatically generate sip.conf and automatically issue sip reload when needed, I can get the same functionality as realtime without the issues described above. Have I missed something? Thanks Dan -- Dan Journo Kesher Communications (UK) Business Phone Systemshttp://www.keshercommunications.com/ | Hosted PBXhttp://www.keshercommunications.com/hostedpbx.html T: 0161 820 8353 -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
On Wed, 2013-01-23 at 05:53 -0500, Dan Journo wrote: For example, I've noticed that if two asterisk servers share the database, often they both think that the peer is registered. Also the issues with MWI and Qualify= We have never experienced that and use realtime with multiple asterisk servers. The reason we find realtime useful is that you can build your own interface to interact with the database and pass down peer/dialplan management to the end user if you are managing a hosted environment. -- Ishfaq Malik i...@pack-net.co.uk Department: VOIP Support Company: Packnet Limited t: +44 (0)845 004 4994 f: +44 (0)161 660 9825 e: i...@pack-net.co.uk w: http://www.pack-net.co.uk Registered Address: PACKNET LIMITED, 2A ENTERPRISE HOUSE, LLOYD STREET NORTH, MANCHESTER SCIENCE PARK, MANCHESTER, M156SE COMPANY REG NO. 04920552 -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
We have never experienced that and use realtime with multiple asterisk servers. We've only recently started seeing the problem. To simplify the issue, assuming we have two servers, Asterisk1 and Asterisk2... Asterisk1 is a primary server and Asterisk2 is a backup and used as a failover. Asterisk is running on Asterisk2 to speed up the switch. Both share the realtime database. For some reason, about 5% of sip peers are listed as Registered on Asterisk2 even though there is no way they could discover the IP of Asterisk2 on their own. They also happen to be registered on Asterisk1 where they are supposed to be. SIP Debug has shown that they aren't actually registering with Asterisk2 at all. They are only sending OPTIONS keepalive messages to Asterisk2 since QUALITY=yes something. They never actually send a REGISTER to Asterisk2 so that server must be picking up the Peer status from the realtime DB. -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
2013/1/23 Dan Journo d...@keshercommunications.com We have never experienced that and use realtime with multiple asterisk servers. We've only recently started seeing the problem. To simplify the issue, assuming we have two servers, Asterisk1 and Asterisk2... Asterisk1 is a primary server and Asterisk2 is a backup and used as a failover. Asterisk is running on Asterisk2 to speed up the switch. Both share the realtime database. For some reason, about 5% of sip peers are listed as Registered on Asterisk2 even though there is no way they could discover the IP of Asterisk2 on their own. They also happen to be registered on Asterisk1 where they are supposed to be. SIP Debug has shown that they aren't actually registering with Asterisk2 at all. They are only sending OPTIONS keepalive messages to Asterisk2 since QUALITY=yes something. They never actually send a REGISTER to Asterisk2 so that server must be picking up the Peer status from the realtime DB. I have multiple asterisk servers with a pure 100% realtime configuration. They are all working together and sharing the same realtime database (not only sipfriends, but queue, voicemail, meetme, musiconhold and others) without any of the problems you have reported. Maybe you are lacking some of the configuration. These is the relevant part. rtcachefriends=yes rtsavesysname=yes rtupdate=yes rtautoclear=yes -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
Maybe you are lacking some of the configuration. These is the relevant part. rtcachefriends=yes rtsavesysname=yes rtupdate=yes rtautoclear=yes We have rtcachefriends=yes rtsavesysname=yes and these we don't have but they are set to YES by default rtupdate=yes rtautoclear=yes Its probably an issue with the version of Asterisk we are using because I haven't had this problem in the past. -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
2013/1/23 Dan Journo d...@keshercommunications.com Maybe you are lacking some of the configuration. These is the relevant part. ** ** rtcachefriends=yes rtsavesysname=yes rtupdate=yes rtautoclear=yes ** ** We have rtcachefriends=yes rtsavesysname=yes ** ** and these we don't have but they are set to YES by default rtupdate=yes rtautoclear=yes ** ** Its probably an issue with the version of Asterisk we are using because I haven't had this problem in the past. I am running the latest 1.8 version. Which version are you running? Leandro -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
On 13-01-23 04:41 AM, Dan Journo wrote: Hi, We're trying to decide whether to switch back to a static file for sip.conf. Currently we use mysql realtime but can't see any real benefit. Why would someone choose realtime sip over static files? Thanks I'm interested in the feedback too. For years I've used static files for my needs, and worked around some of the 'realtime' limitation with them with other tools. For what we are doing, it works great. Recently though, I've been more and more considering using res_config_curl, which uses the realtime interface, and replace some of the existing toolsets. Sadly, documentation is weak, and I don't suspect it gets much love in production. -- Paul Belanger | PolyBeacon, Inc. Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode) Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
Its probably an issue with the version of Asterisk we are using because I haven't had this problem in the past. I am running the latest 1.8 version. Which version are you running? 1.8.15.0. I'll upgrade it to 1.8.20.1 when I can and see if it makes a difference. -- _ -- 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
Re: [asterisk-users] Realtime vs Static Files
2013/1/24 Dan Journo d...@keshercommunications.com Its probably an issue with the version of Asterisk we are using because I haven't had this problem in the past. I am running the latest 1.8 version. Which version are you running? ** ** ** ** 1.8.15.0. I'll upgrade it to 1.8.20.1 when I can and see if it makes a difference. -- I am curious, is your version of asterisk correctly compiling the regserver field? Each server needs to have a distinct server name. Leandro -- _ -- 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