Re: [asterisk-users] How to check a number online or offline

2011-01-11 Thread Phuong Hoang
Hi Dhaval, Can you say how to fire action on AMI in this case and recieve response on AMI. I also tried to do with HangupAction and RedirectAction action (using asterisk-java library) in application java (AMI) to hang up or redirect a channel that is online at the extension on asterisk but not

Re: [asterisk-users] How to check a number online or offline

2011-01-11 Thread DHAVAL INDRODIYA
Hi Phuong, i see your code is looking nice and there is no problem in implementation , if you have any problem then first send me manager.conf file then try to connect through manager using telnet and then fire same action on this in that you can get proper error codes . one more thing the

Re: [asterisk-users] How to check a number online or offline

2011-01-11 Thread Phuong Hoang
Hi Dhaval, I fired originate action on AMI and everything is ok but redirect action not ok. here the channel i set is available and context also exists on file extension.conf . I will send manager.conf,extensions.conf and sip.conf (in Extension.rar) to you. I registered a sip phone with account

Re: [asterisk-users] How to check a number online or offline

2011-01-11 Thread Phuong Hoang
Hi Dhaval, I have`nt known you recieved my mail yet?if you did and you can answer my question then please rely to you, i am looking forward to listening your reply. Have a good nice. Thanks and best regards! Phuong. On Tue, Jan 11, 2011 at 2:11 AM, Phuong Hoang ducphuongbk200...@gmail.comwrote:

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread enkillar 87
Hi Phuong, From Asterisk CLI, run command: sip show peers Regards, Huy Nguyen Date: Sun, 9 Jan 2011 20:01:57 -0800 From: ducphuongbk200...@gmail.com To: asterisk-users@lists.digium.com Subject: [asterisk-users] How to check a number online or offline Hi all, Now i want to check a number

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Phuong Hoang
Thanks enkillar, but this is`nt thing that i need. I want to check number online, offline or unreachable on asterisk using AMI(Asterisk Manager Interface) by java but i have`nt found a solution yet. I hope you can help me do this. Thanks in advance ! On Mon, Jan 10, 2011 at 1:54 AM, enkillar 87

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Steve Howes
On 10 Jan 2011, at 10:17, Phuong Hoang wrote: Thanks enkillar, but this is`nt thing that i need. I want to check number online, offline or unreachable on asterisk using AMI(Asterisk Manager Interface) by java but i have`nt found a solution yet. I hope you can help me do this. Thanks in

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Phuong Hoang
Thanks Steve Howes, I found the link you have just sent to me but it do`nt help me to resolve this. Can you say clearlier for me? Thanks so much! On Mon, Jan 10, 2011 at 2:21 AM, Steve Howes steve-li...@geekinter.netwrote: On 10 Jan 2011, at 10:17, Phuong Hoang wrote: Thanks enkillar, but

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Steve Howes
On 10 Jan 2011, at 10:37, Phuong Hoang wrote: I found the link you have just sent to me but it do`nt help me to resolve this. Can you say clearlier for me? Not really. It's a list of manager commands. There is 'SIPshowpeer' which will work for sip stuff. Try the command 'Command' action and

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread DHAVAL INDRODIYA
Hello , You can use Dialplan function DEVICE_STATE, which will gives you perfect status of DEVICE. regards Dhaval On Mon, Jan 10, 2011 at 4:11 PM, Steve Howes steve-li...@geekinter.netwrote: On 10 Jan 2011, at 10:37, Phuong Hoang wrote: I found the link you have just sent to me but it do`nt

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Phuong Hoang
Thanks Dhaval, My purpose is that i want to use java application (using Asterisk Manager Interface) to check a number online, offline or unreachable. Your suggest uses function DEVICE_STATE but this is written in dialplan not application java. Do you know other way to do this for me?thanks and

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Jim Dickenson
You can always place a call to an extension that sends a user event from AMI. If there are no native AMI commands that can return what you want originate a call to a local extension that returns a user event. -- Jim Dickenson mailto:dicken...@cfmc.com CfMC http://www.cfmc.com/ On Jan 10,

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Phuong Hoang
Thanks Jim, Can you say about your idea clearlier? I want to use AMI in an application java to check a number online, offline or unreachable and result is returned to the appliction java. If the number is online now, i will use AMI to hangup it, else i do nothing. Best regards, Phuong. On Mon,

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Jim Dickenson
If you do an AMI packet like this: Action: Originate Channel: Local/get_i...@some_context Exten: do_noop Context: some_context Priority: 1 ActionID: GetInfo Async: true and then have a couple extensions that do what you want. Here is what I do in my case: exten = get_info,1,Answer() exten =

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread Phuong Hoang
Hi Jim, Really, I have`nt understood what you said yet. I am building a system on asterisk, and want to check a number online, offline or unreachable. If number is online on the extension then i want to redirect other extension. Redirecting is done by application java using AMI. can you help me do

Re: [asterisk-users] How to check a number online or offline

2011-01-10 Thread DHAVAL INDRODIYA
HI Phuong, JIM is right way but if you want to use extension state then there is a simple way of achiving through AMI, you need to fire this action on AMI and response have your answer , Please read about Action ExtensionState.