RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-14 Thread Wai Wu
Title: [Asterisk-Users] Clustering "NEW THREAD", Almost Working



Now, Iknow what 
you guys been talking about. It is likeDSN forsip phones, not really 
clustering. I original thought that you guys want to setup some thing that can 
fail over to a different sip server if the server running the IVR 
dies.


From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas 
GarstangSent: Tuesday, March 14, 2006 12:11 AMTo: Asterisk 
Users Mailing List - Non-Commercial DiscussionSubject: RE: 
[Asterisk-Users] Clustering "NEW THREAD", Almost 
Working

Holy crap. You got SIP realtime working? I've tried it twice before and it 
failed the same way twice. Do you have multiple Asterisk boxes accessing the 
same sip info (ie phones) in the same table on the same database? Digium has 
said numerous times this known not to work, although I cant' work out why as 
it's just reading from a common table.

  -Original Message- From: JR Richardson 
  [mailto:[EMAIL PROTECTED] Sent: Mon 3/13/2006 7:11 PM 
  To: asterisk-users@lists.digium.com Cc: 
  Subject: [Asterisk-Users] Clustering "NEW THREAD", Almost 
  Working
  All,I made some progress, but it seems the further I 
  go with clustering theharder things get. Hmmm, I guess if it were 
  easy, it would bedocumented..Anyhow, I have 1 * server as the 
  DUNDi peering master with a ttl=1. Theonly function of this server 
  is to lookup where other sip peers areregistered and forward that info on 
  to the requesting * server.I have 4 * servers accepting registrations 
  from sip users (phones). All thesip phone info is stored in a MySQL 
  database and being accessed through therealtime engine, and it works 
  great. A phone registers to a server and theserver checks the 
  database and if an entry is present, the * servers allowsthe phone to 
  register and dumps the sip phone into sip show peers, worksgreat. I 
  can take the sip entry out of the database and the phone will notresister 
  in realtime. Works great.Now the dial plan setup. All the 
  extension info is also in the MySQLdatabase, I have a switch statement in 
  the [siptest] context pointing to thedatabase for extension logic. 
  This also works great. All servers arepointing to the same data 
  source with all sip extensions in the databasestarting withexten = 
  1234,2,Answer and so onexten = 1235,2,Answer and so onnotice 
  the priority 2 starting point in the database, very important.This is 
  the good part, in sip.conf, I have regcontext=siptest in the 
  generalsection (because it doesn't work in the users section), so when a 
  sip phoneregisters on a server, * dynamically inputs an exten = 
  1234,1,Noop into thedialplan and immediately the phone is able to be 
  called. This is workingpretty damn well also.So at this 
  point I have several phones registered across 4 * servers, allpulling 
  their info from MySQL, the same data source. Now let's say phone1234 
  and 1235 are registered to server 1 and phone 1236 and 1237 areregistered 
  to server 2, 1234 can call 1235 and vise versa, 1236 can call1237 and vise 
  versa.Now from phone 1234 on server 1, I call 1236 on server 2 and 
  because 1236does not have a priority 1 entry on server 1, the call 
  progresses to a DUNDilookup statement in the diaplan logic and request 
  exten 1236 location fromthe DUNDi peering master server (these 
  registration servers all are peeredwith the dundi peering master server 
  with a ttl=2, so the request will getpast the peering master server and on 
  to the other registration servers).The request is answered from server 2 
  and 1234 can now complete a call to1236. This is great, all is well, life 
  is good, had a big Dallas barbequelunch to celebrate because all my sip 
  phones are dynamically registering toany one of 4 sip registration 
  servers, and the other three servers know whois registered where through 
  DUNDi lookups. And it only took me 2 weeks toget this 
  far.Now then, let's break it and see what happens, dial any sip phone 
  that isnot actively registered and you get an endless DUNDi lookup request 
  from allservers except the one you are dialing from. I only had one 
  other server onat this time and within seconds produced 590+ IAX trunks 
  initiated back intoa registration server before I could hang up the 
  line.As far as I can tell, if you make a call from server 1, exten 
  1234 to exten1236, but 1236 is not actively registered on any other 
  server, the otherserver will get the DUNDi lookup request and not know 
  where the phone is soit keeps looking up and calling itself to find an 
  extension that is notthere, or something, anyhow it's a bad 
  thing.Now intrinsically knowing that this protocol is smarter than me, 
  I'mguessing that I have incorrect dialplan logic that is allowing this 
  tohappen. I'm wondering how I can set up a dialplan flow that will 
  do this:From Server 1, pick up phone and dial a number 
  (ph

RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-14 Thread JR Richardson
Yes, SIP realtime is working with multiple * servers all accessing the same 
MySQL database, add a sip phone in the database and the phone can register with 
any server without the need to configure any server, just add the phone in the 
database, petty cool. 

JR

--

Message: 21
Date: Tue, 14 Mar 2006 10:18:06 -0500
From: Wai Wu [EMAIL PROTECTED]
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Now, I know what you guys been talking about. It is like DSN for sip
phones, not really clustering. I original thought that you guys want to
setup some thing that can fail over to a different sip server if the
server running the IVR dies.
 
 
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Garstang
Sent: Tuesday, March 14, 2006 12:11 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working


Holy crap. You got SIP realtime working? I've tried it twice before and
it failed the same way twice. Do you have multiple Asterisk boxes
accessing the same sip info (ie phones) in the same table on the same
database? Digium has said numerous times this known not to work,
although I cant' work out why as it's just reading from a common table.


JR Richardson
Engineering for the Masses

___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-14 Thread Benjamin Lawetz
Had this working also at some point, but had one killer problem... NAT
issues! Most of our clients are natted, and depending on the router, they
only allow traffic to return from the server that the traffic was sent to.
So the invites coming from other servers were being dropped.

But besides that worked like a charm.

Ben 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JR Richardson
Sent: March 14, 2006 12:57 PM
To: asterisk-users@lists.digium.com
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

Yes, SIP realtime is working with multiple * servers all accessing the same
MySQL database, add a sip phone in the database and the phone can register
with any server without the need to configure any server, just add the phone
in the database, petty cool. 

JR

--

Message: 21
Date: Tue, 14 Mar 2006 10:18:06 -0500
From: Wai Wu [EMAIL PROTECTED]
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Now, I know what you guys been talking about. It is like DSN for sip phones,
not really clustering. I original thought that you guys want to setup some
thing that can fail over to a different sip server if the server running the
IVR dies.
 
 
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Garstang
Sent: Tuesday, March 14, 2006 12:11 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working


Holy crap. You got SIP realtime working? I've tried it twice before and it
failed the same way twice. Do you have multiple Asterisk boxes accessing the
same sip info (ie phones) in the same table on the same database? Digium has
said numerous times this known not to work, although I cant' work out why as
it's just reading from a common table.


JR Richardson
Engineering for the Masses

___
--Bandwidth and Colocation provided by Easynews.com --

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



___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-14 Thread Wai Wu
That is a show stopper. However, if your clients are in groups behind
their respected router, you might be able to give them a little linux
app such that this app can PERSONIFY the phones to send a packet to the
respected server.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Benjamin
Lawetz
Sent: Tuesday, March 14, 2006 1:40 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

Had this working also at some point, but had one killer problem... NAT
issues! Most of our clients are natted, and depending on the router,
they only allow traffic to return from the server that the traffic was
sent to.
So the invites coming from other servers were being dropped.

But besides that worked like a charm.

Ben 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JR
Richardson
Sent: March 14, 2006 12:57 PM
To: asterisk-users@lists.digium.com
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

Yes, SIP realtime is working with multiple * servers all accessing the
same MySQL database, add a sip phone in the database and the phone can
register with any server without the need to configure any server, just
add the phone in the database, petty cool. 

JR

--

Message: 21
Date: Tue, 14 Mar 2006 10:18:06 -0500
From: Wai Wu [EMAIL PROTECTED]
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Now, I know what you guys been talking about. It is like DSN for sip
phones, not really clustering. I original thought that you guys want to
setup some thing that can fail over to a different sip server if the
server running the IVR dies.
 
 
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Garstang
Sent: Tuesday, March 14, 2006 12:11 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working


Holy crap. You got SIP realtime working? I've tried it twice before and
it failed the same way twice. Do you have multiple Asterisk boxes
accessing the same sip info (ie phones) in the same table on the same
database? Digium has said numerous times this known not to work,
although I cant' work out why as it's just reading from a common table.


JR Richardson
Engineering for the Masses

___
--Bandwidth and Colocation provided by Easynews.com --

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



___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-13 Thread JR Richardson
All,

I made some progress, but it seems the further I go with clustering the
harder things get.  Hmmm, I guess if it were easy, it would be
documented..
 
Anyhow, I have 1 * server as the DUNDi peering master with a ttl=1.  The
only function of this server is to lookup where other sip peers are
registered and forward that info on to the requesting * server.

I have 4 * servers accepting registrations from sip users (phones).  All the
sip phone info is stored in a MySQL database and being accessed through the
realtime engine, and it works great.  A phone registers to a server and the
server checks the database and if an entry is present, the * servers allows
the phone to register and dumps the sip phone into sip show peers, works
great.  I can take the sip entry out of the database and the phone will not
resister in realtime.  Works great.

Now the dial plan setup.  All the extension info is also in the MySQL
database, I have a switch statement in the [siptest] context pointing to the
database for extension logic.  This also works great.  All servers are
pointing to the same data source with all sip extensions in the database
starting with 
exten = 1234,2,Answer and so on
exten = 1235,2,Answer and so on

notice the priority 2 starting point in the database, very important.

This is the good part, in sip.conf, I have regcontext=siptest in the general
section (because it doesn't work in the users section), so when a sip phone
registers on a server, * dynamically inputs an exten = 1234,1,Noop into the
dialplan and immediately the phone is able to be called.  This is working
pretty damn well also.

So at this point I have several phones registered across 4 * servers, all
pulling their info from MySQL, the same data source.  Now let's say phone
1234 and 1235 are registered to server 1 and phone 1236 and 1237 are
registered to server 2, 1234 can call 1235 and vise versa, 1236 can call
1237 and vise versa.

Now from phone 1234 on server 1, I call 1236 on server 2 and because 1236
does not have a priority 1 entry on server 1, the call progresses to a DUNDi
lookup statement in the diaplan logic and request exten 1236 location from
the DUNDi peering master server (these registration servers all are peered
with the dundi peering master server with a ttl=2, so the request will get
past the peering master server and on to the other registration servers).
The request is answered from server 2 and 1234 can now complete a call to
1236. This is great, all is well, life is good, had a big Dallas barbeque
lunch to celebrate because all my sip phones are dynamically registering to
any one of 4 sip registration servers, and the other three servers know who
is registered where through DUNDi lookups.  And it only took me 2 weeks to
get this far.

Now then, let's break it and see what happens, dial any sip phone that is
not actively registered and you get an endless DUNDi lookup request from all
servers except the one you are dialing from.  I only had one other server on
at this time and within seconds produced 590+ IAX trunks initiated back into
a registration server before I could hang up the line.

As far as I can tell, if you make a call from server 1, exten 1234 to exten
1236, but 1236 is not actively registered on any other server, the other
server will get the DUNDi lookup request and not know where the phone is so
it keeps looking up and calling itself to find an extension that is not
there, or something, anyhow it's a bad thing.

Now intrinsically knowing that this protocol is smarter than me, I'm
guessing that I have incorrect dialplan logic that is allowing this to
happen.  I'm wondering how I can set up a dialplan flow that will do this:

From Server 1, pick up phone and dial a number (phone)(exten), 
1. * checks to see if the phone is first registered and on-line on server 1
2. if so, dial it, follow standard dialplan login
3. if not, goto DUNDi switch, lookup where it may be
(this is pretty much working good)

On Server 2,
1. DUNDi lookup request comes in
2. check to see if extention is active on this server(2), if not, stop, or
at least don't continue to look for something within your own dialplan that
is not there.

I'm very open to suggestions.  I feel like I'm so close but also still far
away.

Thanks

JR



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-13 Thread Jeremy McNamara

JR Richardson wrote:
  I'm very open to suggestions.  I feel like I'm so close but also 
still far

away.



What happens when your DB flakes out or needs to come down for 
inevitable maintenance?

(no, I am not ripping on MySQL here)

How much Post Dial Delay do you have as your database gets more and more 
utilization?

(yes, I am ripping on realtime here)

What happens if for some reason if a phone gets registered on more than 
one server?


What happens if your single DUNDi server hangs or needs to come down?




Jeremy McNamara
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-13 Thread Douglas Garstang
I'm not the person who your replying to, but I'll jump in anyway. We're using 
MySQL in conjunction with AGI. This gives us the ultimate flexibility (and me 
the most freekin work). 
 
Databases are configured in a HA manner. Not sure exactly what form that will 
take yet, but will be either replication or clustering with some mechanism 
hopefully to perform seameless IP address modification upon database failure so 
that it's transparent to Asterisk.
 
Phones can register on any asterisk server. We have a mechanism for ensuring 
that every phone is registered on every box. Every phone can therefore reach 
every other phone through any single Asterisk system. It would have been nice 
if SIP realtime was working properly (it doesn't support having multiple 
Asterisk systems talking to a single database for reasons beyond me). So, 
anyway, for now we're just gonna have to replicate sip.conf between the 
Asterisk boxes.
 
There's various techniques you can implement on MySQL to achieve maximum 
performance as well. We have some rather expensive MySQL consultants help with 
that. :)
 
DUNDi... pfft... forget it. No docs... it's useless.
 
Doug.
 
 

-Original Message- 
From: Jeremy McNamara [mailto:[EMAIL PROTECTED] 
Sent: Mon 3/13/2006 8:34 PM 
To: Asterisk Users Mailing List - Non-Commercial Discussion 
Cc: 
Subject: Re: [Asterisk-Users] Clustering NEW THREAD, Almost Working



JR Richardson wrote:
   I'm very open to suggestions.  I feel like I'm so close but also
still far
 away.


What happens when your DB flakes out or needs to come down for
inevitable maintenance?
(no, I am not ripping on MySQL here)

How much Post Dial Delay do you have as your database gets more and more
utilization?
(yes, I am ripping on realtime here)

What happens if for some reason if a phone gets registered on more than
one server?

What happens if your single DUNDi server hangs or needs to come down?




Jeremy McNamara
___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-13 Thread Douglas Garstang
Holy crap. You got SIP realtime working? I've tried it twice before and it 
failed the same way twice. Do you have multiple Asterisk boxes accessing the 
same sip info (ie phones) in the same table on the same database? Digium has 
said numerous times this known not to work, although I cant' work out why as 
it's just reading from a common table.

-Original Message- 
From: JR Richardson [mailto:[EMAIL PROTECTED] 
Sent: Mon 3/13/2006 7:11 PM 
To: asterisk-users@lists.digium.com 
Cc: 
Subject: [Asterisk-Users] Clustering NEW THREAD, Almost Working



All,

I made some progress, but it seems the further I go with clustering the
harder things get.  Hmmm, I guess if it were easy, it would be
documented..

Anyhow, I have 1 * server as the DUNDi peering master with a ttl=1.  The
only function of this server is to lookup where other sip peers are
registered and forward that info on to the requesting * server.

I have 4 * servers accepting registrations from sip users (phones).  
All the
sip phone info is stored in a MySQL database and being accessed through 
the
realtime engine, and it works great.  A phone registers to a server and 
the
server checks the database and if an entry is present, the * servers 
allows
the phone to register and dumps the sip phone into sip show peers, works
great.  I can take the sip entry out of the database and the phone will 
not
resister in realtime.  Works great.

Now the dial plan setup.  All the extension info is also in the MySQL
database, I have a switch statement in the [siptest] context pointing 
to the
database for extension logic.  This also works great.  All servers are
pointing to the same data source with all sip extensions in the database
starting with
exten = 1234,2,Answer and so on
exten = 1235,2,Answer and so on

notice the priority 2 starting point in the database, very important.

This is the good part, in sip.conf, I have regcontext=siptest in the 
general
section (because it doesn't work in the users section), so when a sip 
phone
registers on a server, * dynamically inputs an exten = 1234,1,Noop 
into the
dialplan and immediately the phone is able to be called.  This is 
working
pretty damn well also.

So at this point I have several phones registered across 4 * servers, 
all
pulling their info from MySQL, the same data source.  Now let's say 
phone
1234 and 1235 are registered to server 1 and phone 1236 and 1237 are
registered to server 2, 1234 can call 1235 and vise versa, 1236 can call
1237 and vise versa.

Now from phone 1234 on server 1, I call 1236 on server 2 and because 
1236
does not have a priority 1 entry on server 1, the call progresses to a 
DUNDi
lookup statement in the diaplan logic and request exten 1236 location 
from
the DUNDi peering master server (these registration servers all are 
peered
with the dundi peering master server with a ttl=2, so the request will 
get
past the peering master server and on to the other registration 
servers).
The request is answered from server 2 and 1234 can now complete a call 
to
1236. This is great, all is well, life is good, had a big Dallas 
barbeque
lunch to celebrate because all my sip phones are dynamically 
registering to
any one of 4 sip registration servers, and the other three servers know 
who
is registered where through DUNDi lookups.  And it only took me 2 weeks 
to
get this far.

Now then, let's break it and see what happens, dial any sip phone that 
is
not actively registered and you get an endless DUNDi lookup request 
from all
servers except the one you are dialing from.  I only had one other 
server on
at this time and within seconds produced 590+ IAX trunks initiated back 
into
a registration server before I could hang up the line.

As far as I can tell, if you make a call from server 1, exten 1234 to 
exten
1236, but 1236 is not actively registered on any other server, the other
server will get the DUNDi lookup request and not know where the phone 
is so
it keeps looking up and calling itself to find an extension that is not
there, or something, anyhow it's a bad thing.

Now intrinsically knowing that this protocol is smarter than me, I'm
guessing that I have incorrect dialplan logic that is allowing this to
happen.  I'm wondering how I can set up a dialplan flow that will do 
this:

From Server 1, pick up phone and dial a number (phone)(exten),
1. * checks

Re: [Asterisk-Users] Clustering NEW THREAD, Almost Working

2006-03-13 Thread Peter Bowyer
On 14/03/06, Douglas Garstang [EMAIL PROTECTED] wrote:

 DUNDi... pfft... forget it. No docs... it's useless.

How about qualifying these blanket put-downs something like:

DUNDi - I couldn't find any docs that helped me with it, so I decided
not to invest any more time ? (Which is an entirely OK position to
take - your call - declaring it as useless without giving it a try,
however, is not really helpful or accurate).

Others are busy finding it very useful indeed.

--
Peter Bowyer
Email: [EMAIL PROTECTED]
Tel: +44 1296 768003
VoIP: sip:[EMAIL PROTECTED]
VoIP: [EMAIL PROTECTED]
FWD: **275*5048707000
VoipTalk: **473*5048707000
___
--Bandwidth and Colocation provided by Easynews.com --

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