Re: [Asterisk-java-users] Strange problem with originateToExtension
Brought to you by:
srt
From: King H. <kin...@ne...> - 2006-10-26 09:55:39
|
Stefan, Do you have a chance to look at this problem? My feeling is that the originateToExtension() method may not always be able to return the = channel used. It depends on the order in which responses and events are handled. = Thanks. King -----=AD=EC=A9l=B6l=A5=F3----- =B1H=A5=F3=AA=CC: ast...@li... [mailto:ast...@li...] =A5N=B2z King = Ho =B1H=A5=F3=A4=E9=B4=C1: Thursday, 19 October, 2006 19:03 =A6=AC=A5=F3=AA=CC: ast...@li... =A5D=A6=AE: [Asterisk-java-users] Strange problem with = originateToExtension Hi, I am having a very strange problem (probably a timing problem) with asterisk-java-m1. I am using the = DefaultAsteriskServer.originateToExtension method as follows: defaultAsteriskServer =3D new DefaultAsteriskServer("192.168.0.238", "testing", "testing123"); defaultAsteriskServer.initialize(); =20 defaultAsteriskServer.originateToExtension("SIP/1000@ray_server","testing= "," 1003",1,30000); The call did go through OK but there is a NoSuchChannelException thown. Below is the console output along with stack trace from the exception: 2006=A6~10=A4=EB19=A4=E9 =A4U=A4=C806:19:40 = org.asteriskjava.util.internal.JavaLoggingLog info =B8=EA=B0T: Connecting to 192.168.0.238:5038 2006=A6~10=A4=EB19=A4=E9 =A4U=A4=C806:19:40 = org.asteriskjava.util.internal.JavaLoggingLog info =B8=EA=B0T: Connected via Asterisk Call Manager/1.0 2006=A6~10=A4=EB19=A4=E9 =A4U=A4=C806:19:40 = org.asteriskjava.util.internal.JavaLoggingLog info =B8=EA=B0T: Successfully logged in 2006=A6~10=A4=EB19=A4=E9 =A4U=A4=C806:19:40 = org.asteriskjava.util.internal.JavaLoggingLog info =B8=EA=B0T: Determined Asterisk version: Asterisk 1.2 2006=A6~10=A4=EB19=A4=E9 =A4U=A4=C806:19:40 = org.asteriskjava.util.internal.JavaLoggingLog info =B8=EA=B0T: Initializing done org.asteriskjava.live.NoSuchChannelException: Channel = 'SIP/1000@ray_server' is not available at org.asteriskjava.live.internal.AsteriskServerImpl.originate(AsteriskServe= rIm pl.java:339) at org.asteriskjava.live.internal.AsteriskServerImpl.originateToExtension(As= ter iskServerImpl.java:278) at org.asteriskjava.live.internal.AsteriskServerImpl.originateToExtension(As= ter iskServerImpl.java:258) at org.asteriskjava.live.DefaultAsteriskServer.originateToExtension(DefaultA= ste riskServer.java:133) at hk.com.csl.asterisk_java_example.Manager.run(Manager.java:29) at hk.com.csl.asterisk_java_example.Manager.main(Manager.java:40) 2006=A6~10=A4=EB19=A4=E9 =A4U=A4=C806:19:40 = org.asteriskjava.util.internal.JavaLoggingLog info =B8=EA=B0T: Adding channel SIP/ray_server-09e11ee0(1161253134.58) Based on the console output, the problem seems to be that the = "Newchannel" event was processed after the "OriginateSuccess" event so when it tried = to lookup the channel, it wasn't added yet. I have connected to the Asterisk Manager port and look at the order in = which the events are happening and Newchannel is happening before = OriginateSuccess which is correct. The version of Asterisk that I am using is 1.2.12.1 and also tried with = 1.2. 13 with the same problem. Thanks. Best Regards, King __________ NOD32 1.1810 (20061018) Information __________ This message was checked by NOD32 antivirus system. http://www.nod32.com.hk |