Openmeetings use of country, state and country codes

I’ve been developing using openmeetings SOAP API for a little bit (on which I hope to post soon) and I spent a bit of time getting REALLY confused on where the user’s Country field comes from, what “states_id” is for the addNewUser service, what sort of input it expects, and where it’s stored.

Here it is:

States_id, from the SOAP API, defines the country and stores it in the table address.  (I suppose that makes sense.)  You can find it under the column state_id. This is how the user’s “Country” is defined in the user management gui (see below)om_country

But here’s where it gets weird.  You may have figured out that states_id expects a numerical input; however, this is NOT the standard E.164 three-digit country code that all of us can easily Google for.  Instead, the code is an index number corresponding to the country’s alphabetically organized row number in the Openmeetings table: state.  I think this is most likely a mistake, as the database contains all the Country Codes right there next to the id field, for seemingly, no reason at all.

So what to do?

For the time being, it’s pretty simple to get this working with this piece of information.  Simply enter the corresponding id number from the openmeetings table for states_id.  I’ve included the relevant columns below for reference:

mysql> select id, name from state;
+-----+------------------------------------------------------+
| id  | name                                                 |
+-----+------------------------------------------------------+
|   1 | Afghanistan                                          |
|   2 | Åland Islands                                        |
|   3 | Albania                                              |
|   4 | Algeria                                              |
|   5 | American Samoa                                       |
|   6 | Andorra                                              |
|   7 | Angola                                               |
|   8 | Anguilla                                             |
|   9 | Antigua and Barbuda                                  |
|  10 | Argentina                                            |
|  11 | Armenia                                              |
|  12 | Aruba                                                |
|  13 | Australia                                            |
|  14 | Austria                                              |
|  15 | Azerbaijan                                           |
|  16 | Bahamas                                              |
|  17 | Bahrain                                              |
|  18 | Bangladesh                                           |
|  19 | Barbados                                             |
|  20 | Belarus                                              |
|  21 | Belgium                                              |
|  22 | Belize                                               |
|  23 | Benin                                                |
|  24 | Bermuda                                              |
|  25 | Bhutan                                               |
|  26 | Bolivia                                              |
|  27 | Bosnia and Herzegovina                               |
|  28 | Botswana                                             |
|  29 | Brazil                                               |
|  30 | British Virgin Islands                               |
|  31 | Brunei Darussalam                                    |
|  32 | Bulgaria                                             |
|  33 | Burkina Faso                                         |
|  34 | Burundi                                              |
|  35 | Cambodia                                             |
|  36 | Cameroon                                             |
|  37 | Canada                                               |
|  38 | Cape Verde                                           |
|  39 | Cayman Islands                                       |
|  40 | Central African Republic                             |
|  41 | Chad                                                 |
|  42 | Channel Islands                                      |
|  43 | Chile                                                |
|  44 | China                                                |
|  45 | Hong Kong Special Administrative Region of China     |
|  46 | Macao Special Administrative Region of China         |
|  47 | Colombia                                             |
|  48 | Comoros                                              |
|  49 | Congo                                                |
|  50 | Cook Islands                                         |
|  51 | Costa Rica                                           |
|  52 | Côte d'Ivoire                                        |
|  53 | Croatia                                              |
|  54 | Cuba                                                 |
|  55 | Cyprus                                               |
|  56 | Czech Republic                                       |
|  57 | Democratic People's Republic of Korea                |
|  58 | Democratic Republic of the Congo                     |
|  59 | Denmark                                              |
|  60 | Djibouti                                             |
|  61 | Dominica                                             |
|  62 | Dominican Republic                                   |
|  63 | Ecuador                                              |
|  64 | Egypt                                                |
|  65 | El Salvador                                          |
|  66 | Equatorial Guinea                                    |
|  67 | Eritrea                                              |
|  68 | Estonia                                              |
|  69 | Ethiopia                                             |
|  70 | Faeroe Islands                                       |
|  71 | Falkland Islands (Malvinas)                          |
|  72 | Fiji                                                 |
|  73 | Finland                                              |
|  74 | France                                               |
|  75 | French Guiana                                        |
|  76 | French Polynesia                                     |
|  77 | Gabon                                                |
|  78 | Gambia                                               |
|  79 | Georgia                                              |
|  80 | Germany                                              |
|  81 | Ghana                                                |
|  82 | Gibraltar                                            |
|  83 | Greece                                               |
|  84 | Greenland                                            |
|  85 | Grenada                                              |
|  86 | Guadeloupe                                           |
|  87 | Guam                                                 |
|  88 | Guatemala                                            |
|  89 | Guernsey                                             |
|  90 | Guinea                                               |
|  91 | Guinea-Bissau                                        |
|  92 | Guyana                                               |
|  93 | Haiti                                                |
|  94 | Holy See                                             |
|  95 | Honduras                                             |
|  96 | Hungary                                              |
|  97 | Iceland                                              |
|  98 | India                                                |
|  99 | Indonesia                                            |
| 100 | Iran, Islamic Republic of                            |
| 101 | Iraq                                                 |
| 102 | Ireland                                              |
| 103 | Isle of Man                                          |
| 104 | Israel                                               |
| 105 | Italy                                                |
| 106 | Jamaica                                              |
| 107 | Japan                                                |
| 108 | Jersey                                               |
| 109 | Jordan                                               |
| 110 | Kazakhstan                                           |
| 111 | Kenya                                                |
| 112 | Kiribati                                             |
| 113 | Kuwait                                               |
| 114 | Kyrgyzstan                                           |
| 115 | Lao People's Democratic Republic                     |
| 116 | Latvia                                               |
| 117 | Lebanon                                              |
| 118 | Lesotho                                              |
| 119 | Liberia                                              |
| 120 | Libyan Arab Jamahiriya                               |
| 121 | Liechtenstein                                        |
| 122 | Lithuania                                            |
| 123 | Luxembourg                                           |
| 124 | Madagascar                                           |
| 125 | Malawi                                               |
| 126 | Malaysia                                             |
| 127 | Maldives                                             |
| 128 | Mali                                                 |
| 129 | Malta                                                |
| 130 | Marshall Islands                                     |
| 131 | Martinique                                           |
| 132 | Mauritania                                           |
| 133 | Mauritius                                            |
| 134 | Mayotte                                              |
| 135 | Mexico                                               |
| 136 | Micronesia, Federated States of                      |
| 137 | Monaco                                               |
| 138 | Mongolia                                             |
| 139 | Montenegro                                           |
| 140 | Montserrat                                           |
| 141 | Morocco                                              |
| 142 | Mozambique                                           |
| 143 | Myanmar                                              |
| 144 | Namibia                                              |
| 145 | Nauru                                                |
| 146 | Nepal                                                |
| 147 | Netherlands                                          |
| 148 | Netherlands Antilles                                 |
| 149 | New Caledonia                                        |
| 150 | New Zealand                                          |
| 151 | Nicaragua                                            |
| 152 | Niger                                                |
| 153 | Nigeria                                              |
| 154 | Niue                                                 |
| 155 | Norfolk Island                                       |
| 156 | Northern Mariana Islands                             |
| 157 | Norway                                               |
| 158 | Occupied Palestinian Territory                       |
| 159 | Oman                                                 |
| 160 | Pakistan                                             |
| 161 | Palau                                                |
| 162 | Panama                                               |
| 163 | Papua New Guinea                                     |
| 164 | Paraguay                                             |
| 165 | Peru                                                 |
| 166 | Philippines                                          |
| 167 | Pitcairn                                             |
| 168 | Poland                                               |
| 169 | Portugal                                             |
| 170 | Puerto Rico                                          |
| 171 | Qatar                                                |
| 172 | Republic of Korea                                    |
| 173 | Republic of Moldova                                  |
| 174 | Réunion                                              |
| 175 | Romania                                              |
| 176 | Russian Federation                                   |
| 177 | Rwanda                                               |
| 178 | Saint Helena                                         |
| 179 | Saint Kitts and Nevis                                |
| 180 | Saint Lucia                                          |
| 181 | Saint Pierre and Miquelon                            |
| 182 | Saint Vincent and the Grenadines                     |
| 183 | Samoa                                                |
| 184 | San Marino                                           |
| 185 | Sao Tome and Principe                                |
| 186 | Saudi Arabia                                         |
| 187 | Senegal                                              |
| 188 | Serbia                                               |
| 189 | Seychelles                                           |
| 190 | Sierra Leone                                         |
| 191 | Singapore                                            |
| 192 | Slovakia                                             |
| 193 | Slovenia                                             |
| 194 | Solomon Islands                                      |
| 195 | Somalia                                              |
| 196 | South Africa                                         |
| 197 | Spain                                                |
| 198 | Sri Lanka                                            |
| 199 | Sudan                                                |
| 200 | Suriname                                             |
| 201 | Svalbard and Jan Mayen Islands                       |
| 202 | Swaziland                                            |
| 203 | Sweden                                               |
| 204 | Switzerland                                          |
| 205 | Syrian Arab Republic                                 |
| 206 | Taiwan, Republic of China                            |
| 207 | Tajikistan                                           |
| 208 | Thailand                                             |
| 209 | The former Yugoslav Republic of Macedonia            |
| 210 | Timor-Leste                                          |
| 211 | Togo                                                 |
| 212 | Tokelau                                              |
| 213 | Tonga                                                |
| 214 | Trinidad and Tobago                                  |
| 215 | Tunisia                                              |
| 216 | Turkey                                               |
| 217 | Turkmenistan                                         |
| 218 | Turks and Caicos Islands                             |
| 219 | Tuvalu                                               |
| 220 | Uganda                                               |
| 221 | Ukraine                                              |
| 222 | United Arab Emirates                                 |
| 223 | United Kingdom of Great Britain and Northern Ireland |
| 224 | United Republic of Tanzania                          |
| 225 | United States of America                             |
| 226 | United States Virgin Islands                         |
| 227 | Uruguay                                              |
| 228 | Uzbekistan                                           |
| 229 | Vanuatu                                              |
| 230 | Venezuela (Bolivarian Republic of)                   |
| 231 | Viet Nam                                             |
| 232 | Wallis and Futuna Islands                            |
| 233 | Western Sahara                                       |
| 234 | Yemen                                                |
| 235 | Zambia                                               |
| 236 | Zimbabwe                                             |
+-----+------------------------------------------------------+

