[asterisk-dev] Any plans for func_config to use sorcery?
George Joseph
george.joseph at fairview5.com
Tue Sep 17 11:56:09 CDT 2013
Continuing this discussion...
How about I create a func_sorcery module that exposes SORCERY_CONFIG.
That function would take id, type and variable as arguments, find the
object, create an objectset and search the objectset for the variable
specified. The module would also cache the objectsets so they don't
have to be generated for each call and would register as a sorcery
observer to keep the cache current (or flush it).
Make sense?
On Wed, Sep 4, 2013 at 10:32 AM, Joshua Colp <jcolp at digium.com> wrote:
> George Joseph wrote:
>>
>> Right now, func_config (which provides AST_CONFIG) isn't working well
>> with pjsip.conf because there can be multiple sections with the same
>> name (but different types). Is there a plan to port func_config to use
>> sorcery or maybe create a new function which does? I can contribute
>> time and code if given some direction.
>
>
> There's no current issue open to do so, and porting func_config to use
> sorcery wouldn't really make sense as they are completely separate beasts.
>
> Sorcery instances are also not currently shared within the system so you'd
> have to have a dialplan function specific to the user of sorcery (like the
> new SIP stuff) which exposes things. Doing so isn't that hard as sorcery
> already provides a mechanism to take a sorcery object and turn it into a key
> value pair. Use the object type and identifier to find the object, turn it
> into the key value pair, return what you want to the dialplan. Just have to
> make sure that the object is unreferenced so it doesn't (potentially) leak.
>
> That all being said... how are you using this information in the dialplan /
> why are you looking to expose it?
>
> Cheers,
>
> --
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: www.digium.com & www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list