[Asterisk-java-users] Excetpion when trying use the channel of live api
Brought to you by:
srt
From: jeff l. <ll...@gm...> - 2007-09-07 03:28:05
|
Hey guys, I'm not quite familiar with live api and a little confused by some concept in it. What does the channel stand for(same as fastagi)? Why do I get NoSuchChannelException when trying to use the channel when NewAsteriskChannel is fired.Some codes: public void onNewAsteriskChannel(AsteriskChannel channel){ System.out.println("Caller ID: " + channel.getCallerId()); System.out.println ("Name: " + channel.getName()); try { // channel.startMonitoring("/tmp/mlu/live/test.wav"); I do find two audio files,so this one not failed // channel.redirect("extensions-shanghai-sip","628",0); Failed channel.playDtmf("1"); Failed } catch (ManagerCommunicationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchChannelException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Logs: org.asteriskjava.live.NoSuchChannelException: Channel 'SIP/mlu-087c3870' is not available: Invalid/unknown command at org.asteriskjava.live.internal.AsteriskChannelImpl.playDtmf(AsteriskC hannelImpl.java:648) at test.HelloLive.onNewAsteriskChannel(HelloLive.java:106) at org.asteriskjava.live.internal.AsteriskServerImpl.fireNewAsteriskChan nel(AsteriskServerImpl.java:730) at org.asteriskjava.live.internal.ChannelManager.addNewChannel (ChannelMa nager.java:198) at org.asteriskjava.live.internal.ChannelManager.handleNewChannelEvent(C hannelManager.java:372) at org.asteriskjava.live.internal.AsteriskServerImpl.onManagerEvent (Aste riskServerImpl.java:838) at org.asteriskjava.manager.ManagerEventListenerProxy$1.run (ManagerEvent ListenerProxy.java:77) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExec utor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor .java:675) at java.lang.Thread.run( Thread.java:595) Any suggestions?Thanks in advance. -- Regards, Jeff |