Anyway, hope that helps someone.

Oh one last interesting fact!

If you’re searching/grepping through the code, for the key word “address,” they spell it “adress”.  HOWEVER it is spelled “address” in the database in all instances I’ve seen so far.

Openmeetings use of country, state and country codes

How to install Open Meetings on Ubuntu 12.04

Blah blah intro: 

Openmeetings has been dramatically improved over the years, as has its documentation.  However, the documentation is still a little tricky and I found I needed to combine a couple sources to really understand what was going on.  The English in Openmeetings docs tends to be a little off, which I assume is because the software is of German origin.  Anyway, I figured I might be able to help make it more accessible.  (I’ve spent so much time using the work of others in the open source community, I might as well try to give something back for once.)

Primarily, the following is drawn from the these two pdf-documents:

  1. Installation of Apache OpenMeetings 2.x on Ubuntu 12.10 and 12.04 – 32 or 64 bits
  2. Installing OpenMeetings in Squeeze.pdf

The technical stuff (what you’re likely here for):

Note:  The following is what I used to get it working on my computer, running 64bit Ubuntu 12.04.

Flash:  Openmeetings is one great big flash application.  Everything on it is flash, the text, the video the entry boxes… everything.  Needless to say, I wasn’t so psyched about this (being a 64bit linux user) but I was happily surprised to find how stable it is and how much bitching it doesn’t do.  Really, I completely forget it’s flash…until I try to right-click something but eh, it’s not so bad.

