All, Is there a way I can perform a lookup to see if a given extension exists within a given context, on the local system? I could call Dial() and check the result of $DIALRESULT, but I'm thinking there should be a better way. Note, that I don't want to use ChanIsAvail(). That's only for determining if endpoints, ie phones, are registered. It doesn't seem to work with extensions. I am (trying) to use DUNDi. I'd like to perform a local lookup first (seeing as though DUNDi never returns the local system as a path, even when it's valid) before dialling the number via DUNDi if it isn't available. Doug.
Douglas Garstang
2006-Jun-14  14:52 UTC
[Asterisk-Users] RE: Determining if extension exists
Worked it out...
ChanIsAvail(Local/${EXTENSION}@${CONTEXT})
> -----Original Message-----
> From: Douglas Garstang 
> Sent: Wednesday, June 14, 2006 2:38 PM
> To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
> Subject: Determining if extension exists
> 
> 
> All,
> 
> Is there a way I can perform a lookup to see if a given 
> extension exists within a given context, on the local system? 
> I could call Dial() and check the result of $DIALRESULT, but 
> I'm thinking there should be a better way.
> 
> Note, that I don't want to use ChanIsAvail(). That's only for 
> determining if endpoints, ie phones, are registered. It 
> doesn't seem to work with extensions.
> 
> I am (trying) to use DUNDi. I'd like to perform a local 
> lookup first (seeing as though DUNDi never returns the local 
> system as a path, even when it's valid) before dialling the 
> number via DUNDi if it isn't available.
> 
> Doug.
> 
> 
>