Re: [Asterisk-java-users] DefaultAsteriskServer goes to Hollywood
Brought to you by:
srt
From: Alessio T. <al...@cr...> - 2015-11-12 14:18:56
|
Hi, I think this is could be a correct way, can I resolve to re-instance DefaultServerAsterisk in the wrapper every x time? (Patch solution :)) I would like to resolve this question, with an elegant solution as manage invariant state of DefaultServerAsterisk. Thanks Ale Il 12/11/2015 14.09, Jhoan Orozco ha scritto: > Hello, > > I developed an app around 1 year ago, and happened me the same. I > could resolve this issue whith this. > > When i launch my app, i do it across of a shell Script (start.sh file) > but at the begining you have to add these lines: > > ulimit -u unlimited > ulimit -n 50000 > > > > > Your problem is when your app reaches the maximun amount of network > connections or files opened. > > this my script. > > #!/bin/bash > echo "Starting.." > ulimit -u unlimited > ulimit -n 50000 > java -cp asterisk-java.jar:. org.asteriskjava.fastagi.DefaultAgiServer & > echo "Started!" > > > 2015-11-12 3:11 GMT-05:00 Alessio Turini <al...@cr... > <mailto:al...@cr...>>: > > Dear, > I've a problem with the class DefaultAsteriskServer and the > connection with the Asterisk (V. 11.19.0), i'll try to explain > below (and sorry for my english) > > I develop a program that links inbound call with a couple of > events, I use the class DefaultAsteriskServer and the listener > addAsteriskServerListener(MyClass). > MyClass checks every call and makes different operation based on > type of call. > The program is ok but after 10/20 hours goes to Hollywood, this > means that the listener not link events. > The class DefaultAsteriskServer is declared in a static object > that wrap it. > I would to ask, there is a timeout of connection between Asterisk > and DefaultAsteriskServer , can i check the connection between the > two actor? > I tried to check the state of ManagerConnection (get by > getManagerConnection() on DefaultAsteriskServer ) but the result > is always connected and not help me to restablished a connection. > > Thanks in advance, Alessio > > > -- > *Dott. Alessio Turini* > IT Dept - Credires > Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy > +39 0587 467716 <tel:%2B39%200587%20467716> - +39 3457427943 > <tel:%2B39%203457427943> - a.t...@cr... > <mailto:a.t...@cr...> > Le informazioni contenute in questo messaggio di posta elettronica > e/o nel/i file/s allegato/i, sono da considerarsi strettamente > riservate. Il loro utilizzo è consentito esclusivamente al > destinatario del messaggio, per le finalità indicate nel messaggio > stesso. Qualora riceveste questo messaggio senza esserne il > destinatario, Vi preghiamo cortesemente di darcene notizia via > e-mail all'indirizzo in...@cr... <mailto:in...@cr...> o > telefonicamente allo +390587467700 <tel:%2B390587467700> e > procedere alla distruzione del messaggio stesso, cancellandolo dal > Vostro sistema; costituisce comportamento contrario ai principi > dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, > divulgarlo anche in parte, distribuirlo ad altri soggetti, > copiarlo, od utilizzarlo per finalità, diverse. > This message and any attachments are solely for the intended > recipient and may contain confidential or privileged information. > Its use is allowed only to the intended recipient, for the purpose > indicated in the message itself. If you are not the intended > recipient, please notify us by email to in...@cr... > <mailto:in...@cr...> or by phone to +390587467700 > <tel:%2B390587467700> and permanently delete this message and any > attachments in your system. Keeping, disclosure also in part, > distribution to other recipients, copying of the information > included in this message and any attachments or using this > information for different purposes is prohibited as per regulation > Dlgs 196/2003. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > <mailto:Ast...@li...> > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users -- *Dott. Alessio Turini* IT Dept - Credires Via Don Luigi Sturzo 4, Pontedera, Pisa, Italy +39 0587 467716 - +39 3457427943 - a.t...@cr... Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i, sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail all'indirizzo in...@cr... o telefonicamente allo +390587467700 e procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal Dlgs 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità, diverse. This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. Its use is allowed only to the intended recipient, for the purpose indicated in the message itself. If you are not the intended recipient, please notify us by email to in...@cr... or by phone to +390587467700 and permanently delete this message and any attachments in your system. Keeping, disclosure also in part, distribution to other recipients, copying of the information included in this message and any attachments or using this information for different purposes is prohibited as per regulation Dlgs 196/2003. |