Step 1: Install Flash on whatever computer you’ll be accessing open meetings on

I almost feel like this isn’t worth going into, there are a whole bunch of articles on it online depending on your operating system.  I figure if you have a computer and it’s hooked to the internet, you probably already have flash.

Step 2: Install oracle Java

You will need Oracle’s JDK.; substitutes such as OpenJDK won’t cut it.  For Ubuntu users, use the following steps:

    1. Add the repository:   sudo add-apt-repository ppa:webupd8team/java
    2. Update your system with the new repo: sudo apt-get update
    3. Install Oracle Java6: sudo apt-get install oracle-java6-installer

Tech note: The above will install the Java6 installer, which will (as part of its install process) run and install the Java6 JDK after it’s installed.  I don’t really know why it works this way but there you have it.  Also I’ve read that Java7 plays with Openmeetings just fine but haven’t tried it myself.

Once the installer starts going automatically it will inform you that you MUST AGREE TO THE LICENCE (hit enter for ok).  Then it will ask you DO YOU AGREE TO THE LICENSE?  Since they’ve already given you the ultimatum that you have to, I guess you don’t have much choice; arrow over to yes and hit enter…only after reading the ENTIRE agreement at the url they provide of course ;-D (oh that’s too funny).

Step 3: Install Open-Libre-Whatever Office (or make sure it’s already installed)

