<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi, probably is a problem already solved, but I cannot find a
solution anywhere.<br>
so:<br>
I tried to connect to Asterisk AMI using php and telnet, but the
problem is there anyway.<br>
<ol>
<li>I call just 18 and a playback start.</li>
<li>then open a telnet connection and authenticate</li>
<li>originate one new call</li>
<li>two calls are originated ???<br>
</li>
</ol>
you could see it in the 4th and 5th line of asterisk cli:<br>
-- Executing [play@system:1] Answer("Local/play@system-763a;2",
"") in new stack<br>
-- Executing [play@system:1] Answer("Local/play@system-763a;1",
"") in new stack<br>
<br>
someone know how to solve?<br>
thanks.<br>
<br>
extensions.conf:<br>
<blockquote>[from-sip]<br>
exten => 18,1,Answer()<br>
exten => 18,n,PlayBack(catania)<br>
exten => 18,n,Hangup()<br>
<br>
[system]<br>
exten => play,1,Answer()<br>
exten => play,n,Set(__destinatario=${destinatario})<br>
exten => play,n,Dial("Local/in@system",3,A(beep)L(3000))<br>
exten => play,n,Hangup()<br>
<br>
exten => in,1,Answer()<br>
exten => in,n,ChanSpy(${destinatario},qsWE)<br>
exten => in,n,Hangup()<br>
</blockquote>
telnet console:<br>
<blockquote>Action: Originate<br>
Channel: Local/play@system<br>
Variable: destinatario=SIP/Work-00000001<br>
Async: true<br>
<br>
Response: Success<br>
Message: Originate successfully queued<br>
</blockquote>
asterisk cli:<br>
<blockquote> == Using SIP RTP CoS mark 5<br>
-- Executing [18@from-sip:1] Answer("SIP/Work-00000001", "")
in new stack<br>
-- Executing [18@from-sip:2] Playback("SIP/Work-00000001",
"catania") in new stack<br>
-- <SIP/Work-00000001> Playing 'catania.gsm' (language
'en')<br>
-- Executing [play@system:1]
Answer("Local/play@system-763a;2", "") in new stack<br>
-- Executing [play@system:1]
Answer("Local/play@system-763a;1", "") in new stack<br>
-- Executing [play@system:2] Set("Local/play@system-763a;1",
"__destinatario=SIP/Work-00000001") in new stack<br>
-- Executing [play@system:3] Dial("Local/play@system-763a;1",
""Local/in@system",3,A(beep)L(3000)") in new stack<br>
-- Setting call duration limit to 3.000 seconds.<br>
-- Called Local/in@system<br>
-- Executing [in@system:1] Answer("Local/in@system-9d0b;2",
"") in new stack<br>
-- Local/in@system-9d0b;1 answered Local/play@system-763a;1<br>
-- <Local/in@system-9d0b;1> Playing 'beep.gsm' (language
'en')<br>
-- Executing [in@system:2] ChanSpy("Local/in@system-9d0b;2",
"SIP/Work-00000001,qsWE") in new stack<br>
== Spying on channel SIP/Work-00000001<br>
-- Executing [play@system:2] Set("Local/play@system-763a;2",
"__destinatario=SIP/Work-00000001") in new stack<br>
-- Executing [play@system:3] Dial("Local/play@system-763a;2",
""Local/in@system",3,A(beep)L(3000)") in new stack<br>
-- Setting call duration limit to 3.000 seconds.<br>
-- Called Local/in@system<br>
-- Local/play@system-763a;2 requested special control 20,
passing it to Local/in@system-9c17;1<br>
-- Executing [in@system:1] Answer("Local/in@system-9c17;2",
"") in new stack<br>
-- Local/in@system-9c17;1 answered Local/play@system-763a;2<br>
-- <Local/in@system-9c17;1> Playing 'beep.gsm' (language
'en')<br>
-- Executing [in@system:2] ChanSpy("Local/in@system-9c17;2",
"SIP/Work-00000001,qsWE") in new stack<br>
== Spying on channel SIP/Work-00000001<br>
== Spawn extension (system, play, 3) exited non-zero on
'Local/play@system-763a;1'<br>
== Spawn extension (system, play, 3) exited non-zero on
'Local/play@system-763a;2'<br>
== Done Spying on channel SIP/Work-00000001<br>
-- Stopped spying due to the spied-on channel hanging up.<br>
== Spawn extension (system, in, 2) exited non-zero on
'Local/in@system-9d0b;2'<br>
== Done Spying on channel SIP/Work-00000001<br>
-- Stopped spying due to the spied-on channel hanging up.<br>
== Spawn extension (system, in, 2) exited non-zero on
'Local/in@system-9c17;2'<br>
== Spawn extension (from-sip, 18, 2) exited non-zero on
'SIP/Work-00000001'<br>
</blockquote>
<br>
</body>
</html>