Duong, That is probably a selinux problem. I dealt with that a couple months ago and posted a little howto for easily dealing with selinux problems the right way (not disabling selinux). Just google for: selinux opensips dave
Dave On Thu, Mar 24, 2011 at 8:57 PM, Duong Manh Truong <[email protected]> wrote: > Hi Dave! > I changed my config to > "$box_id=0; > // mi host:port pair || fifo_file > //$boxes[$box_id]['mi']['type']="fifo"; > //$boxes[$box_id]['mi']['fifo']="/tmp/opensips_fifo"; > $boxes[$box_id]['mi']['conn']="127.0.0.1:8000"; > $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo"; > " > And i've got the same results: OK with add users only! > When i hit the "apply changes to server" button, i see this > "sorry -- cannot open write fifo" > Or when using MI commands: > "10:40:18 | opensipsctl online | /tmp/opensips_fifo > ________________________________ > > sorry -- cannot open write fifo" > > Check the file: > [root@opensips tmp]# ls -l opensips_fifo > prw-rw-rw-. 1 root root 0 Mar 25 10:31 opensips_fifo > I think that file's permission here is ok !! > Continued checking the opensips.cfg, i had added the lines following > " > # ----- mi_fifo params ----- > modparam("mi_fifo", "fifo_mode", 0666) > modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") > " > But error is still occured :-( > My "acc table" has "cdr_id filed", not the "cdr field" > additionally, i have "Cdrs" table separately. > Both 2 tables above are empty. (although i made several internal calls) > And i've checked the "location table" and it truly contained records of > online users > (not the presence module as you suggested) > Please tell me what are the next steps to check ? > Thanks! > > > 2011/3/25 Dave Singer <[email protected]> >> >> Duong, >> Sorry. I forgot I modified my CP and those options. >> You need to have it: >> $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo"; >> >> and remove: >> $boxes[$box_id]['mi']['type']="fifo"; >> $boxes[$box_id]['mi']['fifo']="/tmp/opensips_fifo"; >> >> Are you sure cdrs are being recorded (you have seen cdrs in the acc >> table)? >> Have you verified online users is using the location (registered >> users) table and not the presence module fifo/table (I haven't used >> presence so don't know what is available and how CP would pull >> presence info). >> My guess is that online users uses presence module. >> >> Dave >> >> On Thu, Mar 24, 2011 at 11:31 AM, Duong Manh Truong >> <[email protected]> wrote: >> > Hi Dave, >> > My default config in was : >> > // default: $boxes[$box_id]['mi']['conn']="127.0.0.1:8000"; >> > // default: $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo"; >> > then i changed it to >> > $boxes[$box_id]['mi']['type']="fifo"; >> > $boxes[$box_id]['mi']['fifo']="/tmp/opensips_fifo"; >> > And i found some functions of CP works such as: Add/edit users; Add/edit >> > domain. >> > But a lot of others still dont work such as: cdrs, show online users, >> > ........ >> > I see the "apply changes to server" button, i hit it and get this >> > message >> > for a new web browser tab: >> > "http://10.2.14.122/cp/tools/system/domains/apply_changes.php >> > Cannot connect to OpenSIPS Server via Management Interface ()" >> > I come to /cp/tools/system/domains but find no "apply_changes.php" file >> > :-( >> > Please help me to find out how i can connect to Opensips Server and >> > making >> > changes >> > Thanks! >> > 2011/3/24 Dave Singer <[email protected]> >> >> >> >> Duong, >> >> >> >> The MI commands are for opensips and ps does NOT take any arguments. >> >> The easiest way for it to connect when on the same box is with fifo. >> >> Here is a snippet from the boxes.global.inc.php: >> >> /*==================== DEFINITION OF BOXES (servers) >> >> ========================*/ >> >> // each server is a box >> >> $box_id=0; >> >> $boxes[$box_id]['mi']['type']="fifo"; >> >> $boxes[$box_id]['mi']['fifo']="/tmp/opensips_fifo"; >> >> >> >> This does require that opensips module mi_fifo is loaded and >> >> configured with the same path/file as you set in the config above >> >> (above path is the default path). >> >> opensipsctl uses it also (unless it was configured to use xmlrpc (not >> >> sure it can)). >> >> Opensips xmlrpc module by default lisetns on port 8000, not the sip >> >> port 5060. That is why you got that message. >> >> I've not been able to get xmlrpc to compile and work on Centos 5 >> >> servers. >> >> >> >> Dave >> >> >> >> On Thu, Mar 24, 2011 at 12:17 AM, Duong Manh Truong >> >> <[email protected]> wrote: >> >> > >> >> > Thank Dave! >> >> > When going to the "MI commands" tab, surprisingly i found that >> >> > "Cannot connect to OpenSIPS Server via Management Interface >> >> > (127.0.0.1/8000) >> >> > Execute MI Command" >> >> > >> >> > After i executed the "ps -A" command, i only got this >> >> > "14:02:20 | ps -A | 127.0.0.1:8000" >> >> > The same result for "opensipsctl online" command >> >> > "14:04:37 | opensipsctl online | 127.0.0.1:8000" >> >> > And i think the problem is my CP does not connect to my Opensips >> >> > server >> >> > on 5060 port. I remember that i have not configured CP listening port >> >> > before, it is default :-( >> >> > (CP & Opensips server were installed in the same machine) >> >> > Checking these files "db.inc.php" ; local.inc.php; globals.php in >> >> > the >> >> > CP config directory "/var/www/opensips-cp/config" >> >> > I don't see anywhere to config CP listening port ! >> >> > Please help me to figure out, thanks! >> >> > 2011/3/24 Dave Singer <[email protected]> >> >> >> >> >> >> Duong, >> >> >> >> >> >> Yea missed that. :-) >> >> >> To check basic CP connection to opensips, go to System, MI Commands. >> >> >> In box under Execute MI Command, put "ps" and click "execute". It >> >> >> should show a bunch of lines about the opensips processes that are >> >> >> running. >> >> >> >> >> >> As far as showing Online Users, it may be using presence >> >> >> module/table >> >> >> rather than active registrations to qualify a user as "online". >> >> >> Someone else will have to answer that or you can look at the CP >> >> >> source >> >> >> code for that answer. >> >> >> >> >> >> Dave >> >> >> >> >> >> On Wed, Mar 23, 2011 at 12:35 PM, Duong Manh Truong >> >> >> <[email protected]> wrote: >> >> >> > Thank David, >> >> >> > But i found that in my opensips.cfg file: >> >> >> > " >> >> >> > # ----- usrloc params ----- >> >> >> > # modparam("usrloc", "db_mode", 0) >> >> >> > /* uncomment the following lines if you want to enable DB >> >> >> > persistency >> >> >> > for location entries */ >> >> >> > modparam("usrloc", "db_mode", 2) >> >> >> > modparam("usrloc", "db_url", >> >> >> > "mysql://opensips:opensipsrw@localhost/opensips") >> >> >> > " >> >> >> > So i think that my "db_mode" is not the cause of my failed CP >> >> >> > " 2 - Write-Back scheme. This is a combination of previous two >> >> >> > schemes. All >> >> >> > changes are made to memory and database synchronization is done in >> >> >> > the >> >> >> > timer. The timer deletes all expired contacts and flushes all >> >> >> > modified or >> >> >> > new contacts to database. Use this scheme if you encounter >> >> >> > high-load >> >> >> > peaks >> >> >> > and want them to process as fast as possible. The mode will not >> >> >> > help >> >> >> > at all >> >> >> > if the load is high all the time. Also, latency of this mode is >> >> >> > much >> >> >> > lower >> >> >> > than latency of mode 1, but slightly higher than latency of mode >> >> >> > 0." >> >> >> > My CP still does not work :-( , even the simple function like >> >> >> > "show >> >> >> > online >> >> >> > user" --- "no data found" >> >> >> > (While checking by using opensipsctl is ok) >> >> >> > opensipsctl online >> >> >> > database engine 'MYSQL' loaded >> >> >> > Control engine 'FIFO' loaded >> >> >> > 1001 >> >> >> > >> >> >> > Please tell me how to check my CP and its connection to Opensips >> >> >> > server? >> >> >> > Thanks ! >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > ---------------------------------------------------------------------- >> >> >> > >> >> >> > Message: 1 >> >> >> > Date: Tue, 22 Mar 2011 21:06:21 -0700 >> >> >> > From: Dave Singer <[email protected]> >> >> >> > Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not >> >> >> > take >> >> >> > effect into Opensips Server >> >> >> > To: OpenSIPS users mailling list <[email protected]> >> >> >> > Message-ID: >> >> >> > >> >> >> > <[email protected]> >> >> >> > Content-Type: text/plain; charset=ISO-8859-1 >> >> >> > >> >> >> > The key I think is usrloc db mode is 0, which means db is not >> >> >> > used. >> >> >> > >> >> >> > http://www.opensips.org/html/docs/modules/1.6.x/usrloc.html#id292029 >> >> >> > >> >> >> > On Tue, Mar 22, 2011 at 6:47 PM, Duong Manh Truong >> >> >> > <[email protected]> wrote: >> >> >> >> Dear Dave! >> >> >> >> Thanks for your help. >> >> >> >> I've checked the opensips.cfg again but i still can not find out >> >> >> >> what >> >> >> >> stuff >> >> >> >> is incorrect ! :-( >> >> >> >> I attached my config file in this email, hope that will help my >> >> >> >> problem to >> >> >> >> be?clearer! >> >> >> >> If anyone has had the same issue, please tell me how can i check >> >> >> >> or >> >> >> >> fix >> >> >> >> it. >> >> >> >> (Hope to receive relatively specific informations) >> >> >> >> Thanks and Best Regards. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Date: Mon, 21 Mar 2011 08:45:03 -0700 >> >> >> >> From: Dave Singer <[email protected]> >> >> >> >> Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not >> >> >> >> take >> >> >> >> ? ? ? ?effect into Opensips Server >> >> >> >> To: OpenSIPS users mailling list <[email protected]> >> >> >> >> Message-ID: >> >> >> >> ? ? ? >> >> >> >> ?<[email protected]> >> >> >> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> >> >> >> >> >> >> Duong, >> >> >> >> >> >> >> >> Some modules, like drouting, you have to click a reload module >> >> >> >> button >> >> >> >> in the control pannel. >> >> >> >> However, I think your problem is that you haven't implemented the >> >> >> >> needed stuff in opensips.cfg script. >> >> >> >> CP only provides an interface to managing/accessing the databases >> >> >> >> tables. You still have to impliment the logic in opensips.cfg. >> >> >> >> >> >> >> >> Dave >> >> >> >> >> >> >> >> On Sat, Mar 19, 2011 at 3:04 AM, Duong Manh Truong >> >> >> >> <[email protected]> wrote: >> >> >> >>> Hi all, >> >> >> >>> I have followed all instructions about Opensips CP installations >> >> >> >>> After done all configurations, the Web interface is appeared >> >> >> >>> but unfortunately, when i use modules in this interfaces, it >> >> >> >>> seems >> >> >> >>> there >> >> >> >>> is >> >> >> >>> no connection between Opensips CP and Opensips Server Core! >> >> >> >>> Take add/manage users module as an example: I registered user >> >> >> >>> 1001, >> >> >> >>> then >> >> >> >>> i >> >> >> >>> selected this module to show online users >> >> >> >>> => But the result was "no data found" :-( >> >> >> >>> I've created opensips database, correctly insert parameters to >> >> >> >>> opensips >> >> >> >>> CP >> >> >> >>> config files (including mysql user/pass to connect to opensips >> >> >> >>> database) >> >> >> >>> No error found ! >> >> >> >>> But i still can not use Opensips CP, someone help me to figure >> >> >> >>> out >> >> >> >>> why >> >> >> >>> Opensips CP has no effect ?? >> >> >> >>> Do i misconfig ?(or forget to config) some important parameters >> >> >> >>> to >> >> >> >>> make >> >> >> >>> Opensips CP connect properly to Opensips Server Core? >> >> >> >>> (Something likes authentications........etc) >> >> >> >>> Thanks a lot! >> >> >> >>> _______________________________________________ >> >> >> >>> Users mailing list >> >> >> >>>[email protected] >> >> >> >>>?http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >>> >> >> >> >>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> >> >> Users mailing list >> >> >> >> [email protected] >> >> >> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> >> >> >> >> >> >> >> > _______________________________________________ >> >> >> > Users mailing list >> >> >> > [email protected] >> >> >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > >> >> >> > >> >> > >> > >> > > > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