Openmeetings has a really sweet document upload feature where all participants can examine word documents, ppt presentations etc in real-time.  This uses OpenOffice or LibreOffice to do the conversion (either one will work).  So make sure you have a copy installed on the server.

Step 4: Install more conversion software

You’ll need the following packages to properly convert uploaded files to display during the meeting.

1.  Sudo apt-get yourself the packages: sudo apt-get install imagemagick gdebi libgif4 libjpeg62 synaptic
2.  Download and install swftools using the method below.  This will render files into .swf flash when you’re using Openmeetings.

Install this repository: sudo add-apt-repository ppa:guilhem-fr/swftools

Update your system: sudo apt-get update

Install the package: sudo apt-get install swftools

Step 5:  Install FFMPG

FFMPG is necessary for the video stuff that Openmeetings needs.  The official documentation advises that one should compile FFMPEG…which is a bit of a pain.  Being lazy and a humble student of the sacred way of the half-assed, I just used the latest version from the repositories: sudo apt-get install ffmpeg.  I’ve found this to work well enough, though apparently it can present problems when trying to record Openmeetings video feeds.  Or, to quote the official documentation in its original prose:

Now should Compile FFMPEG for video. To install the one that comes in the repositories, we would find very possibly problems with the recording video. Our compiled ffmpeg will have characteristics that do not find in the normal version.

…hey at least it reads better than the nonsense I’d have written, were I to explain this in German.

But anyway, if you don’t want to find very possibly problems with the recording video, go ahead and compile ffmpeg.  I might add in how to do this later, but the Googler yields some great tutorials on how to make this happen in Ubuntu.  I haven’t needed to record the Openmeetings feed yet on my server and so the repo version has worked just fine for me.

Step 6:  Install MYSQL

It’s quite likely that you have this going already BUT if you dont…

1) sudo apt-get install mysql-server

2) It’ll ask you for a new password for the root user.  Make up a good one and don’t forget it.

