OpenVox G400P in Debian
Éste post está también disponible en español.
This post is also available in spanish.
I bought an OpenVox G400P GSM telephony card to set up a VoIP server running Debian. I clearly didn't do my research homework before starting, and it turned out that it was not easy to set up this card with Dahdi, wich I had to keep in order to be able to use another card I already had on that server.
**[Problems I found]{.underline}**:
- There was not official [Dahdi](http://www.voip-info.org/wiki/view/DAHDI) support for this board until about \~6 months ago.
- When it finally [appeared](http://www.chan-extra.org/index.php/OpenVox_G400P_User_Manual_for_dahdi), it turned out that there were not just some patches to the original source code, but some scripts that supossed that my system was RPM based. Oh, and it also downloads, modifies, compiles and installs Dahdi and [Asterisk](http://www.asterisk.org/), leaving no room for customization.
- When I asked the support about this issue, they told me that if I gave them SSH access they would install it for me (!?). I took the time to explain them that asking their clients for SSH access to their servers was **not** a good idea. Sadly, it seems that [they didn't took my advice](http://bbs.openvox.cn/viewthread.php?tid=1463&page=1#pid6399).
**[Dissasembling the script:]{.underline}**
So my next move was to get and install either Elastix or Trixbox in a virtual machine, supossedly supported by the script they provide, get the modified source code, check it and compile it in my Debian box. I got to download three different versions of those distros, and it seems I couldn't get the correct version the script needed. So the next step was obvious: print the script, analyze it and modify it to get the source code.
Of course, I used [git](http://git-scm.com/) to keep the changes :-)
[**Final source code:**]{.underline}
Dahdi:
Asterisk: (might be incomplete, I still have to check it).
In the Dahdi repo, the *openvox-g400p* branch has the chan-extra modifications, the *oslec* branch contains the support for [OSLEC](http://www.rowetel.com/blog/?page_id=454) echo canceler. Finally *master* is a merge of both. I still didn't check if the G400P supports oslec, but I have it there because I use it with the other card I have in the server.
**[Recommendations for OpenVox:]{.underline}**
While I find an excellent idea to have an "automagic" script for your clients, a user os another distributions or/and an advanced user will find a patch most suitable. The good thing about this is that git makes it's creation quite simple.
I suggest the following workflow:
1.- Uncompress Dahdi's source code, rename the new directory and create a git repo out of it.
[\$ tar -xf dahdi-x.y.z.tar.gz]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ mv dahdi-x.y.z dahdi]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ cd dahdi]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git init]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git add -A]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git commit -m "Original Dahdi source code version x.y.z."]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
2.- Create an *upstream* branch to follow Dahdi's development.
[\$ git checkout -b upstream]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
3.- Tag Dahdi's release in the *upstream* branch.
[\$ git tag -a dahdi-x.y.z]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
4.- Go back to the *master* branch and develop the driver.
[\$ git checkout master]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\[... desarrollo...\]]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
5.- Once finished a release, tag it.
[\$ git tag -a chan-extra-x.y.z]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
6.- Make a patch out of it (althought it would be better to just publish the git repo).
[\$ git diff upstream master \> chan-extra-x.y.z.patch]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
Note: there are far more better ways to generate a proper patch using git... but I had no time to get into that yet :-/ Comments welcomed :-)
7.- Whenever we need to develop with a newer Dahdi's release, we just need to update the *upstream* branch and merge it back to *master*.
[\$ git checkout upstream]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git rm '\*']{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git clean -xdff]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ tar zxfv ../../dahdi-x.y.z+1.tar.gz --strip=1]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git add -A]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git commit -m "Import upstream x.y.z+1 release."]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git checkout master]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
[\$ git merge upstream]{.Apple-style-span style="font-family: 'Courier New', Courier, monospace;"}
Then the user will just need to patch the original source code and compile. Of course, the same workflow can be used for making patches for Asterisk.
Comments on this workflow will be much appreciated :-)
Comments
There are no comments yet.