[asterisk-users] Using * in extension name

2007-12-19 Thread Daniel Hazelbaker
I am trying to setup an extension of *7XXX that will allow me to dial  
*7 and then any extension and use the Pickup application to pickup a  
ringing phone.  Ideally it will also check if the phone is ringing  
somehow and then either dial the extension or pick it up if it is  
ringing.  But I can't get that far.  If I use *7268 specially it works  
fine, but as soon as I introduce any wild card char (X, N, Z, !, .) it  
responds with 404 and nothing is logged.

Can * be used in this manner in a dialplan?  If so then any  
suggestions on what I can check to see why it is doing this?  If not,  
does anybody have a better suggestion for me?  I'd rather not use a  
regular digit as the begin code.

Daniel Hazelbaker

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using * in extension name

2007-12-19 Thread Philipp Kempgen
Daniel Hazelbaker wrote:
 I am trying to setup an extension of *7XXX that will allow me to dial  
 *7 and then any extension and use the Pickup application to pickup a  
 ringing phone.  Ideally it will also check if the phone is ringing  
 somehow and then either dial the extension or pick it up if it is  
 ringing.  But I can't get that far.  If I use *7268 specially it works  
 fine, but as soon as I introduce any wild card char (X, N, Z, !, .) it  
 responds with 404 and nothing is logged.
 
 Can * be used in this manner in a dialplan?  If so then any  
 suggestions on what I can check to see why it is doing this?  If not,  
 does anybody have a better suggestion for me?  I'd rather not use a  
 regular digit as the begin code.

Make sure you have
_*7XXX

The leading underscore introduces a pattern.

Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
Let's use IT to solve problems and not to create new ones.
  Asterisk? - http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using * in extension name

2007-12-19 Thread Chris Tracy
 ringing.  But I can't get that far.  If I use *7268 specially it works
 fine, but as soon as I introduce any wild card char (X, N, Z, !, .) it
 responds with 404 and nothing is logged.

