Re: [Asterisk-java-users] Hello
Brought to you by:
srt
From: Martin S. <ma...@be...> - 2007-12-03 14:23:19
|
Hello Guillermo, =20 DIALSTATUS is a channel variable that is ONLY set by the Dial() command. I can't speak to why it isn't in an originate failure response, but those OriginateSuccess and OriginalFailure appear to be deprecated in the trunk (I didn't check stable, but I'd imagine it might be good to not use them). =20 Also, the javadocs for AJ suggest the response String should be "success" or "failure", not "1". That's suspicious. =20 Have you tried just checking the channel variable with something like org.asteriskjava.manager.action.GetVarAction? =20 The only catch is that if the channel is hung up and destroyed before you get a chance to use the GetVarAction, you won't be able to find out the variables on it. Unfortunately, the Dial event also doesn't have DIALSTATUS in it (at least according to the docs for 1.4). Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of guillermo correa.paredes Sent: Saturday, December 01, 2007 3:14 PM To: ast...@li... Subject: [Asterisk-java-users] Hello =09 =09 Hi all: =09 Java asterisk is a Great library , I like a lot. =09 How I can get the DialStatus when I tried a originateAction with the library? Not a function OriginateFailureEvent.getReason() =09 =09 + OriginateFailure +=20 + OriginateFailureEvent.getUniqueId() :<null> + OriginateFailureEvent.getChannel() :ZAP/g1/0xxxxxxxxxx + OriginateFailureEvent.getContext() :incalls + OriginateFailureEvent.getUniqueId() :<null>=20 + OriginateFailureEvent.getReason() :1 <=3D=3D=3D=3D NOT=20 + OriginateFailureEvent.getExten() :1753 =09 =09 =09 =09 I want get a Dial status like this (CHANUNAVAIL), when I call in a phone SIP a get this data:=20 =09 Executing Macro("SIP/1702-09571320", "dial-result|/0xxxxxxxxxx") in new stack -- Executing NoOp("SIP/1702-09571320", "HANGUPCAUSE is 1 and DIALSTATUS is CHANUNAVAIL") in new stack <=3D I wanna this = DialStatus in java-asterisk API=20 -- Executing GotoIf("SIP/1702-09571320", "0?s|4") in new stack -- Executing Goto("SIP/1702-09571320", "cause-1|1") in new stack -- Goto (macro-dial-result,cause-1,1)=20 -- Executing NoOp("SIP/1702-09571320", "AST_CAUSE_NORMAL") in new stack -- Executing Set("SIP/1702-09571320", "LANGUAGE()=3Des") in new stack -- Executing Playback("SIP/1702-09571320", "discon-or-out-of-service") in new stack=20 =20 =09 If you see this CLI, I get the DialStatus CHANUNAVAIL but when a try a call with the managerConnection.sendAction( originateAction,30000); =09 ONLY get the OriginateFailureEvent.getReason() :1 not the DialStatus=20 =09 In a few words I wanna knowledge the DialStatus in a OriginateFailureEvent : circuits-busy, discon-or-out-of-service .... =09 =09 =09 Thanks and best regards. =09 =09 =09 =09 =09 |