返回列表 發帖
Just tried Asterisk reload using the keypad, it works and very convenient.  Thanks ckleea c-hing.  Well done!

TOP

Adding number to blacklist
  1. [blacklist-add]
  2. exten => *22,1,Answer
  3. same => n,Playback(enter-num-blacklist)
  4. same => n,Read(blacklist,then-press-pound,0,,2,10)
  5. same => n,SayDigits(${blacklist})
  6. same => n,Playback(if-correct-press&digits/2)
  7. same => n,Noop(Waiting for input)
  8. same => n,WaitExten(60,)
  9. same => n,Playback(sorry-youre-having-problems&goodbye)
  10. exten => 2,1,Set(DB(BLACKLIST/${blacklist})=1)
  11. same => n,Playback(num-was-successfully&added)
  12. same => n,Wait(1)
  13. same => n,Hangup
複製代碼
Removing number from blacklist
  1. [blacklist-rmv]
  2. exten => #22,1,Playback(entr-num-rmv-blklist)
  3. same => n,Read(blacklist,then-press-pound,0,,2,10)
  4. same => n,SayDigits(${blacklist})
  5. same => n,Playback(if-correct-press&digits/1)
  6. same => n,Noop(Waiting for input)
  7. same => n,WaitExten(60,)
  8. same => n,Playback(sorry-youre-having-problems&goodbye)
  9. exten => 1,1,DBdel(BLACKLIST/${blacklist})
  10. same => n,playback(removed)
  11. same => n,Hangup
複製代碼

TOP

回復 6# 角色


   
Can I use this to record other Asterisk channels?

TOP

本帖最後由 bubblestar 於 2011-10-5 22:48 編輯

回復 13# ckleea


   
If you doubt about WaitExten(), you should also check whether you have set the autofallthough = yes in the general section under extensions.conf.  They have close relationship with each other after Asterisk version greater than 1.2

http://www.voip-info.org/wiki/view/Asterisk+cmd+WaitExten

Notes
WaitExten does not work in a Macro!
The autofallthrough setting was introduced in Asterisk 1.2 now defaults to 'yes' in Asterisk 1.4; if your dialplan relies on the ability to 'run off the end' of an extension and wait for a new extension without using WaitExten() to accomplish that, you will need set autofallthrough to 'no' in your extensions.conf file. If you want to set autofallthrough to 'no', you must go through your dialplan and add WaitExten() at every place where execute would run off the end of an extension and wait for another one to be dialed.
An examination of the source code seems to suggest that TIMEOUT(response) and TIMEOUT(digit) do not have any effect on WaitExten.


For info., I have my autofallthrough set to yes from the very first beginning when setting up my server.

TOP

回復 17# ckleea


        
To my understanding, the command Answer() is set to 0.5 seconds by default when picking up the line.  If the same rule is also applied for WaitExten(), only 0.5 seconds is not enough for the caller to input all 8 to 10 digits before it expires.

Hence, I have set WaitExten(10) in my IVR to allow adequate input time.  I found that yours is just using default WaitExten().  You may try to set longer time to accommodate all 8 - 10 digits instead of just 2 as you encountered.

TOP

回復 22# ckleea


   
Thanks ckleea c-hing.  This new dialplan is even neater than the one (also using macro) that I am using.  I will replace mine with this one if it can run smoothly after test.

TOP

回復 23# ckleea


   
It seems a new improvement has been made on this code.  I will go through the details later tonight but could you briefly highlight the differences between this one with our existing macro super dial ?

TOP

That's a good idea and towards a right direction.  Our dialplan file size is getting larger and it is time to re-organize them in a systematic, manageable and easier way.

TOP

返回列表