For product verification purpose, I need to use a Sip2IMS gateway and found a well-respected one developed by Joseph Johnson. Following the procedures posted in “this post“, I was blocked for quite a long time in finding out the old version of libosip (2.2.3) needed for this Sip2IMS Gateway that has not been updated for more than 4 years. Struggled for almost a whole day on Google, I was fortunately able to find a version 2.2.1 over “here“.
1. Down loaded the lib0sip2.2.2 tarball, and followed the instructions in the INSTALL file to install the package as follows:
- ./configure
- make
- make install
The package is installed in “/usr/local” directory.
2. Then started making Sip2IMS gateway as below:
- download the source codes: “svn checkout https://sip2ims.svn.sourceforge.net/svnroot/sip2ims“
- cd trunk/src; make;
First saw errors like below
sip2ims_db.c:1076:14: error: ‘ULONG_MAX’ undeclared (first use in this function)
sip2ims_db.c:1076:14: note: each undeclared identifier is reported only once for each function it appears in
sip2ims_db.c:1077:13: error: ‘INT_MIN’ undeclared (first use in this function)
sip2ims_db.c:1077:32: error: ‘UINT_MAX’ undeclared (first use in this function)
Solution: include “/usr/include/limits.h” in “sip2ims_common.h” .
Then saw the following errors
/usr/bin/ld: sip2ims.o: undefined reference to symbol ‘osip_atoi’
/usr/bin/ld: note: ‘osip_atoi’ is defined in DSO /usr/local/lib/libosipparser2.so.3 so try adding it to the linker command line
/usr/local/lib/libosipparser2.so.3: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Solution: add “-losipparser2” in the Makefile to like the needed library in.
Then the executable “sip2ims” is made successfully.
3. Configure the gateway as follows
MySQL Database. The Open IMS Core sip2ims database must be created and a default username/password created using the following command, and need to be modified for our purposes.
- $mysql –p < osims_sip2ims.sql
- $mysql –p < modify_osims.sql
After this you need to do some modification to the “credentials” table to adjust corresponding values if you do not use openIMS defaults. The server is running on default port 3060/4060.
4. Run the gateway: Go to the directory with run.sh
- Use the command
- ./run.sh
Error: Cannot open main configuration file ‘sip2ims.cfg’ for reading!
Solution: found a configuration file from here. Below is the content of this file. You need to do some modifications to it before use if you do not use the openIMS defaults.