[asterisk-users] adding funcionatlity to asterisk?! is it possible?!

Andrew Joakimsen joakimsen at gmail.com
Tue Jun 17 18:34:53 CDT 2008


Right now the issue I see is you are using overlapping extensions....
so maybe that's not working as expected?

you have in context sipura line exten 201, exten 201 included from
context spa and also exten 2xx included from context spa.

What you want to do with sending calls elsewhere if they are not
completed look at DIALSTATUS, e,g,:


[macro-stdexten]
;
; Standard extension macro:
;   ${ARG1} - SIP DEVICE
;   ${ARG2} - ringing seconds
;   ${ARG3} - vm-box-Nr.
;

exten => s,1,Macro(docid)
exten => s,2,Dial(SIP/${ARG1},${ARG2},r)                        ; Ring
the ${ARG1} interface, ${ARG3} seconds maximum
exten => s,3,Goto(s-${DIALSTATUS},1)            ; Jump based on status
(NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Playback(silence/1)
exten => s-NOANSWER,2,Voicemail(${ARG3},u)      ; If unavailable, send
to voicemail w/ unavail announce
exten => s-NOANSWER,3,Goto(s-${VMSTATUS},1)

exten => s-USEREXIT,1,Playback(cancelled)
exten => s-USEREXIT,2,Playback(goodbye)
exten => s-USEREXIT,3,Hangup

exten => s-SUCCESS,1,Playback(goodbye)
exten => s-SUCCESS,2,Hangup

exten => s-FAILED,1,Playback(sorry-youre-having-problems)
exten => s-FAILED,2,Playback(please-try-again-later)
exten => s-FAILED,3,Playback(goodbye)
exten => s-FAILED,4,Hangup

exten => o-CHANUNAVAIL,1,Goto(o-BUSY,1)

exten => s-BUSY,1,Playback(silence/1)
exten => s-BUSY,2,Voicemail(${ARG3},b)          ; If busy, send to
voicemail w/ busy announce
exten => s-BUSY,3,Playback(goodbye)             ; If they press #,
return to start
exten => s-BUSY,4,Hangup

exten => o,1,Goto(o-${DIALSTATUS},1)

exten => _o-.,1,Goto(o-NOANSWER,1)

exten => o-BUSY,1,Goto(s,2)

exten => o-NOANSWER,1,Playback(please-try-again)
exten => o-NOANSWER,2,GoTo(s-NOANSWER,2)

exten => _s-.,1,Goto(s-NOANSWER,1)              ; Treat anything else
as no answer

exten => a,1,Playback(this-is-the-voice-mail-system)
exten => a,2,VoicemailMain(${ARG3})             ; If they press *,
send the user into VoicemailMain

For the directory, there's a directory application built into the
voicemail system. You might want to check that out, if it fits your
needs then it's probably the simplest solution.

On Sat, Jun 14, 2008 at 5:56 AM, RoLaNd RoLaNd <r_o_l_a_n_d at hotmail.com> wrote:
> hello all,
>
> im looking for a way to do the following:
>
> when a SPECIFIC call comes through to asterisk through sip, i want it to b
> directed to a pool of specific sip extensions (9 extensions) where asterisk
> tries one after the other till lhe finds one of them thats actually on.
> i want to add a step for asterisk to follow which is, when a sip extension
> doesn't answer or its offline, instead of immediately transferring to voice
> mail, i want it to dial that sip holder's number so it transfers the call to
> his cellphone for example. and if he didn't answer his cellphone its then
> that i want it to direct it to voice mail.
> i want to add another item to the operator menu, instead of just receiving
> the call and telling the caller to either dial extension or 100 for
> operator, i want asterisk to offer the caller an additional option like for
> example pressing 2, would direct you to a list of key personnels with their
> respective extensions.
>
> please find below my extensions.conf:
>
>
> [sipura-line]
> exten => 201,1,Answer() ; Answer inbound calls
> exten => 201,2,Playback(silence/1)
> exten => 201,3,Background(simzy1) ; input an extension
> exten => 201,4,Wait(8)
> include => spa
> exten => 201,n,Hangup()
>
> [spa]
> exten =>_201,1,GoTo(sipura-line,${EXTEN},1)
> exten => _1XX,1,Dial(SIP/${EXTEN},15) ;each ring equals to 5 seconds, so it
> will ring 3 times
> exten => _1XX,2,VoiceMail(${EXTEN}@default)
> exten => _1XX,3,HangUp()
> exten => _2XX,1,Dial(SIP/${EXTEN},15) ;each ring equals to 5 seconds, so it
> will ring 3 times
> exten => _2XX,2,VoiceMail(${EXTEN}@default)
> exten => _2XX,3,HangUp()
> exten =>_01,1,Dial(SIP/200)
> exten => 203,1,VoicemailMain
> exten => _2XX,1,Dial(SIP/${EXTEN},15)
>
>
> ________________________________
> Invite your mail contacts to join your friends list with Windows Live
> Spaces. It's easy! Try it!
> _______________________________________________
> -- 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
>



More information about the asterisk-users mailing list