[asterisk-dev] (no subject)

Moises Silva moises.silva at gmail.com
Fri Apr 4 09:30:21 CDT 2008


Gilberto, you picked the wrong list. Try 'asterisk-users' for this matter.

Moisés Silva

On Fri, Apr 4, 2008 at 7:49 AM, gilbert saunders <gilbert8701 at yahoo.com> wrote:
> hi
>
> i have a problem.
> im new to asterisk and are trying to teach it to myself....
>
> on a normal phone when we press *21*<number> the phone is diverted or
> forwarded to that number and when we press #21#    the divert is canceled
>
> is it possible in asterisk and how do i do it i have tried some code i got
> on the voip-info i think its example 3 but it dont seem to do anything
> please help me
>
> i have attached my dial plan
>
>  ________________________________
> You rock. That's why Blockbuster's offering you one month of Blockbuster
> Total Access, No Cost.
> [general]
>  static=yes
>  writeprotect=yes
>  autofallthrough=yes
>  clearglobalvars=yes
>  priorityjumping=no
>
>
>
>
>  [globals]
>  CONSOLE=SIP/aragon
>  PSTN-1=Zap/g1
>
>  ;DYNAMIC_FEATURES=automon
>  VMBASE=/var/spool/asterisk/voicemail
>  MONITORBASE=/var/spool/asterisk/monitor
>
>
>
>  ; Extension names may be numbers, letters, or combinations
>  ; thereof. If an extension name is prefixed by a '_'
>  ; character, it is interpreted as a pattern rather than a
>  ; literal.  In patterns, some characters have special meanings:
>  ;
>  ;   X - any digit from 0-9
>  ;   Z - any digit from 1-9
>  ;   N - any digit from 2-9
>  ;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
>  ;   . - wildcard, matches anything remaining (e.g. _9011. matches
>  ;       anything starting with 9011 excluding 9011 itself)
>  ;   ! - wildcard, causes the matching process to complete as soon as
>  ;       it can unambiguously determine that no other matches are possible
>  ;
>  ; For example the extension _NXXXXXX would match normal 7 digit dialings,
>  ; while _1NXXNXXXXXX would represent an area code plus phone number
>  ; preceeded by a one.
>  ;
>  ; Each step of an extension is ordered by priority, which must
>  ; always start with 1 to be considered a valid extension.  The priority
>  ; "next" or "n" means the previous priority plus one, regardless of whether
>  ; the previous priority was associated with the current extension or not.
>  ; The priority "same" or "s" means the same as the previously specified
>  ; priority, again regardless of whether the previous entry was for the
>  ; same extension.  Priorities may be immediately followed by a plus sign
>  ; and another integer to add that amount (most useful with 's' or 'n').
>  ; Priorities may then also have an alias, or label, in
>  ; parenthesis after their name which can be used in goto situations
>  ;
>  ; Contexts contain several lines, one for each step of each
>  ; extension, which can take one of two forms as listed below,
>  ; with the first form being preferred.  One may include another
>  ; context in the current one as well, optionally with a
>  ; date and time.  Included contexts are included in the order
>  ; they are listed.
>  ;
>  ;[context]
>  ;exten => someexten,priority[+offset][(alias)],application(arg1,arg2,...)
>  ;exten => someexten,priority[+offset][(alias)],application,arg1|arg2...
>  ;
>  ; Timing list for includes is
>  ;
>  ;   <time range>|<days of week>|<days of month>|<months>
>  ;;
>  ;include => daytime|9:00-17:00|mon-fri|*|*
>
>
>  [macro-extcall]
>  exten => s,1,Answer
>  exten => s,n,Dial(${PSTN}/${MACRO_EXTEN},10,WC)
>  exten => h,1,Macro(extcall-cleanup)  ;;hangup() is called using macro
>                                      ;;
>  [macro-extcall-cleanup]
>
>  [macro-extcall-cleanup]
>  exten => s,1,Hangup
>
>
>
>  [telco-out-free]
>
>  exten => _080XXXXXXX,1,Dial(${PSTN-1}/${EXTEN},120,W)
>  exten => 1023,1,Dial(${PSTN-1}/${EXTEN}/bo,120,W)
>  exten => 1026,1,Dial(${PSTN-1}/${EXTEN}/bo,120,W)
>  exten => 10903,1,Dial(${PSTN-1}/${EXTEN}/bo,120,W)
>  exten => 10111,1,Dial(${PSTN-1}/${EXTEN}/bo,120,W)
>  exten => _1021X,1,Dial(${PSTN-1}/${EXTEN}/bo,120,W)
>  exten => 0,1,Dial(${PSTN-1}//bo,120,W)
>
>
>
>
>  [telco-out-local]
>  exten => _021ZXXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _021ZXXXXXX,2,Macro(extcall)
>
>  exten => _0860XXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _0860XXXXXX,2,Macro(extcall)
>
>
>
>  [telco-out-national]
>
>  exten => _0[1-6]ZZXXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _0[1-6]ZZXXXXXX,2,Macro(extcall)
>  exten => _086[1-2]XXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _086[1-2]XXXXXX,2,Macro(extcall)
>  exten => _087XXXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _087XXXXXXX,2,Macro(extcall)
>
>
>
>  [telco-out-mobile]
>
>  exten => _0[78][1-689]XXXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _0[78][1-689]XXXXXXX,2,Macro(extcall)
>  exten => _0[78][1-689]XXXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _0[78][1-689]XXXXXX,2,Macro(extcall)
>  exten => _0[78][1-689]XXXXX,1,SET(__PSTN=${PSTN-1})
>  exten => _0[78][1-689]XXXXX,2,Macro(extcall)
>
>
>
>  [telco-out-intl]
>  exten => _00X.,1,SET(__PSTN=${PSTN-1})
>  exten => _00X.,2,Macro(extcall)
>
>
>
>
>  [out-free]
>  include => telco-out-free
>
>
>
>  [out-local]
>  include => telco-out-local
>
>
>
>  [out-national]
>  include => telco-out-national
>
>
>
>  [out-mobile]
>  include => telco-out-mobile
>
>
>
>  [out-intl]
>  include => telco-out-intl
>
>
>
>
>  [internal]
>  include => internal-global
>  include => internal-sip
>
>
>
>
>  [internal-global]
>  exten => 100,1,Playback(demo-echotest)
>  exten => 100,2,Echo()
>
>
>
>
>  [internal-sip]
>
>
>  exten => 01,1,Dial(SIP/station01,60)
>  exten => 02,1,Dial(SIP/station02,60)
>  exten => 03,1,Dial(SIP/station03,60)
>  exten => 04,1,Dial(SIP/station04,60)
>
>  exten => 101,1,VoiceMailMain(videomail at video)
>
>
>
>
>
>  [default-forward]
>  exten =>_*21*X.,1,NoCDR
>  exten =>_*21*X.,2,Set(DB(CFIM/${CALLERID(NUM)})=${EXTEN : 4})
>  exten =>_*21*X.,3,Playback(vm-saved)
>  exten =>_*21*X.,4,hangup()
>
>  exten =>#21#,1,NoCDR
>  exten =>#21#,2,DBdel(CFIM/${CALLERID(NUM)})
>  exten =>#21#,3,Playback(auth-thankyou)
>  exten =>#21#,4,hangup()
>
>
>
>
>
>  [default]
>
>
>
>
>
>
>  [telco-in]
>
>  include => default-forward
>
>  exten => s,1,GotoIfTime(7:58-16:00|mon-fri|*|*?telco-in,s,8)
>
>  exten => s,2,Dial(SIP/station01,10) ;; false
>
>  exten => s,n,Gotoif($["${DIALSTATUS}"="BUSY"]?busy:unavail)
>  exten => s,n(unavail),VoiceMail(videomail at video,u)
>  exten => s,n,hangup()
>  exten => s,n(busy),VoiceMail(videomail at video,b)
>  exten => s,n,hangup()
>
>  exten => s,8,Dial(SIP/station02,20) ;; true
>
>  exten => s,n,Gotoif($["${DIALSTATUS}"="BUSY"]?busy:unavail)
>  exten => s,n(unavail),VoiceMail(videomail at video,u)
>  exten => s,n,hangup()
>  exten => s,n(busy),VoiceMail(videomail at video,b)
>  exten => s,13,hangup()
>
>  exten => s,n,Playback(vm-nobodyavail)
>  exten => s,n,Playback(vm-goodbye)
>
>  exten => s,n,hangup()
>
>
>
>
>
>
>
>
>
>  [sip]
>
>
>
>  include => internal
>  include => out-free
>  include => out-local
>  include => out-mobile
>  include => out-national
>  include => out-intl
>  include => default-forward
>
>
> _______________________________________________
>  --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
>  asterisk-dev mailing list
>  To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



-- 
"I do not agree with what you have to say, but I'll defend to the
death your right to say it." Voltaire



More information about the asterisk-dev mailing list