Alex Lopez
2003-Dec-18 12:31 UTC
[Asterisk-Users] Different Dial tones for internal and external.
On systems even key systems it is customary to have an 'internal' dial
tone.
Since Asterisk simply ignores the 9 and keeps the tone going it is hard
to tell for some 'new users' if they can make a call.
My first idea was to change the generated dial tone via source. Then if
the user presses 9 go to a different context where I would record about
30 seconds of the normal dial tone and then let them enter the numbers
to dial. Something it this:
[internal]
exten => 123,1,macro-stdexten(blah,blah,blah)
exten => 124,1,macro-stdexten(blah,blah,blah)
exten => 125,1,macro-stdexten(blah,blah,blah)
exten => 9,1,Goto(trunkgroup,s,1)
[trunkgroup]
exten => s,1,DigitTimeout,5
exten => s,2,ResponseTimeout,10
exten => s,3,Playback(bell-dialtone)
exten => _X.,1,Dial(Zap/g2/${EXTEN})
It Works but there HAS to be a better way!!!
Maybe instead of ignorepat a changetonepat in the context.
How do others do this or am I the first????
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20031218/1ac12bde/attachment.htm
Tilghman Lesher
2003-Dec-18 13:04 UTC
[Asterisk-Users] Different Dial tones for internal and external.
On Thursday 18 December 2003 13:31, Alex Lopez wrote:> On systems even key systems it is customary to have an 'internal' > dial tone. > > Since Asterisk simply ignores the 9 and keeps the tone going it is > hard to tell for some 'new users' if they can make a call. > > My first idea was to change the generated dial tone via source. > Then if the user presses 9 go to a different context where I would > record about 30 seconds of the normal dial tone and then let them > enter the numbers to dial. Something it this: > > > [internal] > exten => 123,1,macro-stdexten(blah,blah,blah) > exten => 124,1,macro-stdexten(blah,blah,blah) > exten => 125,1,macro-stdexten(blah,blah,blah) > exten => 9,1,Goto(trunkgroup,s,1) > > [trunkgroup] > exten => s,1,DigitTimeout,5 > exten => s,2,ResponseTimeout,10 > exten => s,3,Playback(bell-dialtone) > exten => _X.,1,Dial(Zap/g2/${EXTEN}) > > > It Works but there HAS to be a better way!!! > Maybe instead of ignorepat a changetonepat in the context. > > How do others do this or am I the first????Here's how to do it: In the zaptel driver, create a new tone in zonedata.c at the END of a zone (so you don't throw off existing tone indexes). Then, in asterisk, in the specific channel driver (e.g. chan_zap.c), locate ast_ignore_pattern and change ZT_TONE_DIALTONE to the index of your new tone. You can probably use ZT_TONE_CUST1 as your index. Recompile, reinstall, restart (both the zaptel driver, as well as asterisk). -Tilghman