Re: [asterisk-users] Asterisk eventually fails when connection dies

2009-06-04 Thread Philipp Kempgen
Joseph L. Casale schrieb:
 I have a single server running asterisk 1.6.0.8 with a few sip voip providers
 and a tdm card for redundancy. It has a caching name server and the sip 
 providers
 are hard coded in the hosts file.
 
 When the internet connection dies, it fails over to the dahdi channel as it
 should, but slowly the sip phones loose registration and the incoming dahdi
 channel can still answer the incoming call, but it doesn't pass it off the
 mailbox, it just says the person at extension... is not available? There
 is a custom recording setup that otherwise works?
 
 What does a guy got to do to keep asterisk up when the net connection fails?
 This is becoming a show stopper :(

A persistent local DNS cache such as pdnsd[1] or djbdns[2] could help.

[1] http://en.wikipedia.org/wiki/Pdnsd
[2] http://en.wikipedia.org/wiki/Djbdns

Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  -  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 -  http://www.amoocon.de
-- 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Asterisk eventually fails when connection dies

2009-06-04 Thread Jeff LaCoursiere

On Thu, 4 Jun 2009, Philipp Kempgen wrote:

 Joseph L. Casale schrieb:
 I have a single server running asterisk 1.6.0.8 with a few sip voip providers
 and a tdm card for redundancy. It has a caching name server and the sip 
 providers
 are hard coded in the hosts file.

 When the internet connection dies, it fails over to the dahdi channel as it
 should, but slowly the sip phones loose registration and the incoming dahdi
 channel can still answer the incoming call, but it doesn't pass it off the
 mailbox, it just says the person at extension... is not available? There
 is a custom recording setup that otherwise works?

 What does a guy got to do to keep asterisk up when the net connection fails?
 This is becoming a show stopper :(

 A persistent local DNS cache such as pdnsd[1] or djbdns[2] could help.

 [1] http://en.wikipedia.org/wiki/Pdnsd
 [2] http://en.wikipedia.org/wiki/Djbdns

Philipp Kempgen

I am guessing it fails to reverse lookup your internal addresses (which 
would fail anyway, even with the DNS up).  If your phones are static, just 
make entries in /etc/hosts for them.  If they are dynamic, add entries in 
your /etc/hosts for all the addresses in your DHCP pool.

You can watch the attempted outbound traffic with tcpdump and see what the 
server is trying to lookup when the registrations fail, and use /etc/hosts 
to precede the lookup.

j

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Asterisk eventually fails when connection dies

2009-06-04 Thread Joseph L. Casale
 A persistent local DNS cache such as pdnsd[1] or djbdns[2] could help.

 [1] http://en.wikipedia.org/wiki/Pdnsd
 [2] http://en.wikipedia.org/wiki/Djbdns

Philipp Kempgen

I am guessing it fails to reverse lookup your internal addresses (which
would fail anyway, even with the DNS up).  If your phones are static, just
make entries in /etc/hosts for them.  If they are dynamic, add entries in
your /etc/hosts for all the addresses in your DHCP pool.

You can watch the attempted outbound traffic with tcpdump and see what the
server is trying to lookup when the registrations fail, and use /etc/hosts
to precede the lookup.

Philipp and Jeff,
Thank you both for the help. So the phones are dynamic, and I don't assign
host names. Shall I just create something simple like ip.addr extension_#
for each phone and add dhcp reservations, so extension 200 would get:
`192.168.13.127 200` in the hosts file?

What would be the reason the recorded greeting doesn't get played right now
while we are having an outage? Just part of asterisk failing under the current
config? If no phones are available, should that not have an effect on what 
asterisk
does when an inbound caller arrives?

I am driving out now to see what it's doing, I suppose something like:
# tcpdump src host 127.0.0.1 and udp dst port 53
would be what I need?

Again, appreciate the guidance!
Thanks,
jlc

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Asterisk eventually fails when connection dies

2009-06-04 Thread Jeff LaCoursiere

On Thu, 4 Jun 2009, Joseph L. Casale wrote:

 A persistent local DNS cache such as pdnsd[1] or djbdns[2] could help.

 [1] http://en.wikipedia.org/wiki/Pdnsd
 [2] http://en.wikipedia.org/wiki/Djbdns

Philipp Kempgen

 I am guessing it fails to reverse lookup your internal addresses (which
 would fail anyway, even with the DNS up).  If your phones are static, just
 make entries in /etc/hosts for them.  If they are dynamic, add entries in
 your /etc/hosts for all the addresses in your DHCP pool.

 You can watch the attempted outbound traffic with tcpdump and see what the
 server is trying to lookup when the registrations fail, and use /etc/hosts
 to precede the lookup.

 Philipp and Jeff,
 Thank you both for the help. So the phones are dynamic, and I don't assign
 host names. Shall I just create something simple like ip.addr extension_#
 for each phone and add dhcp reservations, so extension 200 would get:
 `192.168.13.127 200` in the hosts file?

Sure.  I might name it something like dhcp127 though.


 What would be the reason the recorded greeting doesn't get played right now
 while we are having an outage? Just part of asterisk failing under the current
 config? If no phones are available, should that not have an effect on what 
 asterisk
 does when an inbound caller arrives?

This must be your dialplan.  Can you post it?


 I am driving out now to see what it's doing, I suppose something like:
 # tcpdump src host 127.0.0.1 and udp dst port 53
 would be what I need?

Close.  The packets won't be leaving from the loopback address.  Just 
something like:

tcpdump port 53

should be plenty.

Good luck!

j


 Again, appreciate the guidance!
 Thanks,
 jlc

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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


Re: [asterisk-users] Asterisk eventually fails when connection dies

2009-06-04 Thread Joseph L. Casale
Sure.  I might name it something like dhcp127 though.

That makes sense :)

This must be your dialplan.  Can you post it?

You are right, never trust users :) They had erased it or something,
it actually wasn't there. So it does go straight to vm as it should.
My bad...

Close.  The packets won't be leaving from the loopback address.  Just
something like:

tcpdump port 53

Heh, I didn't think this one through at all. The server is multihomed,
one external nic and one internal nic. The external nic is connected
directly to a cable modem with iptables rules.

When the connection drops, the WAN interface loses its IP and therefore
there is no default gateway, I tried to nslookup/dig some variations but
no traffic was ever initiated outwardly (I clued on to the loopback problem
quickly).

I guess I couldn't see what it was trying to resolve, but I will make the
changes above and test again in the meantime!

Thanks a ton!
jlc

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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