[asterisk-dev] sip.conf realtime - potential logic flaw ?
Andy Davidson
andy at nosignal.org
Tue Oct 30 13:56:27 CDT 2007
On 30 Oct 2007, at 14:20, Tilghman Lesher wrote:
> On Tuesday 30 October 2007 07:41:58 Andy Davidson wrote:
>> SELECT * FROM sip_buddies WHERE name = 'customer5'
>> SELECT * FROM sip_buddies WHERE host = '1.1.1.1' AND port = '5060'
>> SELECT * FROM sip_buddies WHERE ipaddr = '1.1.1.1' AND port = '5060'
>> SELECT * FROM sip_buddies WHERE host = '1.1.1.1' ORDER BY host
>> SELECT * FROM sip_buddies WHERE ipaddr = '1.1.1.1' ORDER BY ipaddr
>> SELECT * FROM sip_buddies WHERE name = '1.1.1.1'
>> SELECT * FROM sip_buddies WHERE name = '1.1.1.1'
[...]
>> - should we permit people to disable to check by name altogether
>> - if we want to authenticate by username, shouldn't we "select *
>> from sip_buddies where username='foo'", rather than where
>> user='foo' ?
> No, user criteria is correct,
Thank you for confirming.
> although we might want to add a second criteria
> of host='dynamic' to that query, so that sip users with static IPs
> won't get
> selected.
That would certainly tighten up the query so that the right thing
will always happen in my case - I endorse this patch :-)
More information about the asterisk-dev
mailing list