Obvious suggestion, but did you prepend the extension with an 
underscore to tell asterisk you wanted a pattern match?  To wit (assuming 
you're using extension.conf and not AEL, but AEL is similar):

exten = *7268,1,NoOp

will work for dialing *7268.  But:

exten = *76XX,1,NoOp

won't ever match anything because you've not told asterisk you're asking 
for a pattern.  But:

exten = _*76XX,1,NoOp

should do what you're after.

Chris

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using * in extension name

2007-12-19 Thread Mike Clark


Daniel Hazelbaker wrote:
 I am trying to setup an extension of *7XXX that will allow me to dial  
 *7 and then any extension and use the Pickup application to pickup a  
 ringing phone.  Ideally it will also check if the phone is ringing  
 somehow and then either dial the extension or pick it up if it is  
 ringing.  But I can't get that far.  If I use *7268 specially it works  
 fine, but as soon as I introduce any wild card char (X, N, Z, !, .) it  
 responds with 404 and nothing is logged.

 Can * be used in this manner in a dialplan?  If so then any  
 suggestions on what I can check to see why it is doing this?  If not,  
 does anybody have a better suggestion for me?  I'd rather not use a  
 regular digit as the begin code.

 Daniel Hazelbaker

   
You have to start with an underscore character, '_', to make wildcard 
matching work. So your extension should be _*7XXX

Mike Clark


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using * in extension name

2007-12-19 Thread Philipp Kempgen
Daniel Hazelbaker wrote:
 I am trying to setup an extension of *7XXX that will allow me to dial  
 *7 and then any extension and use the Pickup application to pickup a  
 ringing phone.  Ideally it will also check if the phone is ringing  
 somehow and then either dial the extension or pick it up if it is  
 ringing.

I'm not sure if it's possible to do anything in the dialplan
after Pickup() even if it didn't work, but you might try
something like this:

_*7. = {
Pickup(${EXTEN:[EMAIL PROTECTED]);
Dial(Local/${EXTEN:2});
}

I find your idea a bit unusal anyway because when Pickup()'ing
a call I almost never want to talk to the original callee.

Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
Let's use IT to solve problems and not to create new ones.
  Asterisk? - http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using * in extension name

2007-12-19 Thread Daniel Hazelbaker
(Hope you don't mind me replying to the list)

Okay, time for me to feel stupid.  Yes I was forgetting to start with  
an underscore.  Somehow while I was looking at all the examples it  
never clicked that that should be there. :P

Daniel

On Dec 19, 2007, at 11:34 AM, Martin Smith wrote:

 If you could show us what you ARE using (the full line of the  
 dialplan),
 I might be able to offer more suggestions. For example, with the full
 line, I might notice if you're starting the pattern with the  
 underscore,
 which I believe is required to pattern match *at all*.

 Martin Smith, Systems Developer
 [EMAIL PROTECTED]
 Bureau of Economic and Business Research
 University of Florida
 (352) 392-0171 Ext. 221



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Daniel Hazelbaker
 Sent: Wednesday, December 19, 2007 2:21 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] Using * in extension name

 I am trying to setup an extension of *7XXX that will allow me
 to dial
 *7 and then any extension and use the Pickup application to pickup a
 ringing phone.  Ideally it will also check if the phone is ringing
 somehow and then either dial the extension or pick it up if it is
 ringing.  But I can't get that far.  If I use *7268 specially
 it works
 fine, but as soon as I introduce any wild card char (X, N, Z,
 !, .) it
 responds with 404 and nothing is logged.

 Can * be used in this manner in a dialplan?  If so then any
 suggestions on what I can check to see why it is doing this?
 If not,
 does anybody have a better suggestion for me?  I'd rather not use a
 regular digit as the begin code.

 Daniel Hazelbaker

 ___
 --Bandwidth and Colocation Provided by http://www.api-digital.com--

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using * in extension name

2007-12-19 Thread Daniel Hazelbaker
Just to finish off this thread for anybody else who wants the same  
functionality:

As Philipp coded out, what I was originally doing was something akin  
to the following:

_*7. = {
Pickup(${EXTEN:[EMAIL PROTECTED]);
Dial(Local/${EXTEN:2});
}

Somebody else wondered why I would do this as I wouldn't want to talk  
to the original callee.  Pickup() will never return if it successfully  
picks up the call.  So if it does return then we can assume (for now)  
that the phone is not ringing and then proceed to dial the number.

As I said, this did work perfectly.  However, I discovered that the  
Grandstream phones we use automatically prepend ** to the monitored  
extension.  So if the phone is not ringing it will dial 268, if the  
phone is ringing it will dial **268.  So in the end I ended up with:

_**. = { Pickup(${EXTEN:[EMAIL PROTECTED]); }

And all works perfectly.  Obviously for other phones I would have to  
come up with something else like the above, but with the grandstreams  
it seems to work great.

Daniel

On Dec 19, 2007, at 11:48 AM, Daniel Hazelbaker wrote:

 (Hope you don't mind me replying to the list)

 Okay, time for me to feel stupid.  Yes I was forgetting to start  
 with an underscore.  Somehow while I was looking at all the examples  
 it never clicked that that should be there. :P

 Daniel

 On Dec 19, 2007, at 11:34 AM, Martin Smith wrote:

 If you could show us what you ARE using (the full line of the  
 dialplan),
 I might be able to offer more suggestions. For example, with the full
 line, I might notice if you're starting the pattern with the  
 underscore,
 which I believe is required to pattern match *at all*.

 Martin Smith, Systems Developer
 [EMAIL PROTECTED]
 Bureau of Economic and Business Research
 University of Florida
 (352) 392-0171 Ext. 221



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Daniel Hazelbaker
 Sent: Wednesday, December 19, 2007 2:21 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] Using * in extension name

 I am trying to setup an extension of *7XXX that will allow me
 to dial
 *7 and then any extension and use the Pickup application to pickup a
 ringing phone.  Ideally it will also check if the phone is ringing
 somehow and then either dial the extension or pick it up if it is
 ringing.  But I can't get that far.  If I use *7268 specially
 it works
 fine, but as soon as I introduce any wild card char (X, N, Z,
 !, .) it
 responds with 404 and nothing is logged.

 Can * be used in this manner in a dialplan?  If so then any
 suggestions on what I can check to see why it is doing this?
 If not,
 does anybody have a better suggestion for me?  I'd rather not use a
 regular digit as the begin code.

 Daniel Hazelbaker

 ___
 --Bandwidth and Colocation Provided by http://www.api-digital.com--

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users





___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users