Chris Coulthurst
2005-Sep-01 04:41 UTC
[Asterisk-Users] How to execute StopPlayTones when a SIP phone is answered
I'm trying to find a way to generate an 'internal extensions' tonelist but I can't seem to find anything on how to do this. My idea was to start a Playtones(intercom) tonelist and not indicate ringing to the line (dead air). But then, somehow StopPlayTones needs to be run once the ringing telephone picks up. This seems like a dirty way to do this. I envision an option to the Dial cmd's option 'r', where you could specify a ringtone to play if not the default, i.e. In indications.conf: [us] ... ... ring = 400+450/400,0/200,400+450/400,0/2000 intercom = 400+450/400,0/200,400+450/400,0/2000 ;FRESHLY ADDED AND STOLEN FROM [uk] section. 1001,1,Dial(SIP/1001,20,r{intercom}) For what its worth, I'm trying to use the standard UK ringtones for an internal extension. This behavior mimics several different PBXs and KSUs on the market. Does anyone have something like this working? Chris Coulthurst chris@shuksan.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050901/7e6c4677/attachment.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title></title> </head> <body bgcolor="#ffffff"> <!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><br> Would like to be able to do the following, which is typical of an internal setup:<br> <br> <ul> <li type="1" value="1">On handset pickup get some kind of internal dial tone (probably user defined in indications.conf) <li type="1" value="2">Pressing 9, for dialing an external line, to immediately switch to the PSTN dial tone. <li type="1" value="3">continue with dialing the external number </li> </li> </li> </ul> Of course I also want to be able to dial numbers, such as internal extensions, etc.<br> <br> the typical dial plan for outgoing extens is like:<br> <blockquote> ingorepat => 9<br> exten => _9.,1,Dial(Channel/${<a class="moz-txt-link-freetext" href="EXTEN:1">EXTEN:1</a>}) or similar matching pattern <br> </blockquote> but this doesn't switch the tone. The obvious choice of using<br> <blockquote> exten => 9,1,Playtones(pstn)<br> exten => 9,2,Goto(outgoing)<br> </blockquote> doesn't work, because * waits for digitTimeout seconds after the 9 is pressed, so the tone switch is not immediate.<br> Plus I'm not so sure how continued dialing can be handled.<br> <br> Any suggestions?<br> <!--+GtkHTML:<DATA class="ClueFlow" key="signature" value="0">--><!--+GtkHTML:<DATA class="ClueFlow" key="signature_name" value="uid:1113982290..8782..6@aia00627">--><br> </body> </html>