[Freeswitch-users] Dynamic Dialplan

kokoska rokoska kokoska.rokoska at post.cz
Tue Feb 10 13:34:30 PST 2009




Anthony Minessale napsal(a):
> That's why I chose mod_xml_curl as a demo for the xml_hook api.  It's
> not only a demo, it's rather functional =D
> 

:-))

> You have 2 choices other than using the stuff we already have in tree.
> 
> 1) write a custom dialplan module, this module gets a single callback
> function a dialplan_hunt function that has the session and the caller
> profile.  you can see from mod_enum or mod_dialplan_xml how this can be
> used to make your own module that looks in a db and returns instructions
> to FS on the fly.
> 

I try to look at it.

> 2) write a custom xml_hook and use it with mod_dialplan_xml, this type
> of module embeds itself into the xml lookups so when something tries to
> find something in the xml registry, your function is called and you can
> do your db lookups and generate the xml returned as binary xml obj built
> from a result of the query.  This is more powerfule because it allows
> you to pre-empt any xml lookups so you can deliver directory, config,
> dialplan, phrase macros, etc
> 

Super tip, Anthony! Thank you very much. In case of directory it can
dramatically increase maximu of registers per second.

> 
> mod_xml_curl is an example of #2, it turns the xml_req into a url req
> and feeds the xml returned over the http socket into an xml object and
> returns it as the result in place of the static contents of the xml file.
> 

Well I will look deep into mod_xml_curl to see how it is done and than
(may be :-) will introduce new module mod_db_directory :-)


Thanks once more, Anthony, for very valuable info!

Best regards,

kokoska.rokoska





More information about the FreeSWITCH-users mailing list