[asterisk-dev] how to export symbols from app_ and chan_ objects?

Edwin Groothuis edwin at mavetju.org
Mon Feb 20 14:49:04 MST 2006


On Mon, Feb 20, 2006 at 06:02:05PM +0100, Olle E Johansson wrote:
> >In chan_zap.c I have created a function which is used by a app_
> >function (in this case, the counting of the number of active channels
> >on a PRI. It will be used in a load-balancing function between two
> >PRIs).
> >
> >Only problem is that the function in chan_zap.so doesn't get exported
> >when it gets loaded. And AFAIK there is no other way of getting
> >this information from a non-loadable-part of asterisk.

> Check the global section in modules.conf to solve this issue,

Aha, that did the trick!

> however, in the public version we usually create core interfaces for  
> this kind of
> solutions so we do not make modules depend on each other. That is why  
> you
> see modules registering for a lot of functions, like manager,  
> switches, voicemail and
> others.

True, but this is trickier: It's asking for channel driver specific
information, for which at this moment I haven't found the proper
abstraction function. If there is such one at all.

I don't know if adding it to the [globals] section with "=> yes"
is too broad, or that it has to define the function to be exported.

Personally I was looking for an export function in the chan_zap-driver
itself, just like there is a load and unload function :-)

Edwin
-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin at mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/



More information about the asterisk-dev mailing list