Hi it is Jan (Channel Extraction). Im emailing from a different email account,
because SpamCOP blacklisted our companies SMTP server, because of all the mail I
send to this mailinglist yesterday.
No I did not call initialize().
But now that I do, when it gets to a managerConnection.login() statement the
program bombs out with a classcastexception:
Exception in thread "main" java.lang.ClassCastException:
net.sf.asterisk.manager.response.ManagerError
at
net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:442)
at
net.sf.asterisk.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:377)
The class constructor contains the code that you stated previously:
managerConnection = new DefaultManagerConnection();
managerConnection.setHostname("10.13.0.55");
managerConnection.setUsername("manager");
managerConnection.setPassword("pa55w0rd");
manager = new DefaultAsteriskManager();
manager.setManagerConnection(managerConnection);
manager.initialize();
And then I have a "dial" method with the code as before, containing the login,
action, logoff..
When I make use of the ManagerConnectionFactory I get the same problem.
Cheers.
Stefan Reuter wrote:
> hmm here this stuff works.
> did you call initialize() in AsteriskManager?
>
> what i do is sth like:
>
> managerConnection = new DefaultManagerConnection();
> managerConnection.setHostname("10.13.0.55");
> managerConnection.setUsername("manager");
> managerConnection.setPassword("pa55w0rd");
>
> manager = new DefaultAsteriskManager();
> manager.setManagerConnection(managerConnection);
> manager.initialize();
> ...
>
> =Stefan
>
|