Ok, now a little work here.  We need to create a database for Openmeetings to use.  So in your terminal and….

  1. Get into mysql using: mysql -uroot -p
  2. It’ll ask you for your password… enter it.  (As per usual with the terminal and password, no characters will appear)
  3. Then enter: mysql> CREATE DATABASE open2final DEFAULT CHARACTER SET 'utf8';
    There, you have now created the database “open2final”  Of course you can enter any name for your database you wish and just adjust the configurations to follow; this is just the name the official documentation suggests.
  4. Now, with mysql still open, create the mysql user that will access the database for openmeetings: mysql> GRANT ALL PRIVILEGES ON open2final.* TO 'openmeetings'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
    • Again, the name/password are pulled directly from the official documentation; call it whatever you like and adjust the settings below accordingly.
    • “open2final” is the database we gave the user access to,
    • “openmeetings” is the database username
    • “123456” is the password for the user openmeetings

Go ahead and quit out of your mysql terminal by typing “quit” and hitting enter.

Step 7:  Finally install the software you were after the whole time

So yea, finally we get to install Openmeetings.  Here’s how:

  1. Go to openmeetings.apache.com and download the latest version ending in tar.gz.  (Zip will work too, but I’ll be doing the commands for tar.gz)
  2. $ cd /opt
  3. $ tar zxf /wherever/you/downloaded/openmeetings/to/apache-openmeetings-2.1.whatever.the.version.you.downloaded.tar.gz
  4. Now rename the Openmeetings directory: mv apache-openmeetings-version/ red52/ (I don’t know why they call it red52 but it works with the install process)
  5. To get rid of the compressed file: $ rm /wherever/you/downloaded/openmeetings/to/apache-openmeetings-2.1.whatever.the.version.you.downloaded.tar.gz
  6. Backup the original configuration file: $ mv /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml-ori
  7. Create a new configuration file from template: $ mv /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/mysql_persistence.xml /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml
  8. Now we need to edit that configuration file: $ sudo nano /opt/red52/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml
    1. Once in persistence.xml, we’re here to change the database settings.
    2. Look for the line that contains: Url=jdbc:mysql://localhost:3306/openmeetings
    3. Change “openmeetings” in that line to “open2final” …or whatever you ended up calling your database.
    4. Then find the line containing :  Username=root
    5. Change “root” to “openmeetings” or whatever you named your mysql user above.
    6. And add the password to the line:  Password="/> so that it reads  Password=123456"/> or whatever password you gave your msql user.

Step 8:  Connect Openmeetings to MySQL

Wait, I know what you’re thinking “didn’t I just do that?”  Nope, not yet.  We need a little java-script package so that your username and password above can actually log into the database and do their thing.  (That’s as far as I’ll go into it… because that’s possibly a bit further than I understand it.)

Anyway, carry out the following:

  1.  $ cd /opt
  2. Download the connector from here: http://dev.mysql.com/downloads/connector/j/
  3. Copy the zip file into /opt/
  4. $ unzip mysql-connector-java-5.1.23.zip
  5. $ cp /opt/mysql-connector-java-5.1.23/mysql-connector-java-5.1.23-bin.jar /opt/red52/webapps/openmeetings/WEB-INF/lib
  6. $ rm mysql-connector-java-5.1.23.zip
  7. $  rm -R mysql-connector-java-5.1.23/
  8. $ mv red52/ /usr/lib
  9. $ chown -R nobody /usr/lib/red52

Step 9: Install the JOD converter

The JOD converter is the thing that allows Openmeetings to talk with WhateverOffice.

So monkey see monkey do:

  1. $ cd /opt
  2. $ wget http://jodconverter.googlecode.com/files/jodconverter-core-3.0-beta-4-dist.zip
  3. $ unzip jodconverter-core-3.0-beta-4-dist.zip
  4. $ rm jodconverter-core-3.0-beta-4-dist.zip

Step 10: Get the Red5-OpenMeetings Script

I found this step was especially confusing in the documentation and I really didn’t understand what was going on until I did some hunting around.  Red5 is the Openmeetings install script and can be found here:

