Asterisk App ICES

I have a question about the Asterisk Application ICES. I’ve got Asterisk setup to accept a phone call and call the ICES app which sends it to an Icecast server.

exten => 1,1,SetGroup(‘stream’)
exten => 1,2,GetGroupCount()
exten => 1,3,Ices(‘contrib/${GROUPCOUNT}-ices.xml’)
exten => 1,4,Hangup

Everything works fine. Unless I have more than 24 phone calls being converted at the same time. When I try to bring up the 25 phone call the call comes up, Asterisk answers, and begins encoding the call. Everything is ok with that call. However, as the 25 call comes up one of the first 24 calls ( there is no pattern ) breaks. I say breaks because Asterisk doesn’t hangup on the call, but it does stop sending data to the ICES application, which causes a timeout on the Icecast server.

If I make direct connections from the ICES application to Icecast everything works, I can run as many simultaneous streams as I want.

I’ve tried increasing the open file limit with ulimit, but it doesn’t help.

Does anyone have any thoughts on why this is happening?