[Asterisk-java-users] Dialing via the Manager interface
Brought to you by:
srt
|
From: Darnell G. <da...@bi...> - 2005-06-07 02:44:53
|
Hello,
Perhaps I'm just thick, but, I can't seem to get my head around the proper
syntax for specifying a channel when dialing out via IAX through the Manager
interface and its related context in extensions.conf.
I'm attempting to dial a PSTN # via NuFone using IAX rather than SIP to a
extension.
My code snippet below shows what I am attempting to do:
------ snip -----
// Create an OriginateAction instance to fire off our call...
originateAction = new OriginateAction();
originateAction.setChannel("IAX2/NuFone");
originateAction.setContext("nufone-outgoing");
originateAction.setExten(phoneNumber);
originateAction.setPriority(new Integer(priority));
originateAction.setTimeout(new Integer(timeout));
try
{
currentMode = EXECUTING_COMMAND;
originateResponse = mc.sendAction(originateAction, timeout);
currentMode = IDLE;
}
catch(IOException ioe)
{
throw new AVRManagerException(ioe);
}
catch(TimeoutException te)
{
throw new AVRManagerException(te);
}
-----------------------
From my extensions.conf file the nufone-outgoing context
[nufone-ougoing]
exten => _1NXXNXXXXXX,1,Dial,IAX2/NuFone
-----------------------------------
From the Asterisk console (IP addresses and phone #'s changed for
privacy...):
== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'manager' logged on from 208.XX.XXX.XXX
-- Call accepted by 66.225.202.72 (format ulaw)
-- Format for call is ulaw
-- Executing Dial("IAX2/NuFone/3", "IAX2/NuFone") in new stack
-- Called NuFone
-- Hungup 'IAX2/NuFone/4'
== Spawn extension (nufone-outgoing, 18003253535, 1) exited non-zero on
'IAX2/NuFone/3'
-- Hungup 'IAX2/NuFone/3'
-- Call accepted by 66.225.202.72 (format ulaw)
== Manager 'manager' logged off from 208.XX.XXX.XXX
--------------------
Help.
Thanks,
- Darnell Gadberry
|