Trying use agi to listen asterisk.
But after startup method is running, my application is freezing. There is no error appears...
My spring bean:
@Bean(name = "agi")
public DefaultAgiServer getAsteriskAgi() throws Exception {
DefaultAgiServer agiServer = new DefaultAgiServer();
agiServer.startup();
return agiServer;
}
My mapping
public class AsteriskAgi extends BaseAgiScript{
@Override
public void service(AgiRequest agiRequest, AgiChannel agiChannel) throws AgiException {
// Answer the channel...
answer();
// ...say hello...
streamFile("welcome");
streamFile("tt-monkeys");
// ...and hangup.
hangup();
}
}
my properties file
fastagi-mapping.properties
located in resources folder
Why is this happening?
UPD Last two console output:
2018-05-21 15:19:53 DEBUG DefaultAgiServer:81 - Using channelFactory org.asteriskjava.fastagi.internal.DefaultAgiChannelFactory
2018-05-21 15:19:53 INFO DefaultAgiServer:315 - Listening on *:4573.