On Fri, 2008-02-22 at 10:38 +0530, sandeep wrote:
> for example:
> dial to a extension(123).if the user didnot pick the call, caller
> should get a ivr script(Enter 1 to to dial operator  and 2 to go to
> voicemail)
> If caller press 1 it should dial to the operator,else if he dials 2 it
> should go to the voicemail of calle's extension.

It's really pretty easy.  

; Call the SIP peer, let the phone ring for 20 seconds
exten => 123,1,Dial(SIP/some_sip_peer,20)
; Play the "press-1-or-press-2" prompt, get one digit
; from the caller, and save it to a variable called
; ${option}
exten => 123,n,Read(option,press-1-or-press-2,1)
; If the caller enters 1, send the call to the [some_context] context,
; to the "operator" extension, priority 1
exten => 123,n,GotoIf($["${option}" = "1"]?some_context,operator,1)
; Otherwise, send the  call to voicemail
exten => 123,n,VoiceMail([EMAIL PROTECTED])

I haven't actually taken the time to test this in my own dialplan, but
it should work.  Obviously you'll want to change the name of the SIP
peer you're dialing, as well as the location of the operator extension.

-- 
Jared Smith
Community Relations Manager
Digium, Inc.


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Reply via email to