[asterisk-users] asterisk and IVR

Salaheddine Elharit salah.elharit200 at gmail.com
Fri Jul 26 05:34:29 CDT 2013


hi

in the CLI  i have :


1) for CONGESTION i get the status is 'CONGESTION'



Accepting call from '0666666666' to '534' on channel 0/12, span 1
    -- Executing [534 at default:1] Dial("Zap/12-1", "SIP/228| 10") in new
stack
    -- Called 228
    -- SIP/228-08361358 is ringing
    -- Got SIP response 480 "Temporarily Unavailable" back from
192.168.5.131
    -- SIP/228-08361358 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
  == Auto fallthrough, channel 'Zap/12-1' status is 'CONGESTION'


2) for no answer i get status is 'NOANSWER'


Accepting call from '0666666666' to '534' on channel 0/4, span 1
    -- Executing [534 at default:1] Dial("Zap/4-1", "SIP/228| 10") in new stack
    -- Called 228
    -- SIP/228-08362880 is ringing
 -- Nobody picked up in 10000 ms
  == Auto fallthrough, channel 'Zap/4-1' status is 'NOANSWER'


3) for answered i don't get the status is 'answered'


Accepting call from '0666666666' to '534' on channel 0/15, span 1
    -- Executing [534 at default:1] Dial("Zap/15-1", "SIP/228| 10") in new
stack
    -- Called 228
    -- SIP/228-08363bb8 is ringing
    -- SIP/228-08363bb8 answered Zap/15-1

when i have the result is 'CONGESTION'  or 'NOANSWER'i can go to the next
(home,s,1)

exten => 534,1,Dial(SIP/228, 10)
exten => 534,n,NoOp(Dial status is ${DIALSTATUS})
exten => 534,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"])
exten => 534,n,Goto(home,s,1)



how to do in order to go to the next if the result is answered

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)

thanks and regards


2013/7/25 Salaheddine Elharit <salah.elharit200 at gmail.com>

> ok thank you i will verify and i will update you
>
> thanks for your help
>
>
> 2013/7/25 A J Stiles <asterisk_list at earthshod.co.uk>
>
>> On Thursday 25 July 2013, Salaheddine Elharit wrote:
>> > thanks for your help when i use
>> >
>> > exten => s,1,NoOp(User chose support option)
>> > exten => s,n,Dial(SIP/228, 10)
>> > exten => s,n,Goto(${DIALSTATUS},1)
>> > exten => NOANSWER,1,Goto(call,s,1)
>> >
>> > with no answer i can coto [call] without issue but with answer like
>> below i
>> > can't get [call]
>> >
>> > exten => s,1,NoOp(User chose support option)
>> > exten => s,n,Dial(SIP/228, 10)
>> > exten => s,n,Goto(${DIALSTATUS},1)
>> > exten => ANSWER,1,Goto(call,s,1)
>>
>>
>> Immediately after the Dial() statement, add a line like
>> exten => s,nNoOp(Dial status is ${DIALSTATUS})
>>
>> That will show you the actual contents of ${DIALSTATUS} in the CLI  (in
>> case
>> it is not what you are expecting).  Call your extension a few times, and
>> see
>> exactly what you get when the line is answered, unanswered, engaged and
>> maybe
>> if the phone is unplugged.
>>
>> Instead of having a separate extension named after every possible value of
>> ${DIALSTATUS} it might be easier to use a GotoIf() statement to jump away
>> in
>> one case  (most sensibly, if the call was answered),  and fall through to
>> the
>> default otherwise  ("engaged" and "phone not connected" are similar
>> enough to
>> "no answer" for that probably to be what you want, barring special values
>> --
>> feel free to use more GotoIf() statements if required).
>>
>> Something like:
>>
>> exten => s,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)
>> exten => s,n,NoOp(execution continues here if no answer)
>> ...
>> exten => s,n,Hangup()
>> exten => s,n(answered),NoOp(we jump here if call was answered)
>> ...
>> exten => s,n,Hangup()
>>
>>
>> --
>> _____________________________________________________________________
>> -- 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130726/dc3a4f5d/attachment.htm>


More information about the asterisk-users mailing list