hamidlee / fusionpbx

Automatically exported from code.google.com/p/fusionpbx
0 stars 1 forks source link

Can't find an easy way to do custom call groups on multi-tenant #219

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Adding under conf/directory/domain/ doesn't seem to work because of the way 
conf/directory/domain.xml X-PRE-PROCESS tag is set (inside group/user tags).  
Don't want to edit the latter, since fusion overwrites this file.

I'm attaching a patch that works around the issue.  This allows the user to 
create:
conf/directory/domain_group.xml and customize away.

an example of this file would be:

cat /usr/local/freeswitch/conf/directory/voip.example.com_groups.xml
<include>
                        <group name="test">
                                <users>
                                        <!--
                                        type="pointer" is a pointer so you can have the
                                        same user in multiple groups.  It basically means
                                        to keep searching for the user in the directory.
                                        -->
                                        <user id="1002" type="pointer"/>
                                        <user id="1000" type="pointer"/>
                                        <user id="1001" type="pointer"/>
                                </users>
                        </group>
</include>

svn diff lib_switch.php
Index: lib_switch.php
===================================================================
--- lib_switch.php      (revision 1686)
+++ lib_switch.php      (working copy)
@@ -2036,6 +2036,11 @@
                $tmpxml .= "                            <X-PRE-PROCESS cmd=\"include\" data=\"".$extension_dir_name."/*.xml\"/>\n";
                $tmpxml .= "                    </users>\n";
                $tmpxml .= "                    </group>\n";
+               $tmpxml .= "                                    <X-PRE-PROCESS 
cmd=\"include\" data=\"".$extension_dir_name."_groups.xml\"/>\n";
+               $tmpxml .= "                                    <!--\n";
+               $tmpxml .= "                                    Add custom 
groups in the above file\n";
+               $tmpxml .= "                                    start with 
<group name=callgroup>\n";
+               $tmpxml .= "                                    -->\n";
                $tmpxml .= "\n";
                $previous_callgroup = "";
                foreach ($callgroups_array as $key => $value) {

I didn't want to commit anything with all of the recent flux :-)

Original issue reported on code.google.com by soape...@gmail.com on 19 Jan 2012 at 7:30

GoogleCodeExporter commented 9 years ago
Soapee, is this still relevant or can it be closed?

Original comment by ewsamu...@gmail.com on 19 Jul 2014 at 10:59