why is the user directory in core and not a module
Good morning, I am considering creating my own database driven user directory for user authentication to replace the current setup of using XML. My question is, why is this aspect of freeswitch built-in to the core, rather than a module? Also, since it is built-in core, other modules (IE mod_voicemail) rely upon it. Because of this, it seems nearly impossible to get away from using freeswitch's XML user directory. Wouldn't it be better to have abstract code in core that obtains the user directory information from a module (mod_user_directory could be the first module that uses XML like current standard)? This way you can use a different module for user auth. and other modules (like mod_voicemail) can still rely on core for user information? Thanks
As far I know, you can implement your own userdirectory as there is the possibility to provide a user-dir in a database (maybe through the web-request however). Michel On Wed, Feb 19, 2014 at 2:31 PM, Vik Killa <vipkilla@gmail.com> wrote:
Good morning, I am considering creating my own database driven user directory for user authentication to replace the current setup of using XML. My question is, why is this aspect of freeswitch built-in to the core, rather than a module? Also, since it is built-in core, other modules (IE mod_voicemail) rely upon it. Because of this, it seems nearly impossible to get away from using freeswitch's XML user directory. Wouldn't it be better to have abstract code in core that obtains the user directory information from a module (mod_user_directory could be the first module that uses XML like current standard)? This way you can use a different module for user auth. and other modules (like mod_voicemail) can still rely on core for user information? Thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I think what you are referring to is XML_CURL. I'm wondering how to implement a module that can provide FS with user directory information.
you would do something like mod_xml_curl, but instead of making a curl request to get xml, you would do whatever you like. On Feb 19, 2014, at 9:21 AM, Vik Killa <vipkilla@gmail.com> wrote:
I think what you are referring to is XML_CURL. I'm wondering how to implement a module that can provide FS with user directory information.
This is sufficiently outlined with samples code and examples on the wiki. Do you have specific questions that need to be addressed that aren’t on the wiki? -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Feb 19, 2014, at 8:21 AM, Vik Killa <vipkilla@gmail.com> wrote:
I think what you are referring to is XML_CURL. I'm wondering how to implement a module that can provide FS with user directory information.
I am trying to test the directory interface in my module. It seems that FS will not send the authentication request to my module's directory interface though. I know it is loaded because I see: 2014-02-19 13:46:46.056080 [NOTICE] switch_loadable_module.c:429 Adding Directory interface 'test_directory' I have some debug lines in my module to display when the interface is run but i don't see the debugging. Also, i loaded mod_ldap to test and it will not get queried by FS either. Is there a FS parameter or setting that is needed to tell it to use the alternate directory interface? Thanks
You are confusing the directory interface "wrapper for ldap" with the FS Directory (The XML Registry) How the XML Registry works is extensively documented in the wiki and our FS book. The gist is that the XML is the abstraction layer; So you can write modules to seek things from the XML and not worry about external access. Then you write modules that bind to xml searches and pre-empt the static xml by returning your own binary xml object with the correct data. xml_curl and xml_scgi are the 2 in-house examples that transform the xml search into a url and fetch the xml from a remote service but you can also easily make a binding module to parse xml searches, do sql stmts and format the results in a binary xml obj without ever using textual xml markup. On Wed, Feb 19, 2014 at 12:49 PM, Vik Killa <vipkilla@gmail.com> wrote:
I am trying to test the directory interface in my module. It seems that FS will not send the authentication request to my module's directory interface though. I know it is loaded because I see:
2014-02-19 13:46:46.056080 [NOTICE] switch_loadable_module.c:429 Adding Directory interface 'test_directory'
I have some debug lines in my module to display when the interface is run but i don't see the debugging. Also, i loaded mod_ldap to test and it will not get queried by FS either. Is there a FS parameter or setting that is needed to tell it to use the alternate directory interface?
Thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
I am quite confused. Is there no way to create a module that serve's User Agent authentication information to FS? On Wed, Feb 19, 2014 at 2:09 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
You are confusing the directory interface "wrapper for ldap" with the FS Directory (The XML Registry)
How the XML Registry works is extensively documented in the wiki and our FS book.
The gist is that the XML is the abstraction layer; So you can write modules to seek things from the XML and not worry about external access. Then you write modules that bind to xml searches and pre-empt the static xml by returning your own binary xml object with the correct data.
xml_curl and xml_scgi are the 2 in-house examples that transform the xml search into a url and fetch the xml from a remote service but you can also easily make a binding module to parse xml searches, do sql stmts and format the results in a binary xml obj without ever using textual xml markup.
On Wed, Feb 19, 2014 at 12:49 PM, Vik Killa <vipkilla@gmail.com> wrote:
I am trying to test the directory interface in my module. It seems that FS will not send the authentication request to my module's directory interface though. I know it is loaded because I see:
2014-02-19 13:46:46.056080 [NOTICE] switch_loadable_module.c:429 Adding Directory interface 'test_directory'
I have some debug lines in my module to display when the interface is run but i don't see the debugging. Also, i loaded mod_ldap to test and it will not get queried by FS either. Is there a FS parameter or setting that is needed to tell it to use the alternate directory interface?
Thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Read my last post a few more times, the wiki and possibly either edition of the FS book. https://wiki.freeswitch.org/wiki/Xml_curl On Wed, Feb 19, 2014 at 1:31 PM, Vik Killa <vipkilla@gmail.com> wrote:
I am quite confused. Is there no way to create a module that serve's User Agent authentication information to FS?
On Wed, Feb 19, 2014 at 2:09 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
You are confusing the directory interface "wrapper for ldap" with the FS Directory (The XML Registry)
How the XML Registry works is extensively documented in the wiki and our FS book.
The gist is that the XML is the abstraction layer; So you can write modules to seek things from the XML and not worry about external access. Then you write modules that bind to xml searches and pre-empt the static xml by returning your own binary xml object with the correct data.
xml_curl and xml_scgi are the 2 in-house examples that transform the xml search into a url and fetch the xml from a remote service but you can also easily make a binding module to parse xml searches, do sql stmts and format the results in a binary xml obj without ever using textual xml markup.
On Wed, Feb 19, 2014 at 12:49 PM, Vik Killa <vipkilla@gmail.com> wrote:
I am trying to test the directory interface in my module. It seems that FS will not send the authentication request to my module's directory interface though. I know it is loaded because I see:
2014-02-19 13:46:46.056080 [NOTICE] switch_loadable_module.c:429 Adding Directory interface 'test_directory'
I have some debug lines in my module to display when the interface is run but i don't see the debugging. Also, i loaded mod_ldap to test and it will not get queried by FS either. Is there a FS parameter or setting that is needed to tell it to use the alternate directory interface?
Thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
I already use XML_CURL to dynamically provide the user directory. I am interested in writing a module in C to provide the user directory. I want the module to use PostgreSQL to populate user information and give it to FreeSWITCH. On Wed, Feb 19, 2014 at 3:01 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Read my last post a few more times, the wiki and possibly either edition of the FS book.
https://wiki.freeswitch.org/wiki/Xml_curl
On Wed, Feb 19, 2014 at 1:31 PM, Vik Killa <vipkilla@gmail.com> wrote:
I am quite confused. Is there no way to create a module that serve's User Agent authentication information to FS?
On Wed, Feb 19, 2014 at 2:09 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
You are confusing the directory interface "wrapper for ldap" with the FS Directory (The XML Registry)
How the XML Registry works is extensively documented in the wiki and our FS book.
The gist is that the XML is the abstraction layer; So you can write modules to seek things from the XML and not worry about external access. Then you write modules that bind to xml searches and pre-empt the static xml by returning your own binary xml object with the correct data.
xml_curl and xml_scgi are the 2 in-house examples that transform the xml search into a url and fetch the xml from a remote service but you can also easily make a binding module to parse xml searches, do sql stmts and format the results in a binary xml obj without ever using textual xml markup.
On Wed, Feb 19, 2014 at 12:49 PM, Vik Killa <vipkilla@gmail.com> wrote:
I am trying to test the directory interface in my module. It seems that FS will not send the authentication request to my module's directory interface though. I know it is loaded because I see:
2014-02-19 13:46:46.056080 [NOTICE] switch_loadable_module.c:429 Adding Directory interface 'test_directory'
I have some debug lines in my module to display when the interface is run but i don't see the debugging. Also, i loaded mod_ldap to test and it will not get queried by FS either. Is there a FS parameter or setting that is needed to tell it to use the alternate directory interface?
Thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
yes.. so look at the code in mod_xml_curl for how to interface with that in the c code, replace the code that pulls xml using curl with something that creates the results you need based on your sql queries. Mike On Feb 19, 2014, at 4:47 PM, Vik Killa <vipkilla@gmail.com> wrote:
I already use XML_CURL to dynamically provide the user directory. I am interested in writing a module in C to provide the user directory. I want the module to use PostgreSQL to populate user information and give it to FreeSWITCH.
On Wed, Feb 19, 2014 at 3:01 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote: Read my last post a few more times, the wiki and possibly either edition of the FS book.
https://wiki.freeswitch.org/wiki/Xml_curl
On Wed, Feb 19, 2014 at 1:31 PM, Vik Killa <vipkilla@gmail.com> wrote: I am quite confused. Is there no way to create a module that serve's User Agent authentication information to FS?
On Wed, Feb 19, 2014 at 2:09 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote: You are confusing the directory interface "wrapper for ldap" with the FS Directory (The XML Registry)
How the XML Registry works is extensively documented in the wiki and our FS book.
The gist is that the XML is the abstraction layer; So you can write modules to seek things from the XML and not worry about external access. Then you write modules that bind to xml searches and pre-empt the static xml by returning your own binary xml object with the correct data.
xml_curl and xml_scgi are the 2 in-house examples that transform the xml search into a url and fetch the xml from a remote service but you can also easily make a binding module to parse xml searches, do sql stmts and format the results in a binary xml obj without ever using textual xml markup.
On Wed, Feb 19, 2014 at 12:49 PM, Vik Killa <vipkilla@gmail.com> wrote: I am trying to test the directory interface in my module. It seems that FS will not send the authentication request to my module's directory interface though. I know it is loaded because I see:
2014-02-19 13:46:46.056080 [NOTICE] switch_loadable_module.c:429 Adding Directory interface 'test_directory'
I have some debug lines in my module to display when the interface is run but i don't see the debugging. Also, i loaded mod_ldap to test and it will not get queried by FS either. Is there a FS parameter or setting that is needed to tell it to use the alternate directory interface?
Thanks
Ahh, i think i understand. I need to use my module to format the PostgreSQL data in XML inside C and pass it to the switch_xml_bind_search_function() <snip>
Further experimentation with this and it appears switch_xml_bind_search_function is the way to go with this, very cool. BTW this is not very well documented on WIKI Once the wiki is up, I will write-up something on how to do this. Thanks! On Thu, Feb 20, 2014 at 8:37 AM, Vik Killa <vipkilla@gmail.com> wrote:
Ahh, i think i understand. I need to use my module to format the PostgreSQL data in XML inside C and pass it to the switch_xml_bind_search_function() <snip>
We rarely have the time and resources to document lower-level programming interfaces. Most of the in-tree modules serve as best-use examples on how to use the various interfaces. XML_CURL just happens to be powerful enough on its own that it went beyond example and is widely used by people doing external services. On Thu, Feb 20, 2014 at 8:20 AM, Vik Killa <vipkilla@gmail.com> wrote:
Further experimentation with this and it appears switch_xml_bind_search_function is the way to go with this, very cool. BTW this is not very well documented on WIKI Once the wiki is up, I will write-up something on how to do this. Thanks!
On Thu, Feb 20, 2014 at 8:37 AM, Vik Killa <vipkilla@gmail.com> wrote:
Ahh, i think i understand. I need to use my module to format the PostgreSQL data in XML inside C and pass it to the switch_xml_bind_search_function() <snip>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
I understand there is not much time for documentation of the lower-level interfaces. I have learned nearly everything about programming in FreeSWITCH from looking at other modules. Thank you for pointing me in the right direction. <snip>
participants (5)
-
Anthony Minessale
-
Brian West
-
Michael Jerris
-
Michel Brabants
-
Vik Killa