[asterisk-users] AMI Originate double call

Syco sycolth at gmail.com
Wed Apr 11 06:01:33 CDT 2012


Hi, probably is a problem already solved, but I cannot find a solution 
anywhere.
so:
I tried to connect to Asterisk AMI using php and telnet, but the problem 
is there anyway.

 1. I call just 18 and a playback start.
 2. then open a telnet connection and authenticate
 3. originate one new call
 4. two calls are originated ???

you could see it in the 4th and 5th line of asterisk cli:
     -- Executing [play at system:1] Answer("Local/play at system-763a;2", "") 
in new stack
     -- Executing [play at system:1] Answer("Local/play at system-763a;1", "") 
in new stack

someone know how to solve?
thanks.

extensions.conf:

    [from-sip]
    exten => 18,1,Answer()
    exten => 18,n,PlayBack(catania)
    exten => 18,n,Hangup()

    [system]
    exten => play,1,Answer()
    exten => play,n,Set(__destinatario=${destinatario})
    exten => play,n,Dial("Local/in at system",3,A(beep)L(3000))
    exten => play,n,Hangup()

    exten => in,1,Answer()
    exten => in,n,ChanSpy(${destinatario},qsWE)
    exten => in,n,Hangup()

telnet console:

    Action: Originate
    Channel: Local/play at system
    Variable: destinatario=SIP/Work-00000001
    Async: true

    Response: Success
    Message: Originate successfully queued

asterisk cli:

       == Using SIP RTP CoS mark 5
         -- Executing [18 at from-sip:1] Answer("SIP/Work-00000001", "") in
    new stack
         -- Executing [18 at from-sip:2] Playback("SIP/Work-00000001",
    "catania") in new stack
         -- <SIP/Work-00000001> Playing 'catania.gsm' (language 'en')
         -- Executing [play at system:1] Answer("Local/play at system-763a;2",
    "") in new stack
         -- Executing [play at system:1] Answer("Local/play at system-763a;1",
    "") in new stack
         -- Executing [play at system:2] Set("Local/play at system-763a;1",
    "__destinatario=SIP/Work-00000001") in new stack
         -- Executing [play at system:3] Dial("Local/play at system-763a;1",
    ""Local/in at system",3,A(beep)L(3000)") in new stack
         -- Setting call duration limit to 3.000 seconds.
         -- Called Local/in at system
         -- Executing [in at system:1] Answer("Local/in at system-9d0b;2", "")
    in new stack
         -- Local/in at system-9d0b;1 answered Local/play at system-763a;1
         -- <Local/in at system-9d0b;1> Playing 'beep.gsm' (language 'en')
         -- Executing [in at system:2] ChanSpy("Local/in at system-9d0b;2",
    "SIP/Work-00000001,qsWE") in new stack
       == Spying on channel SIP/Work-00000001
         -- Executing [play at system:2] Set("Local/play at system-763a;2",
    "__destinatario=SIP/Work-00000001") in new stack
         -- Executing [play at system:3] Dial("Local/play at system-763a;2",
    ""Local/in at system",3,A(beep)L(3000)") in new stack
         -- Setting call duration limit to 3.000 seconds.
         -- Called Local/in at system
         -- Local/play at system-763a;2 requested special control 20,
    passing it to Local/in at system-9c17;1
         -- Executing [in at system:1] Answer("Local/in at system-9c17;2", "")
    in new stack
         -- Local/in at system-9c17;1 answered Local/play at system-763a;2
         -- <Local/in at system-9c17;1> Playing 'beep.gsm' (language 'en')
         -- Executing [in at system:2] ChanSpy("Local/in at system-9c17;2",
    "SIP/Work-00000001,qsWE") in new stack
       == Spying on channel SIP/Work-00000001
       == Spawn extension (system, play, 3) exited non-zero on
    'Local/play at system-763a;1'
       == Spawn extension (system, play, 3) exited non-zero on
    'Local/play at system-763a;2'
       == Done Spying on channel SIP/Work-00000001
         -- Stopped spying due to the spied-on channel hanging up.
       == Spawn extension (system, in, 2) exited non-zero on
    'Local/in at system-9d0b;2'
       == Done Spying on channel SIP/Work-00000001
         -- Stopped spying due to the spied-on channel hanging up.
       == Spawn extension (system, in, 2) exited non-zero on
    'Local/in at system-9c17;2'
       == Spawn extension (from-sip, 18, 2) exited non-zero on
    'SIP/Work-00000001'


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120411/d0cf795a/attachment.htm>


More information about the asterisk-users mailing list