https://cwiki.apache.org/confluence/download/attachments/27838216/OpenMeetings+2.x+run+script+Ubuntu.zip?version=1&modificationDate=1360140102000

But depending on this or that, the script needs to be modified, so I’ve saved you a little hunting/typing see below:

  1. Here’s the directory that the install script (red5) needs to go to: $cd /etc/init.d/
  2. Download from one of the two links:
    1. If you are using OpenOffice: $ wget https://dl.dropboxusercontent.com/u/11993667/OpenofficeRed5/red5
    2. If you are using LibreOffice: $ wget https://dl.dropboxusercontent.com/u/11993667/LibreofficeRed5/red5
  3. Make sure it’s executable: $ chmod +x /etc/init.d/red5

Step 10: Run Openmeetings!

Ok just a few final instructions here:

  1. $ /etc/init.d/red5 start
  2. You will get some sort of message to the following effect: start-stop-daemon: --start needs --exec or --startas  Try 'start-stop-daemon --help' for more information.  Just ignore it, everything should be fine.
  3. Give it a minute, then open your browser and go to: http://localhost:5080/openmeetings/install
  4. You should see the following page: Installation
  5. Click Continue with step 1
  6. Then you’ll get this:userinfo
    1. Configure your administrator name
    2. Give your admin a password
    3. enter your email address
    4. Enter your time zone and the rest
  7. Then you should get a page presenting you with a few technical options:paths
    1. Your JOD path should be /opt/jodconverter-core-3.0-beta-4/lib
    2. Configure any other unique settings (folks who complied FFMPEG from scratch, I might be looking in your direction)
  8. Scroll down and click install.
  9. Grab a snack and come back. (Actually it only took a minute or so on mine)
  10. And you should get an affirming message in your browser.

To Get at Openmeetings

To access openmeetings for general use as an admin, go to http://localhost:5080/openmeetings/

There you should be asked for your username and password and then be free to go.

Anyway, that’s all!  Enjoy!  Openmeetings is a really great program and a lot of smart folks have apparently put a lot of work into it and are continuing to do so.

In the likely event that I screwed something up above, please do let me know.

Notice: I did pluck the pictures above from other documentation I found on the Apache Openmeetings site.  I figured they were used to promote the software and the writer wouldn’t mind me posting them to help users out.  If the owner has an issue with this, for whatever reason, please give me a shout and I’ll take them down and snap my own instead.

t http://mysql.azc.uam.mx/Downloads/Connector-J/mysql-connector-java-5.1.23.zip

How to install Open Meetings on Ubuntu 12.04

My Adventures in OpenMeetings

Image

So I’ve been spending a bit of time in the foreign and somewhat obscure world of Openmeetings.  For those of you who don’t know, Openmeetings is a free video conferencing suite that anyone can download and install on their server for free.  It runs entirely on flash (a little odd) but it’s astonishing how well it works.  I’m a bit of a programming hack and I got it running, though it does require a little bit of assembly (the action not the language).

Apparently it’s the project of a fellow in Germany and there’s been a company set up around it to provide tech support around the product (a-la most open-source business models).  Unfortunately, the documentation on this platform is a little vague (though it’s getting better) and there seems to be an existent, though a bit of a limited community surrounding it.  The existing documentation also has a stamp of “English is my second language but I’m doing my best.”  (Hey, it’s much better than if I were to try to write up documentation in German so no judgement here.)   I’ve decided to document some of what I’ve found about openmeetings, as I’ve benefited from so much open documentation in other areas already.  I don’t really fancy myself much of a blogger (if you couldn’t tell by looking at my wordpress site already) but I figure this is worth providing a bit of info on.

I’d highly recommend this software to anyone who (for whatever reason) is looking for a way to host online conferences themselves.   It’s got lots of great features that (in my opinion) are more conducive to working Google Hangouts or Skype.  Read more about more about what it’s got at http://openmeetings.apache.org/

My Adventures in OpenMeetings