Hi Kamailio Community,
Recently installed Kamailio, plan to integrate with SylkServer.
Tried the SIP IM feature, but can't seem to get it working.
Logged on to Bria and Blink, two seperate accounts. They can call each other, but can't add each other for presence.
So I installed the presence module with apt-get and edited the kamailio.cfg file to add the line;
#!define WITH_PRESENCE
Restarting the server comes up with the following error; ---------------------- root@opensep:~# vi /etc/kamailio/kamailio.cfg root@opensep:~# service kamailio restart Not starting Kamailio: invalid configuration file! -e 0(5114) : <core> [cfg.y:3591]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 32-36: syntax error 0(5114) : <core> [cfg.y:3591]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 32-36: Invalid arguments 0(5114) : <core> [cfg.y:3594]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 37: ERROR: bad config file (3 errors) ----------------------
Those lines are as follows; ---------------------- #!ifdef WITH_PRESENCE # ----- presence params ----- modparam("presence", "db_url", DBURL)
# ----- presence_xml params ----- modparam("presence_xml", "db_url", DBURL) modparam("presence_xml", "force_active", 1) #!endif ----------------------
The exact place is where it says DBURL on both params.
I am using Ubuntu 12.04 and Kamailio 3.3.x.
Thank you for your time.
Kind Regards,
Gary Shergill
Gary Shergill writes:
Those lines are as follows;
#!ifdef WITH_PRESENCE # ----- presence params ----- modparam("presence", "db_url", DBURL)
# ----- presence_xml params ----- modparam("presence_xml", "db_url", DBURL) modparam("presence_xml", "force_active", 1)
#!endif
i'm not familiar with the default configs, but make sure that you have DBURL defined somewhere. it could be a name of a macro or something.
-- juha
Hi juha,
================
i'm not familiar with the default configs, but make sure that you have DBURL defined somewhere. it could be a name of a macro or something.
================
Thanks for the reply.
I've changed the password for the DBURL as I am using something slightly different.
The following is the definition;
#!define DBURL "mysql://<r/w user>:<r/w password>@localhost/<database name>"
The r/w user and password are those defined in;
/etc/kamailio/kamctlrc
Is that correct? I am still getting the same error.
Thank you.
Kind Regards,
Gary Shergill
On Fri, Sep 14, 2012 at 7:10 AM, Juha Heinanen jh@tutpro.com wrote:
Gary Shergill writes:
Those lines are as follows;
#!ifdef WITH_PRESENCE # ----- presence params ----- modparam("presence", "db_url", DBURL)
# ----- presence_xml params ----- modparam("presence_xml", "db_url", DBURL) modparam("presence_xml", "force_active", 1)
#!endif
i'm not familiar with the default configs, but make sure that you have DBURL defined somewhere. it could be a name of a macro or something.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Gary Shergill writes:
The following is the definition;
#!define DBURL "mysql://<r/w user>:<r/w password>@localhost/<database name>"
The r/w user and password are those defined in;
/etc/kamailio/kamctlrc
Is that correct? I am still getting the same error.
i don't know what is defined in /etc/kamailio/kamctlrc, but just put correct value in the above define, e.g.
#!define DBURL "mysql://foo:bar@localhost/pres_serv"
if your db rw username is 'foo' with password 'bar' and if your presence db is called 'pres_serv'.
-- juha
Hi Juha,
I've double checked and am certain the details I have in Kamailio.cfg are correct for the definition of DBURL.
The following is the error that comes up on restart, referring to the DBURL in the code;
root@opensep:~# service kamailio restart Not starting Kamailio: invalid configuration file! -e 0(7892) : <core> [cfg.y:3591]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 32-36: syntax error 0(7892) : <core> [cfg.y:3591]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 32-36: Invalid arguments 0(7892) : <core> [cfg.y:3594]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 37: ERROR: bad config file (3 errors)
Same as last time unfortunately (changed password to the correct value).
Anyone knows what is wrong please? Hoping to get presence and IM working on the Kamailio server (enabling this presence module enables IM, correct?).
Thank you.
Kind Regards,
Gary Shergill
On Sat, Sep 15, 2012 at 8:29 AM, Juha Heinanen jh@tutpro.com wrote:
Gary Shergill writes:
The following is the definition;
#!define DBURL "mysql://<r/w user>:<r/w password>@localhost/<database name>"
The r/w user and password are those defined in;
/etc/kamailio/kamctlrc
Is that correct? I am still getting the same error.
i don't know what is defined in /etc/kamailio/kamctlrc, but just put correct value in the above define, e.g.
#!define DBURL "mysql://foo:bar@localhost/pres_serv"
if your db rw username is 'foo' with password 'bar' and if your presence db is called 'pres_serv'.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi again everyone,
Changing the DBURL in the kamailio.cfg to what the url is seems to stop the error from before.
However, now kamailio is failing to start.
The following is the output when kamailio is restarted;
root@opensep:~# service kamailio restart Restarting Kamailio: loading modules under /usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/ Listening on udp: 127.0.0.1:5060 udp: <server ip>:5060 tcp: 127.0.0.1:5060 tcp: <server ip>:5060 Aliases: tcp: <sever.domain>:5060 tcp: localhost:5060 udp: <sever.domain>l:5060 udp: localhost:5060
0(8797) INFO: <core> [tcp_main.c:4829]: init_tcp: using epoll_lt as the io watch method (auto detected) 0(8799) INFO: usrloc [hslot.c:53]: locks array size 512 0(8799) ERROR: <core> [db.c:80]: module db_mysql does not export db_use_table function 0(8799) ERROR: presence [presence.c:295]: Database module not found 0(8799) ERROR: <core> [sr_module.c:939]: init_mod(): Error while initializing module presence (/usr/lib64/kamailio/modules_k/presence.so) ERROR: error while initializing modules kamailio error, failed to start.
Any tips?
Thanks.
Kind Regards,
Gary Shergill
On 09/17/2012 10:36 AM, Gary Shergill wrote:
root@opensep:~# service kamailio restart Not starting Kamailio: invalid configuration file! -e 0(7892) : <core> [cfg.y:3591]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 32-36: syntax error 0(7892) : <core> [cfg.y:3591]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 32-36: Invalid arguments 0(7892) : <core> [cfg.y:3594]: parse error in config file /etc/kamailio/kamailio.cfg, line 392, column 37: ERROR: bad config file (3 errors)
Check what's in line 392, it should give you a hint what's wrong.
Anyone knows what is wrong please? Hoping to get presence and IM working on the Kamailio server (enabling this presence module enables IM, correct?).
I'm also not familiar with the default kamailio config, but presence itself has nothing to do with IM per se. There are two ways doing IM in SIP: one is page-mode using MESSAGE requests, which should take pretty much the same route as INVITE (that is: authorization of caller, normalization of callee, lookup in location table, then t_relay to callee); the other one is MSRP, which is actually an INVITE with a special payload. If you use sylkserver, then you can just forward the INVITE to sylkserver, which has an MSRP relay integrated, otherwise you can use http://kamailio.org/docs/modules/3.3.x/modules/msrp.html to handle MSRP directly within kamailio without a 3rd party server.
Andreas
Hi Andreas,
===================
Check what's in line 392, it should give you a hint what's wrong.
===================
That's where it mentions the DBURL. I think I fixed this issue by, instead of using DBURL, I just use the location (mysql://.......). That allows Kamailio to restart with no issues (so I assume it means presence is working as well, just need to get two clients that are free and compatible).
===================
There are two ways doing IM in SIP: one is page-mode using MESSAGE requests, which should take pretty much the same route as INVITE (that is: authorization of caller, normalization of callee, lookup in location table, then t_relay to callee);
===================
To be honest I'm really not sure what that means, I'm quite new to SIP, having previously only used Asterisk.
===================
the other one is MSRP, which is actually an INVITE with a special payload. If you use sylkserver, then you can just forward the INVITE to sylkserver, which has an MSRP relay integrated,
===================
This is perfect, I'm actually using SylkServer (is the reason I am trying to get this configured).
This may not seem like the best of questions, but how exactly would I go about forwarding an INVITE to sylkserver?
At the moment I am able to log on to a SIP Client using the details;
<sylkserver user>@<kamailio server>.<domain>
Where the SylkServer user is created on SylkServer's Openfire install.
I believe this means that SylkServer recognises my Kamailio server already.
Thank you.
Kind Regards,
Gary Shergill
Hi Andreas,
===================
At the moment I am able to log on to a SIP Client using the details;
<sylkserver user>@<kamailio server>.<domain>
===================
It seems I am mistaken about this - you can log in using any random name @ kamailioserver . domain, but either way I'm pretty sure SylkServer is recognising the Kamailio Server (I've added it as outbound_proxy for the sip connections).
===================
the other one is MSRP, which is actually an INVITE with a special payload. If you use sylkserver, then you can just forward the INVITE to sylkserver, which has an MSRP relay integrated,
===================
I'm still unsure about the forwarding the INVITE, having looked around the web for some tips on it I didn't really find much (or with my current level of understanding I wasn't able to draw anything useful from my search).
Hope you can help.
Thank you.
Kind Regards,
Gary Shergill