[Asterisk-Users] Problems dialing to another Asterisk server
María Chóliz
mariacholiz at gmail.com
Mon Feb 27 04:17:00 MST 2006
Hi,
I have a problem dialing a SIP phone which is logged in as different
Astesrik machine from the one I am working with.
I want to call a phone in Another astersik machine in , if it answers,
calling a SiP phone registered in my ASterisk:
My dialplan is:
[mariaSIP]
exten => _1.,1,Wait(1)
exten => _1.,2,Dial(SIP/6021 at 192.168.0.51:5038,20)
exten => _1.,3,HangUp()
exten => 222,1,MusicOnHold()
exten => 444,1,Dial(${STRING3})
exten => 444,2,Ringing
SIP/6021 is the telephone logged in the another machine, which is
192.168.0.51 and asterisk is listening in 192.168.0.51, port 5038
And my Manager-java code is :
originateAction.setChannel("Local/16007 at mariaSIP/n");
originateAction.setCallerId("asterisk");
originateAction.setCallingPres(new Boolean(true));
originateAction.setContext("mariaSIP");
originateAction.setExten("222");
originateAction.setPriority(nPriority);
originateAction.setTimeout(nTimeout);
originateResponse = managerConnection.sendAction(originateAction, 30000);
if(originateResponse.getResponse().equals("Success"))
{
setVarAction.setVariable("STRING3");
setVarAction.setValue("SIP/6020");
originateResponse = managerConnection.sendAction(setVarAction, 30000);
if(originateResponse.getResponse().equals("Success"))
{
RedirectAction redirectAction = new RedirectAction();
redirectAction.setChannel(sChannel);
redirectAction.setContext("mariaSIP");
redirectAction.setExten("444");
redirectAction.setPriority (new
Integer(1));
originateResponse = managerConnection.sendAction(redirectAction,
30000); if (originateResponse.getResponse().equals("Success"))
{
....
}
....
}
My problem is that in my manager console on 192.-...-.191 I dial, but
the other asterisk doesn´t seem to realiza I am dialing.. my console
says....
Executing Wait("Local/16007 at mariaSIP-9938,2", "1") in new stack
-- Executing Dial("Local/16007 at mariaSIP-9938,2",
"SIP/6021 at 192.168.0.51:5038,20") in new stack
-- Called 6021 at 192.168.0.51:5038
-- Nobody picked up in 20000 ms
-- Executing Hangup("Local/16007 at mariaSIP-9938,2", "") in new stack
== Spawn extension (mariaSIP, 16007, 3) exited non-zero on
'Local/16007 at mariaSIP-9938,2'
Can any body help me? I will be very gratefull for any help. Thanks in advance,
--
María
More information about the asterisk-users
mailing list