[asterisk-dev] enhanced 'hint' functionality

Thomas Andrews tandrews at grok.co.za
Wed Dec 6 21:11:29 MST 2006


On Wed, Dec 06, 2006 at 09:12:51PM +0100, Olle E Johansson wrote:

> 
> 6 dec 2006 kl. 20.02 skrev Thomas Andrews:
> 
> >I want to implement hints such as this:
> >
> >    exten => _2XXX,hint,agi,agi_script|${EXTEN}
> >
> >As I understand it, only global varibles may be used in hints  
> >currently.
> >
> >Does anyone know how much effort this would require for me to  
> >implement?
> >I'm not familiar with that part of the asterisk code, so I don't  
> >know if
> >I'm biting off more than I can chew. What I mean is, would this change
> >fit in reasonably well with the existing architecture?
> >
> >I'd appreciate any suggestions.
> >
> 
> So please explain what would happen with this, what's the  
> functionality you're looking for?
> 
> HINTs are not used for calling, so global variables doesn't really  
> apply there.

I want the LEDs on (eg) snom phones to light up when buttons on the
phone are associated with extensions (eg Zap channels) going active.
Snoms use the "SUBSCRIBE" feature to do this.

I want to avoid having to have hints such as this in my dialplans:

    exten => 200,hint,Zap/17
    exten => 203,hint,Zap/3
    exten => 209,hint,Zap/12
    exten => 222,hint,Zap/7
    exten => 286,hint,Zap/11

In other words I want to avoid having any hints hard-coded in the
dialplan, and would instead like variables and/or calls.

I am using agi scripts currently to look up the relationship between the
extension and the device from a sqlite db. So for example I can get
Zap/17 from the entry for 200 in the db. I now want to extend this
functionality to hints.

The reason for doing this is so that I can have a dialplan which doesn't
change - only the database changes. This makes it much easier from the
perspective of doing configuration from (eg) a web interface.

Regards,
Thomas


More information about the asterisk-dev mailing list