[asterisk-users] Asterisk Wackyness

2008-05-22 Thread Douglas Garstang
Here's a weird one. We have a situation where Asterisk seems to be losing it's 
ODBC database connection during idle periods. A workaround was to have a script 
connect to AMI and generate a bogus call, which would then generate a CDR and 
keep the connection alive. We didn't want to be generating actual network 
traffic for this, so I tried originating a call to [EMAIL PROTECTED]

Somehow, magically, Asterisk maps a bogus host name (we have no peer in our 
config called 'xxx') to a IP of 205.234.182.xxx (not really .xxx...just hiding 
the IP) and a a host name of unknown.ord.scnet.net. How does that happen? I 
know it's doing this because I can see the SIP INVITE to out to this address. 
Seems like other bogus host names also map to the same place. Time to go and 
grep the source for 'scnet.net' I guess.

Doug.


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

2008-05-22 Thread Jared Smith
On Thu, 2008-05-22 at 10:48 -0700, Douglas Garstang wrote:
 We didn't want to be generating actual network traffic for this, so I
 tried originating a call to [EMAIL PROTECTED]

Why not try [EMAIL PROTECTED] and see if that solves the problem for you?  I'm
going to make a wild guess here that Asterisk is trying to do a DNS
lookup on whatever you have there for xxx.  Is your xxx numeric?
I'll bet if you change it to [EMAIL PROTECTED] you won't see the problem.



-- 
Jared Smith
Training Manager
Digium, Inc.


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

2008-05-22 Thread Matt Watson
On May 22, 2008 02:06:06 pm Jared Smith wrote:
 On Thu, 2008-05-22 at 10:48 -0700, Douglas Garstang wrote:
  We didn't want to be generating actual network traffic for this, so I
  tried originating a call to [EMAIL PROTECTED]

 Why not try [EMAIL PROTECTED] and see if that solves the problem for you?  I'm
 going to make a wild guess here that Asterisk is trying to do a DNS
 lookup on whatever you have there for xxx.  Is your xxx numeric?
 I'll bet if you change it to [EMAIL PROTECTED] you won't see the problem.

specifying localhost is probably a good idea... if you just specify a random 
string say asdf more than likely whats going to happen is asterisk will try 
and do a DNS query via gethostbyname() (guessing thats what * uses).  Whats 
then going to happen is the resolver is first going to try and do a DNS query 
on asdf thats going to fail, what will happen next is it will try and 
search for asdf.your search domain specified in /etc/resolv.conf.  
Depending on what your asdf string is... that domain might actually resolv 
to something and gethostbyname() is going to return the results.

That all being said... I'm surprised you are not more concerned with fixing 
the real problem instead of your workaround...  By any chance is your SQL 
server not on the same subnet as your * box?  If not, do you have something 
like a cisco router/PIX/ASA between the subnets?  if thats the case, your 
router might be detecting the idle connection and killing it.  I know our PIX 
will do this.  I suppose even if its on the same subnet, you could have 
something running on either your * box or mysql box that will blow away idle 
connections... but that would probably be a little more obvious and you'd 
know about it.

-- 
Matt
http://www.mattgwatson.ca

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