Daniel Ferrer | 18 Aug 19:48
Favicon

sip_devicestate and queue problems

Hi list,

We're using asterisk 1.4.21.1 in a callcenter enviroment, with some
queues, some of them relatively big queues (80 - 100 SIP agents, Xlite).
Normally, all agents are busy and there are 30-40 calls  waiting in the 
queue. We used 1.2 in the past and we migrated to 1.4 to take advantage 
of "autofill=yes" in app_queue.

We experienced some kind of trouble with "InUse" state of member queues 
when migrating to 1.4 (we've read UPGRADE.txt an added a call-limit to 
all sip peers).
The problem is that the state of the members of the queue sometimes goes 
wrong (members appears as Not in use when they are In use), resulting in 
  dispatching calls to busy agents (we use ringinuse=no for all queues). 
We experienced this in the past in a lab enviroment, and the cause was 
the same: a DNS problem

An analisys showed that Asterisk makes a DNS lookup with the channel 
name, every time a new SIP channel is created. For example, if I've a 
sip peer '151', when making a new channel named SIP/151-b7c317a0, 
asterisk does a DNS query of 151-b7c317a0.localdomain. (localdomain is 
ommited if we have no domain configured at the machine).
Apparently function sip_devicestate is called many times when creating a 
SIP channel, sometimes it hast "SIP/151" as argument (all goes ok in 
that case), and sometimes it is called with entire channel name: 
"SIP/151-b7c317a0", and it is in that case when a DNS query is make, 
because "151-b7c317a0" is not matched in the SIP peer list.

We suffered this problem twice:

(Continue reading)

Russell Bryant | 18 Aug 21:43

Re: sip_devicestate and queue problems

Daniel Ferrer wrote:
> I think there are 2 ways to fix this problem:
>   1) Not querying a DNS server if peer not found in function 
> sip_devicestate, this will elliminate innecesary dns queries.
>   2) Not to call to "ast_device_state_changed_literal" (in function 
> ast_setstate, channel.c) with ENTIRE channel name, SIP/peer-abcdef

This has actually already been reworked and should be fixed in 1.4.22. 
It would be helpful if you could try the latest code in the 1.4 branch 
(or one of the upcoing 1.4.22 release candidates) to see if you still 
have a problem.

$ svn co http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4

--

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.

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

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

(Continue reading)

Daniel Ferrer | 19 Aug 18:02
Favicon

Re: sip_devicestate and queue problems

Ok, I'm testing version SVN-branch-1.4-r138685, at the moment all is ok. 
I see that there is no DNS query anymore, because function ast_setstate 
now breaks SIP channel name string with '-' separator, so never called 
with entire channel name.

Waiting for 1.4.22 to came up... How long do you estimate ?

Thanks!
bye
daniel

Russell Bryant escribió:
> Daniel Ferrer wrote:
>> I think there are 2 ways to fix this problem:
>>   1) Not querying a DNS server if peer not found in function 
>> sip_devicestate, this will elliminate innecesary dns queries.
>>   2) Not to call to "ast_device_state_changed_literal" (in function 
>> ast_setstate, channel.c) with ENTIRE channel name, SIP/peer-abcdef
> 
> This has actually already been reworked and should be fixed in 1.4.22. 
> It would be helpful if you could try the latest code in the 1.4 branch 
> (or one of the upcoing 1.4.22 release candidates) to see if you still 
> have a problem.
> 
> $ svn co http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4
> 

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

(Continue reading)

Russell Bryant | 19 Aug 18:07

Re: sip_devicestate and queue problems

Daniel Ferrer wrote:
> Ok, I'm testing version SVN-branch-1.4-r138685, at the moment all is ok. 
> I see that there is no DNS query anymore, because function ast_setstate 
> now breaks SIP channel name string with '-' separator, so never called 
> with entire channel name.
> 
> Waiting for 1.4.22 to came up... How long do you estimate ?

It's waiting on the next release of Zaptel and the release of DAHDI, 
which are currently being tested.

It should be this week unless something goes wrong ...

--

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.

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

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

(Continue reading)


Gmane