VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
jsa at svep.se Guest
|
Posted: Thu Feb 14, 2008 7:17 am Post subject: [asterisk-users] Error checking asterisk method - suggestion |
|
|
Hi there dear users and dear developers of Asterisk!
I've got a maybe strange idea, let's see if you laugh or think it's reasonable J
I'm using Asterisk with Digium TDM800P cards with 24 lines (as an answering machine).
Each analog line can be reached through a phonenumber, since they are each connected to my telephone provider. Yes expensive I know J
The challenge:
I'd like to somehow verify that my 1) TDM800P cards and 2) the analog lines, and 3) my operator is alive and working, and I have an Idea which I wonder if will/could work.
My first idea was to ask the zap-driver if it could detect if the line was ok, but no function existed to do that, what I could find. Anyone knows about one?
My second idea, was to try calling simply, to know if things were ok. But, I couldn't just call any number, I had to know the number was in use, and not disturbing anyone.
So, I called myself, or I called another of my phonelines.
So,
I'd like to use the asterisk manager interface in java to originate a call from one ZAP-channel, calling out to my telephone provider,
And then they will direct the call back to my, but into another ZAP-channel (since I'm calling that channel's number).
So: I'm making ZAP/1 calling out to no 323121321 -> telephone company, Ok: 323121321 belongs to this guy -> redirecting me to my ZAP/2 channel, which answers the call.
Then I have a connection, and ZAP/2 will answer and do some DTMF.
My first ZAP/1 is run through my java program, and I'd like to listen for certain DTMF-tones, to know I have a working circuit.
The goal for all of this, is to verify things are working, so my provider is not down, or one of my ZAP-lines are dead.
So far, I've tried calling and got some half-success, but not sure what is going on doing all the right way.
For ex: why am I calling with Zap1, to Zap 3, and then Zap 7 is answering? 3 channels used for one outgoing and one incoming call? Something must be very wrong J
Please educate me, dear experts.
Input?
Sincerely,
Johan Sandgren
www.svep.se<http://www.svep.se>, jsa at svep.se
Frosty Sweden but with some sunshine today !! J
My code and settings below, for information.
=============JAVA CODE (extract)
OriginateAction originateAction = new OriginateAction();
ManagerResponse originateResponse = null;
originateAction.setChannel("ZAP/1");
originateAction.setContext("Outgoing");
originateAction.setExten("201"); // maps to ZAP/7 through external phonecompany PBX
originateAction.setPriority(new Integer(1));
originateAction.setTimeout(new Long(15*1000)); // xml-milliseconds
originateAction.setAsync(false);
============== extensions.conf (extract)
[Incoming]
exten => s,1,Set(DYNAMIC_FEATURES=hangup)
exten => s,2,Agi(agi://localhost/answer.agi)
[Outgoing]
exten => _X.,1,Set(DYNAMIC_FEATURES=hangupfeature)
exten => _X.,n,Dial(Zap/3/${EXTEN}
============== Asterisk response:
AGI Debugging Enabled
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'stt' logged on from 127.0.0.1
Quote: | Channel Zap/1-1 was answered.
| -- Executing [201 at Outgoing:1] Set("Zap/1-1", "DYNAMIC_FEATURES=hangupfeature") in new stack
-- Executing [201 at Outgoing:2] Dial("Zap/1-1", "Zap/3/201") in new stack
-- Called 3/201
-- Starting simple switch on 'Zap/7-1'
-- Zap/3-1 answered Zap/1-1
[Feb 14 13:02:33] WARNING[26260]: chan_zap.c:6499 ss_thread: CallerID returned with error on channel 'Zap/7-1'
-- Executing [s at Incoming:1] Set("Zap/7-1", "DYNAMIC_FEATURES=hangup") in new stack
-- Executing [s at Incoming:2] AGI("Zap/7-1", "agi://localhost/answer.agi") in new stack
AGI Tx >> agi_network: yes
AGI Tx >> agi_network_script: answer.agi
AGI Tx >> agi_request: agi://localhost/answer.agi
AGI Tx >> agi_channel: Zap/7-1
AGI Tx >> agi_language: en
AGI Tx >> agi_type: Zap
AGI Tx >> agi_uniqueid: 1202990552.2
AGI Tx >> agi_callerid: unknown
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: Incoming
AGI Tx >> agi_extension: s
AGI Tx >> agi_priority: 2
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << ANSWER
AGI Tx >> 200 result=0
AGI Rx << CHANNEL STATUS
AGI Tx >> 200 result=6
AGI Rx << WAIT FOR DIGIT 10000
== Manager 'testmanager' logged off from 127.0.0.1
AGI Tx >> 200 result=0
AGI Rx << CHANNEL STATUS
AGI Tx >> 200 result=6
AGI Rx << WAIT FOR DIGIT 10000
AGI Tx >> 200 result=0
== Spawn extension (Incoming, s, 2) exited non-zero on 'Zap/7-1'
-- Hungup 'Zap/7-1'
========= Asterisk log
__________________________________________________________________
Johan Sandgren
Svep Design Center AB (www.svep.se<http://www.svep.se>)
St. Lars v?g 42A, SE-222 70 Lund
Phone: 046-19 27 22
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080214/138185f3/attachment.htm |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Thu Feb 14, 2008 7:44 am Post subject: [asterisk-users] Error checking asterisk method - suggestion |
|
|
On Thu, Feb 14, 2008 at 01:17:45PM +0100, Johan Sandgren wrote:
Quote: | Hi there dear users and dear developers of Asterisk!
I've got a maybe strange idea, let's see if you laugh or think it's reasonable J
I'm using Asterisk with Digium TDM800P cards with 24 lines (as an answering machine).
Each analog line can be reached through a phonenumber, since they are each connected to my telephone provider. Yes expensive I know J
The challenge:
I'd like to somehow verify that my 1) TDM800P cards and 2) the analog lines, and 3) my operator is alive and working, and I have an Idea which I wonder if will/could work.
My first idea was to ask the zap-driver if it could detect if the line
was ok, but no function existed to do that, what I could find. Anyone
knows about one?
|
What do you mean by "line is OK"?
Quote: |
My second idea, was to try calling simply, to know if things were ok.
But, I couldn't just call any number, I had to know the number was in
use, and not disturbing anyone.
So, I called myself, or I called another of my phonelines.
|
And you assume noone else calls in at the time?
Quote: |
So,
I'd like to use the asterisk manager interface in java to originate a
call from one ZAP-channel, calling out to my telephone provider,
And then they will direct the call back to my, but into another
ZAP-channel (since I'm calling that channel's number).
|
For a basic test that the line works, try TestClient and TestServer .
Originate a call from testclient (and set there the number. And set all
incoming calls temporarily to go to TestServer (did I mention the
assumption that noone calls in?)
One relatively cheap method of "temporary" is through setting a global
variable to a non-standard value. This means that the non-default value
will never last after a reload. And you can set the global even through
'core set global VARNAME VALUE' in the CLI.
Check the resulting reports in /var/lib/asterisk/testresults . Make sure
all of them were generated, and that none "FAIL"-ed.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|