[Asterisk-Users] newbie question about making outbound call
Jason D. Wolfe
jason_d_wolfe at comcast.net
Sun Dec 25 11:07:43 MST 2005
Hello,
Somehow I've missed something here, so hopefully I'll be able to provide
enough of my setup to get some help. I feel I'm very close to getting
it, but missing something none the less...
1. I have a digium TDM400 with (2) FXO modules on channel 3 and 4 hooked
to two POTS lines.
2. I have the following entry in zapata.conf file:
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echotraining=yes
callprogress=no
context=incoming
signalling=fxs_ks
channel=>4
3. I have the following entry in extensions.conf
[callAgent]
exten=>outbound,1,Dial(Zap/4/phonenumber) ;where phonenumber is a 10
digit number
exten=>outbound,n,Playback(access-code) ; just for the sake of doing
something!
4. I am using Asterisk Java Manager AGI OriginateAction with the
following code in a jsp page running on a tomcat server:
//manageAGI
ManagerConnection managerConnection;
ManagerConnectionFactory factory;
OriginateAction originateAction;
ManagerResponse originateResponse;
factory = new ManagerConnectionFactory();
managerConnection = factory.getManagerConnection("192.168.1.4","jason",
"nosaj111");
// connect to Asterisk and log in
managerConnection.login();
originateAction = new OriginateAction();
originateAction.setAsync(true);
originateAction.setChannel("Zap/4");
originateAction.setContext("callAgent");
originateAction.setExten("outbound");
originateAction.setPriority(new Integer(1));
originateAction.setTimeout(3000);
originateResponse =
managerConnection.sendAction(originateAction, 30000);
6. when I execute the jsp page, I watch the console started with
/usr/sbin/asterisk -cvvvvvvvvvv
and I get the following message (I substituted phonenumber in for the 10
digit number again)
*CLI> == Parsing '/etc/asterisk/manager.conf': Found
== Manager 'jason' logged on from 192.168.1.3
> Channel Zap/4-1 was answered.
-- Executing Dial("Zap/4-1", "Zap/4/phonenumber") in new stack
Dec 25 10:55:40 NOTICE[3989]: app_dial.c:1010 dial_exec_full: Unable to
create channel of type 'Zap' (cause 0 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Playback("Zap/4-1", "access-code") in new stack
-- Playing 'access-code' (language 'en')
== Manager 'jason' logged off from 192.168.1.3
== Auto fallthrough, channel 'Zap/4-1' status is 'CHANUNAVAIL'
-- Hungup 'Zap/4-1'
exten => outbound,1,Hangup()
What I eventually want to accomplish is the following:
I want a web user (using a JSP page I think) to be able to click a
button and cause asterisk to dial outbound on both FXO ports, wait for
an answer, play some files, accept some input, and bridge the two calls
together.
am I on the wrong track? is there anything that is standing out that I
am just not understanding here? ANY comments will be much appreciated.
Thank you,
Jason
More information about the asterisk-users
mailing list