[asterisk-users] Using * in extension name

Daniel Hazelbaker daniel at highdesertchurch.com
Wed Dec 19 17:37:11 CST 2007


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:2}@to-users);
	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:2}@to-users); }

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
>> martins at bebr.ufl.edu
>> Bureau of Economic and Business Research
>> University of Florida
>> (352) 392-0171 Ext. 221
>>
>>
>>
>>> -----Original Message-----
>>> From: asterisk-users-bounces at lists.digium.com
>>> [mailto:asterisk-users-bounces at lists.digium.com] 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
>>>
>>
>




More information about the asterisk-users mailing list