Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What happens when using the Manager API and Asterisk-Java loses the connection to Asterisk?

0
Posted

What happens when using the Manager API and Asterisk-Java loses the connection to Asterisk?

0

Asterisk-Java automatically reconnects if it looses the connection to Asterisk. Automatic reconnection attempts happens quite fast (with a 50 msec delay) for the first 10 attempts and at 5 seconds intervals later on. This is to make sure Asterisk-Java reconnects instantly when you reload Asterisk and does not consume too much resources for longer downtimes of Asterisk. Your application is notified of disconnects and reconnects by the two pseudo events DisconnectEvent and ConnectEvent so you can take appropriate action like clearing internal caches. By calling getState() on the ManagerConnection you can determine whether the connection is currently established or not and whether Asterisk-Java tries to reconnect.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123