Re: [Asterisk-java-users] asterisk java and astmanproxy
Brought to you by:
srt
From: Aaron E. <aar...@gm...> - 2007-08-01 21:39:12
|
In the hack I did, I simply added an "or" so that Asterisk Call Manager Proxy/ is an allowable protocol prefix. In stderr, I see "Unsupported protocol version 'Asterisk Call Manager Proxy/1.21'. Use at your own risk.", so it is taking it. Can I configure asterisk java to use clear text login? I don't see how. I'm using the DefaultManagerConnection object. I did the Challenge action from the command line by telnet-ing to an asterisk server and then to the proxy and the conversations looked identical in format (except for the number that was spit back in the Challenge attribute of the response). I'm not sure how to "record" the AJ conversation though. In stderr, the following was written by AJ: org.asteriskjava.manager.response.ChallengeResponse: actionId='null'; message='null'; response='Success'; uniqueId='null'; systemHashcode=17227822 So it seemed to work but for whatever reason, AJ is not building a response object out of it and since it is null it throws the timeout exception. On 8/1/07, Martin Smith <ma...@be...> wrote: > Hello Aaron, > > It will be critical to get that protocol information from the AMI, or > its proxy. It sounds like the protocol part may not be available at all, > but could be inferred if the proxy appends "Proxy" to the original > Asterisk string, as it appears "Asterisk Call Manager Proxy/" may be. > > Have you tried using cleartext login? > LoginAction(java.lang.String username, java.lang.String secret) > > I'd compare an ngrep of the AJ conversation w/ AstManProxy to the > conversation with Asterisk itself, with the challenge/response login, > and see if there are big differences. > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > > > > > -----Original Message----- > > From: ast...@li... > > [mailto:ast...@li...] On > > Behalf Of Aaron Evans > > Sent: Wednesday, August 01, 2007 4:47 PM > > To: ast...@li... > > Subject: Re: [Asterisk-java-users] asterisk java and astmanproxy > > > > One more tidbit: > > The exception was caused by > > > > org.asteriskjava.manager.TimeoutException: Timeout waiting for > > response to Challenge > > > > On 8/1/07, Aaron Evans <aar...@gm...> wrote: > > > Ok, I actually ended up making the change to the src and > > building with maven. > > > > > > That got me a bit further. Now I am getting: > > > > > > org.asteriskjava.manager.AuthenticationFailedException: > > Unable to send > > > challenge action > > > > > > And standard error says: > > > > > > Unable to retrieve internaActionId from response actionId 'null': > > > org.asteriskjava.manager.response.ChallengeResponse > > > > > > I'll keep looking at the source I guess but any tips are welcome. > > > > > > -aaron > > > > > > On 8/1/07, Aaron Evans <aar...@gm...> wrote: > > > > Actually, I think maybe I've spotted the problem: > > > > > > > > In the run method of the ManagerReaderImpl, there is a > > condition for > > > > identifying the protocol identifier. It tests for > > strings starting > > > > with "Asterisk Call Manager/" and "Asterisk Manager > > Proxy/" and will > > > > set the "protocol identifier" if one of those is true. > > > > > > > > However, AstManProxy is giving back a string that starts with > > > > "Asterisk Call Manager Proxy/". > > > > > > > > I have checked out the source but am not familiar with > > building with > > > > maven 2. So I may try to hack something out by providing my own > > > > implementations of the various classes by overriding a few key > > > > methods. I'll let you know how it works out... > > > > > > > > On 8/1/07, Maciek Tokarski <mlo...@gm...> wrote: > > > > > Hi, > > > > > I had the same problem while using asterisk-java with > > astmanproxy. Now I'm > > > > > looking for other AMI poxies (I think, finally i will > > have to write it on my > > > > > own). But astmanproxy is the best proxy I already > > found. Adding support for > > > > > it to asteriks-java would be great feature. > > > > > > > > > > According to your questiopn Aaron, maybe the solution > > is to change the > > > > > astamnproxy code and make this program to give output > > exact like asterisk. > > > > > > > > > > Regards, > > > > > Maciek > > > > > > > > > > > > > > > 2007/8/1, Aaron Evans <aar...@gm...>: > > > > > > > > > > > > Hi, > > > > > > I'm trying to use asterisk-java with astmanproxy. > > > > > > > > > > > > I am getting the error: > > > > > > > > > > > > org.asteriskjava.manager.TimeoutException: Timeout > > > > > waiting for > > > > > > protocol identifier > > > > > > > > > > > > Now I did some digging in the archives and found that > > connecting to > > > > > > astmanproxy is not currently supported but that it > > might be in the > > > > > > future. The thread was from last year though. > > > > > > > > > > > > Any plans to support it? > > > > > > > > > > > > I also saw that some named Cristian Talle was able to > > modify the > > > > > > source so that he could use them together. Perhaps > > that the problem > > > > > > is that the ProxyKey line has to be sent during the > > connect/login > > > > > > process. > > > > > > > > > > > > I started looking through the source but have not yet > > located where I > > > > > > would inject that bit of code. > > > > > > > > > > > > If someone could point me in the right direction, or > > better yet, > > > > > > describe what has to be done to get these working > > together, that would > > > > > > be sweet. > > > > > > > > > > > > I also saw some threads questioning the value of > > using astmanproxy in > > > > > > combination with asterisk-java. > > > > > > > > > > > > I think that there are many advantages to doing so. > > Firstly, I want > > > > > > to use my proxy for more than just asterisk-java > > clients but would > > > > > > like to have all my asterisk manager API calls going > > through one > > > > > > place. > > > > > > > > > > > > Secondly, in my case, I have to connect to many > > (perhaps a dozen or > > > > > > so) asterisk servers right now. I would prefer to > > just list them in > > > > > > the proxy's configuration rather than having to > > manage all of these > > > > > > connections in my application individually. > > > > > > > > > > > > Kind regards, > > > > > > aaron > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > ----------- > > > > > > This SF.net email is sponsored by: Splunk Inc. > > > > > > Still grepping through log files to find problems? Stop. > > > > > > Now Search log events and configuration files using > > AJAX and a browser. > > > > > > Download your FREE copy of Splunk now >> > > http://get.splunk.com/ > > > > > > _______________________________________________ > > > > > > Asterisk-java-users mailing list > > > > > > Ast...@li... > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Pozdrawiam > > > > > Maciek Tokarski > > > > > > > -------------------------------------------------------------- > > ----------- > > > > > This SF.net email is sponsored by: Splunk Inc. > > > > > Still grepping through log files to find problems? Stop. > > > > > Now Search log events and configuration files using > > AJAX and a browser. > > > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > > _______________________________________________ > > > > > Asterisk-java-users mailing list > > > > > Ast...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > ----------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and > > a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Asterisk-java-users mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |