[Freeswitch-users] XML lib curl - what is the best practice for directory binding?

João Mesquita jmesquita at gmail.com
Fri Jan 9 08:05:30 PST 2009


Take a look at the wiki for this module. I have been updating it  
constantly and there are a lot of new information there.

http://wiki.freeswitch.org/wiki/Mod_xml_curl

Regards,
Mesquita

On Jan 5, 2009, at 1:16 PM, can_man at gmx.de wrote:

>
> Hello,
>
> I have been looking into the xml curl directory binding and I would  
> like to update the wiki with the accepted best practice. I have  
> listed the HTTP POST request I am getting and how I respond. If  
> there is a better way please let me know and I will update the wiki  
> accordingly. Btw, what I have done works - so no bug hunting this  
> time ;-)
> I will make a pylons webserver available in the next few days,  
> starting with dialplan and directory support.
>
> Thank you,
> Phil
>
>
> At boot:
> HTTP POST request 1
>
> [('hostname', u'voip'), ('section', u'directory'), ('tag_name',  
> u''), ('key_name', u''), ('key_value', u'')]
>
> my response:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="directory" description="arbitrary stuff here">
> </section>
> </document>
>
> I have left the response empty as I want to provide the users at  
> runtime.
>
> -----------------------------------------------------------------------
> At boot:
> HTTP POST request 2
>
> [('hostname', u'voip'), ('section', u'directory'), ('tag_name',  
> u''), ('key_name', u''), ('key_value', u'')]
>
> my response:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="directory" description="arbitrary stuff here">
> </section>
> </document>
>
> -----------------------------------------------------------------------
> At boot:
> HTTP POST request 3
>
> [('hostname', u'voip'), ('section', u'directory'), ('tag_name',  
> u'domain'), ('key_name', u'name'), ('key_value', u'192.168.178.22'),  
> ('domain', u'192.168.178.22'), ('purpose', u'network-list')]
>
> my response:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="directory" description="arbitrary stuff here">
> </section>
> </document>
>
>
> What is meant by network list here? If all the users should be  
> loaded at boot time, is this the request which should get a response  
> with the complete list?
>
> ----------------------------------------------------------------------
>
> During runtime following this action:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="dialplan" description="RE Dial Plan For FreeSwitch">
> <context name="public">
> <extension name="test10000">
> <condition field="destination_number" expression="^(10000)$">
> <action application="voicemail" data="default $${domain} 315"/>
> </condition>
> </extension>
> </context>
> </section>
> </document>
>
>
> HTTP POST request:
> ('hostname', u'voip'), ('section', u'directory'), ('tag_name',  
> u'domain'), ('key_name', u'name'), ('key_value', u'192.168.178.22'),  
> ('mailbox', u'315'), ('key', u'id'), ('user', u'315'), ('domain',  
> u'192.168.178.22'), ('ip', u'217.10.79.9')
>
> my response:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>   <document type="freeswitch/xml">
>      <section name="directory" description="arbitrary stuff here">
>         <domain name="192.168.178.22"> //change to your domain
>           <groups>
>             <group name="default">
>               <users>
>                 <user id="315" mailbox="315">
>                   <params>
>                     <param name="password" value="1234"/>
>                       <param name="vm-password" value="0000"/>
>                     </params>
>                     <variables>
>                       <variable name="accountcode" value="315"/>
>                       <variable name="user_context" value="default"/>
>                       <variable name="vm_extension" value="315"/>
>                       <variable name="max_calls" value="1"/>
>                       <variable name="fail_over" value="415"/>
>                       <variable name="cringback" value="us-ring"/>
>                     </variables>
>                   </user>
>                 </users>
>               </group>
>             </groups>
>           </domain>
>         </section>
>     </document>
> -- 
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit  
> allen: http://www.gmx.net/de/go/multimessenger
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




More information about the Freeswitch-users mailing list