[asterisk-users] Realtime logic in Asterisk 1.4.16.1

Mindaugas Kezys mkezys at gmail.com
Wed Dec 19 17:48:01 CST 2007


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tilghman Lesher
Sent: Thursday, December 20, 2007 1:35 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Realtime logic in Asterisk 1.4.16.1

On Wednesday 19 December 2007 16:12:27 Mindaugas Kezys wrote:
> [Dec 20 00:04:12] DEBUG[25686]: res_config_mysql.c:138 realtime_mysql:
> MySQL RealTime: Retrieve SQL: SELECT * FROM devices WHERE name = 'Provider'
> AND host = 'dynamic'
>
> Note: host = 'dynamic'

Correct, that's the FIRST lookup that is done.

It then checks the IP address and does:

"SELECT * FROM devices WHERE name = 'Provider' AND host='23.45.67.89'"
where the IP address is what is sent in the SIP INVITE.

If that fails, it does a lookup only on the name (old behavior).

If that fails:  SELECT * FROM devices WHERE host='23.45.67.89' AND port='5060'

If that fails:  SELECT * FROM devices WHERE ipaddr='23.45.67.89' AND 
port='5060'

If that fails:  SELECT * FROM devices WHERE host='23.45.67.89' and checks
every match for insecure=yes

If that fails:  SELECT * FROM devices WHERE ipaddr='23.45.67.89' and checks
every match for insecure=yes

And if that fails, then it returns no match.  So all of those queries had to
run and fail for you to get no match.

-- 
Tilghman

------------------------------


Thank you for explanation, but problem is that only this first query is executed:

[Dec 20 00:04:12] DEBUG[25686]: res_config_mysql.c:138 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM devices WHERE name = 'Provider' AND host = 'dynamic'
[Dec 20 00:04:12] WARNING[25686]: chan_sip.c:2898 create_addr: No such host: Provider
[Dec 20 00:04:12] WARNING[25686]: app_dial.c:1191 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)


That's it. No more queries. End of call. Why?


Regards,
Mindaugas Kezys
http://www.kolmisoft.com
MOR - Advanced Billing for Asterisk PBX




More information about the asterisk-users mailing list