[asterisk-users] Asterisk Wackyness

Matt Watson matt at mattgwatson.ca
Thu May 22 18:24:19 CDT 2008


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 1 at xxx.
>
> Why not try 1 at localhost 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 1 at localhost 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



More information about the asterisk-users mailing list