* PLEASE NOTE: YOUR RESPONSE BELONGS AT THE END, NOT HERE *

On Wednesday 31 July 2013, Salaheddine Elharit wrote:
> hello,
> 
> the CLI for whe the call is answered  :
> 
> Accepting call from '0661xxxxxx' to '534' on channel 0/26, span 1
>     -- Executing [534@default:1] Dial("Zap/26-1", "SIP/228| 10") in new
> stack
>     -- Called 228
>     -- SIP/228-09e71378 is ringing
>     -- SIP/228-09e71378 answered Zap/26-1
>   == Spawn extension (default, 534, 1) exited non-zero on 'Zap/26-1'
>     -- Hungup 'Zap/26-1'
> srvradio*CLI>
> 
> the CLI for whe the call is no answer  :
> 
> Accepting call from '0661xxxxxx' to '534' on channel 0/23, span 1
>     -- Executing [534@default:1] Dial("Zap/23-1", "SIP/228| 10") in new
> stack
>     -- Called 228
>     -- SIP/228-09e8b4b0 is ringing
>    -- Nobody picked up in 10000 ms
>     -- Executing [534@default:2] NoOp("Zap/23-1", "Dial status is
> NOANSWER") in new stack
>     -- Executing [534@default:3] GotoIf("Zap/23-1", "0?answered") in new
> stack
>     -- Executing [534@default:4] Goto("Zap/23-1", "home|s|1") in new stack
>     -- Goto (home,s,1)
>     -- Executing [s@home:1] SetGlobalVar("Zap/23-1",
> "sounds_path=/var/lib/asterisk/sounds/") in new stack
>   == Setting global variable 'sounds_path' to '/var/lib/asterisk/sounds/'
>     -- Executing [s@home:2] BackGround("Zap/23-1",
> "/var/lib/asterisk/sounds/welcome") in new stack
>     -- <Zap/23-1> Playing '/var/lib/asterisk/sounds/welcome' (language
> 'en')
> 
>     -- Channel 0/23, span 1 got hangup request, cause 16
>   == Spawn extension (home, s, 2) exited non-zero on 'Zap/23-1'
>     -- Hungup 'Zap/23-1'


Right.  I can see what is going on now.  After executing step 1, Dial(), if 
the call was answered and hung up, the dialplan is not going on to step 2.  
So, try adding a step 102:

exten => 534,1,Dial(SIP/228, 10)
exten => 534,n,NoOp(Dial status is ${DIALSTATUS})
exten => 534,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)
exten => 534,n,Goto(home,s,1)
exten => 534,n(answered),NoOp(Call was answered)
exten => 534,102,NoOp(We reached step 102)
 
See what happens now if the call is answered.  If you get "We reached step 
102", then this is where your "answered" stuff needs to be.

-- 
AJS

Answers come *after* questions.


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to