Michel Koenen
2005-Aug-27 14:41 UTC
[Asterisk-Users] How to use * and # as part of number in dial command
Hi all, I am struggling with the following and I can't get it work: In the Netherlands where I live it is possible to use special codes (aka vertical service codes) to set special 'behaviour' of phonecalls. So e.g. when I want to dial out with a normal phone and I dial *31*<phonenumber to dial> then it will turn off my numberindication (CID) at the called party. They seem to call this the 'keypad protocol' but I cannot find this term when searching through asterisk documents. My asterisk system is connected to an ISDN line with HFC card. I use zaphfc module for that. In my extensions I tried several things to dial out and use the *31* but without success. E.g.: 2000,1,Dial(Zap/4/*31*040268000) When I dial 2000 , the verbose logging shows below (Zap2-1 is my internal phone , Zap/4 is connected to outside ISDN line. -- Executing Dial("Zap/2-1", "Zap/4/*31*040268000") in new stack -- Requested transfer capability: 0x10 - 3K1AUDIO -- Called 4/*31*040268000 -- Zap/4-1 is making progress passing it to Zap/2-1 -- Channel 0/1, span 2 got hangup Aug 27 23:32:28 WARNING[17591]: app_dial.c:412 wait_for_answer: Unable to forward voice -- Hungup 'Zap/4-1' == No one is available to answer at this time -- Channel 0/2, span 1 got hangup -- Hungup 'Zap/2-1' When setting up an open link to channel and then dial the rest myself: 2001,1,Dial(zap/4,,) I get the same message as soon as I press the second * in (*31*) Is it not working because the zap channel doesn't support this ? Are there other channels who do support this? Or am I doing something wrong and do I have to use another way to get this done? Thank you in advance for your help. Best regards, Michel Koenen
Francesco Peeters
2005-Aug-28 01:45 UTC
[Asterisk-Users] How to use * and # as part of number in dial command
On Sat, August 27, 2005 23:41, Michel Koenen said:> Hi all, > > I am struggling with the following and I can't get it work: > > In the Netherlands where I live it is possible to use special codes > (aka vertical service codes) to set special 'behaviour' of phonecalls. > So e.g. when I want to dial out with a normal phone and I dial > *31*<phonenumber to dial> then it will turn off my numberindication > (CID) at the called party. They seem to call this the 'keypad > protocol' but I cannot find this term when searching through asterisk > documents. > > My asterisk system is connected to an ISDN line with HFC card. I use > zaphfc module for that. In my extensions I tried several things to > dial out and use the *31* but without success. >A few others are: Call forwarding: *21*<number># / #21# Delayed forwarding: *61*<number># / #21# Busy forwarding: *63*<number># / #63# (the ## numbers are to disable the service) I am glad to see this topic come up before I ran in to it myself! ;-) I'm curious about the answers... -- Francesco Peeters ---- GPG Key = AA69 E7C6 1D8A F148 160C D5C4 9943 6E38 D5E3 7704 If your program doesn't recognize my signature, please visit http://www.CAcert.org/index.php?id=3 to retrieve the Root CA certificate.
Damon Estep
2005-Aug-28 07:47 UTC
[Asterisk-Users] How to use * and # as part of number in dial command
* # are valid in a dialplan you would start your exten => with the vertical service code *21* then play prompt, collect digits, play prompt, dial ${exten}$(var_for_collected_digits} BUT, unless I have missed something, You can just send *21* to the PSTN and then follow their prompts! As long as DTMF is configured correctly it should work. If they don't prompt you still dial the same way, activate the vertical service code with *21* Exten *21*,1,Dial(ZAP/CHAN/{$EXTEN}) That's all! Then just enter the rest of the digits, allowing the PSTN switch to collect the DTMF and activate the code. You may want to use something like this to specify which ZAP channel your forward (or which line). Add a line number first like this Exten 1*21*,1,Dial(ZAP/CH1/*21*) Notice we don't send the 1, but we do use it to pick the zap channel.>From the wiki pageshttp://www.voip-info.org/tiki-index.php?page=Asterisk+config+extensions. conf Extensions An extension can be one of two types: a literal or a pattern. A literal extension can be a number, like 123, and it can also contain the standard symbols * and # that appear on ordinary telephones, so 12#89* is a valid extension. Some telephone keypads have the special DTMF keys labeled A, B, C and D, and extensions can be defined with these letters too. In fact, the name of a extension can contain any letter or number as well as some punctuation marks. Note that many VOIP telephones are able to "dial" extension "numbers" that may be any arbitrary text string, such as "Office". It is perfectly permissible to define an extension with the name Office in Asterisk. Are extension names case sensitive? Well, they are and they aren't. They are case sensitive in the sense that when Asterisk is trying to match the extension a user dialed against the extensions defined for a context, the extension must match, including case. So if a user dials extension "OFFICE" using their VOIP telephone, Asterisk will not start executing the commands you have defined for an extension named "Office". On the other hand, extension names are not case sensitive in the sense that you can not define different extensions (in the one context) that have the same names differing only in case. So you can't define one set of commands for extension "Office" and another set of commands for extension "OFFICE".> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Francesco Peeters > Sent: Sunday, August 28, 2005 2:45 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] How to use * and # as part of number indial> command > > On Sat, August 27, 2005 23:41, Michel Koenen said: > > Hi all, > > > > I am struggling with the following and I can't get it work: > > > > In the Netherlands where I live it is possible to use special codes > > (aka vertical service codes) to set special 'behaviour' ofphonecalls.> > So e.g. when I want to dial out with a normal phone and I dial > > *31*<phonenumber to dial> then it will turn off my numberindication > > (CID) at the called party. They seem to call this the 'keypad > > protocol' but I cannot find this term when searching throughasterisk> > documents. > > > > My asterisk system is connected to an ISDN line with HFC card. I use > > zaphfc module for that. In my extensions I tried several things to > > dial out and use the *31* but without success. > > > > A few others are: > Call forwarding: *21*<number># / #21# > Delayed forwarding: *61*<number># / #21# > Busy forwarding: *63*<number># / #63# > > (the ## numbers are to disable the service) > > I am glad to see this topic come up before I ran in to it myself! ;-)I'm> curious about the answers... > > > -- > Francesco Peeters > ---- > GPG Key = AA69 E7C6 1D8A F148 160C D5C4 9943 6E38 D5E3 7704 > If your program doesn't recognize my signature, please visit > http://www.CAcert.org/index.php?id=3 to retrieve the Root CAcertificate.> _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Michel Koenen
2005-Aug-28 14:31 UTC
[Asterisk-Users] How to use * and # as part of number in dial command
Hi Damon and others, Your example is still doing what I tried already, so eventually the dial command ends like: Dial(zap/4/*21*) or Dial(zap/4/*31*) I prefer to use Dial(zap/4/*21*<thenumber>) or Dial(zap/4/*31*<thenumber>) But whatever I try, the error message as in my first post shows up and the line hangs up before the connection is made. So I assume the so called 'keypad protocol' which is used here in the Netherlands and possible in other countries is messing it up. I still hope there is somebody out there who can help out. Btw: my problem is not about how to use the Asterisk extension (because that can be any extension where I want to put the dial command after). Best regards, Michel Koenen Damon Estep wrote:>* # are valid in a dialplan>you would start your exten => with the vertical service code *21* >then play prompt, collect digits, play prompt, dial >${exten}$(var_for_collected_digits}>BUT, unless I have missed something, You can just send *21* to the PSTN >and then follow their prompts! As long as DTMF is configured correctly >it should work. If they don't prompt you still dial the same way, >activate the vertical service code with *21*>Exten *21*,1,Dial(ZAP/CHAN/{$EXTEN})>That's all! Then just enter the rest of the digits, allowing the PSTN >switch to collect the DTMF and activate the code.>You may want to use something like this to specify which ZAP channel >your forward (or which line).>Add a line number first like this>Exten 1*21*,1,Dial(ZAP/CH1/*21*)>Notice we don't send the 1, but we do use it to pick the zap channel.