Hi all,
I have some problem when integrate module xmpp to Kamailio 3.0.1. I have already searched on google and mailing-list but can't find the right way to fix it.
I install Kamailio 3.0.1 on server 192.168.1.25 (kamailio1.com), Ejabberd on server 192.168.1.21 (ejabberd.com).
Here the config of kamailio1 server:
# ---- xmpp ---- modparam("xmpp", "gateway_domain", "kamailio1.com") modparam("xmpp", "xmpp_domain", "ejabberd.com") modparam("xmpp", "xmpp_host", "ejabberd.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347) ........
if (method == "MESSAGE") { log("*** xmpp-handled MESSAGE message.\n"); if (xmpp_send_message()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } return; }
log("*** xmpp: unhandled message type\n"); sl_send_reply("503", "Service unavailable"); return;
Here the config of ejabberd server:
{5347, ejabberd_service, [ {access, all}, {shaper_rule, fast}, {ip, {192, 168, 1, 21}}, {hosts, ["kamailio1.com"], [{password, "secret"}]} ]},
I create 1 user on kamailio1 server: 103@kamailio1.com
And 1 user on ejabberd.com: 102@ejabberd.com
Test:
- Login with account 103@kamailio1.com on sip communicator. Add 102*ejabberd.com@kamailio1.com on the sip contact list.
- Login with account 102@ejabberd.com on pidgin. Add 103*kamailio1.com@ejabberd.com on the buddy list.
- When 103@kamailio1.com chat to 102*ejabbed.com@kamailio1.com, kamailio1 can't send MESSAGE to ejabberd.com, and here the log on kamailio1 server:
/usr/local/sbin/kamailio[4470]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4463]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4468]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4470]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4468]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4468]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4470]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4462]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff
I think I had some wrong or miss something in the configuration of kamailio and ejabberd, please help me to check it.
P/S: I also sent the sip trace on the attached file. In the sip trace file, the ip of sip client is 192.168.1.65, and the ip of pidgin client is 192.168.1.11
Thanks and Best Regards, Huy Nguyen
Nguyễn Quốc Huy
Post & Telecommunications Institute and Technology branch Ho Chi Minh City --------------------------------------------------
Email: huy_quocnguyen@live.com
Mobile: +84 906755226
Y!M: huy_quocnguyen1987
Hi all,
I have just changed some things on the config of kamailio:
# ---- xmpp ---- modparam("xmpp", "gateway_domain", "sip-xmpp.kamailio1.com") modparam("xmpp", "xmpp_domain", "xmpp-sip.kamailio1.com") modparam("xmpp", "xmpp_host", "xmpp.kamailio1.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347) ........................
if (method == "MESSAGE") { log("*** xmpp-handled MESSAGE message.\n"); if($ct=~"text/plain") { if (xmpp_send_message()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } return; } }
And ejabberd:
{hosts, ["xmpp.kamailio1.com"]}.
{5347, ejabberd_service, [ {access, all}, {shaper_rule, fast}, {ip, {192, 168, 1, 21}}, {hosts, ["xmpp.kamailio1.com"], [{password, "secret"}]} ]},
Register with sip client: 103*sip.kamailio1.com, cal the buddy 102*xmpp.kamailio1.com@sip.kamailio1.com. On the sip client, it appear some pop up to type the account login to sip.kamailio1.com. If you fill in, it still appear the other pop up to login again.
Anyone have any suggest for me about this problem? or detect any wrong in my configuration. I think I missed some things on it.
P/S: I installed powerdns on server 192.168.1.26, and config as below:
- sip.kamailio1.com 192.168.1.25 - sip-xmpp.kamailio1.com 192.168.1.25 - xmpp-sip.kamailio1.com 192.168.1.25 - xmpp.kamailio1.com 192.168.1.21
The sip_trace is in attached file.
Thanks for your help, Huy Nguyen HTK-INC Co.,Ltd www.htk-inc.com http://pbxvn.com/forum/
Have any suggest for me about this ?
Thanks in advanced, Huy Nguyen www.htk-inc.com http://pbxvn.com/forum/
From: huy_quocnguyen@live.com To: sr-users@lists.sip-router.org Subject: RE: Error when integrate xmpp module to Kamailio 3.0.1 Date: Fri, 27 Aug 2010 17:34:45 +0700
Hi all,
I have just changed some things on the config of kamailio:
# ---- xmpp ---- modparam("xmpp", "gateway_domain", "sip-xmpp.kamailio1.com") modparam("xmpp", "xmpp_domain", "xmpp-sip.kamailio1.com") modparam("xmpp", "xmpp_host", "xmpp.kamailio1.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347) ........................
if (method == "MESSAGE") { log("*** xmpp-handled MESSAGE message.\n"); if($ct=~"text/plain") { if (xmpp_send_message()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } return; } }
And ejabberd:
{hosts, ["xmpp.kamailio1.com"]}.
{5347, ejabberd_service, [ {access, all}, {shaper_rule, fast}, {ip, {192, 168, 1, 21}}, {hosts, ["xmpp.kamailio1.com"], [{password, "secret"}]} ]},
Register with sip client: 103*sip.kamailio1.com, cal the buddy 102*xmpp.kamailio1.com@sip.kamailio1.com. On the sip client, it appear some pop up to type the account login to sip.kamailio1.com. If you fill in, it still appear the other pop up to login again.
Anyone have any suggest for me about this problem? or detect any wrong in my configuration. I think I missed some things on it.
P/S: I installed powerdns on server 192.168.1.26, and config as below:
- sip.kamailio1.com 192.168.1.25 - sip-xmpp.kamailio1.com 192.168.1.25 - xmpp-sip.kamailio1.com 192.168.1.25 - xmpp.kamailio1.com 192.168.1.21
The sip_trace is in attached file.
Thanks for your help, Huy Nguyen HTK-INC Co.,Ltd www.htk-inc.com http://pbxvn.com/forum/
Hello,
the sip trace you attached shows SIP MESSAGE requests sent for key typing events. They have xml payload. You must not send them to xmpp, they are not real message, just indication the user is typing. As said in previous message, you cannot send xml content via XMPP IM.
Cheers, Daniel
On 8/27/10 12:34 PM, Huy Nguyen wrote:
Hi all,
I have just changed some things on the config of kamailio:
# ---- xmpp ---- modparam("xmpp", "gateway_domain", "sip-xmpp.kamailio1.com") modparam("xmpp", "xmpp_domain", "xmpp-sip.kamailio1.com") modparam("xmpp", "xmpp_host", "xmpp.kamailio1.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347) ........................
if (method == "MESSAGE") { log("*** xmpp-handled MESSAGE message.\n"); if($ct=~"text/plain") { if (xmpp_send_message()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } return; } }
And ejabberd:
{hosts, ["xmpp.kamailio1.com"]}.
{5347, ejabberd_service, [ {access, all}, {shaper_rule, fast}, {ip, {192, 168, 1, 21}}, {hosts, ["xmpp.kamailio1.com"], [{password, "secret"}]} ]},
Register with sip client: 103*sip.kamailio1.com, cal the buddy 102*xmpp.kamailio1.com@sip.kamailio1.com. On the sip client, it appear some pop up to type the account login to sip.kamailio1.com. If you fill in, it still appear the other pop up to login again.
Anyone have any suggest for me about this problem? or detect any wrong in my configuration. I think I missed some things on it.
P/S: I installed powerdns on server 192.168.1.26, and config as below:
- sip.kamailio1.com 192.168.1.25
- sip-xmpp.kamailio1.com 192.168.1.25
- xmpp-sip.kamailio1.com 192.168.1.25
- xmpp.kamailio1.com 192.168.1.21
The sip_trace is in attached file.
Thanks for your help, Huy Nguyen*
HTK-INC Co.,Ltd www.htk-inc.com http://www.htk-inc.com/ http://pbxvn.com/forum/
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 Daniel,
Thanks so much for your help.
Maybe I still don't understand clearly yet about the scenario to test with this module (component mode):
I install Kamailio and local ejabberd on server 192.168.1.25 with the same domain: kamailio1.com.
I also have another ejabberd server for test with domain ejabberd.com (192.168.1.26).
modparam("xmpp", "gateway_domain", "kamailio1.com") modparam("xmpp", "xmpp_domain", "kamailio1.com") modparam("xmpp", "xmpp_host", "192.168.1.25") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347)
With the guide as below: "The address of the XMPP(jabber) client looks like this: "sip:username<domain_separator>jabber_server@gateway_domain". The address of a SIP client has the following pattern : "sip_username<domain_separator>openser_domain@xmpp_domain". "
I have one sip client: 101@kamailio1.com and one xmpp client: 102@ejabberd.com.
Login on sip-communicator with 101@kamailio1.com and on pidgin with 102@ejabberd.com:
If sip client-101 want to chat with ejabberd client-102, I must add 102 to sip contact list of 101 as: 102*ejabberd.com@kamailio1.com or 102*kamailio1.com@ejabberd.com ?
When 102@ejabberd.com want to chat with sip client 101, on the buddy list of 102, will we add 101*kamailio1.com@ejabberd.com or 101*ejabberd.com@kamailio1.com ?
How about the role of the local ejabberd server ? how can 102@ejabberd.com chat to 101@kamailio1.com or we need add 101 as the user of the local ejabberd server ?
Thanks in advanced, Huy Nguyen www.htk-inc.com http://pbxvn.com/forum/
Date: Mon, 30 Aug 2010 12:06:06 +0200 From: miconda@gmail.com To: huy_quocnguyen@live.com CC: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Error when integrate xmpp module to Kamailio 3.0.1
Hello,
the sip trace you attached shows SIP MESSAGE requests sent for key typing events. They have xml payload. You must not send them to xmpp, they are not real message, just indication the user is typing. As said in previous message, you cannot send xml content via XMPP IM.
Cheers,
Daniel
On 8/27/10 12:34 PM, Huy Nguyen wrote:
Hi all,
I have just changed some things on the config of kamailio:
# ---- xmpp ----
modparam("xmpp", "gateway_domain", "sip-xmpp.kamailio1.com")
modparam("xmpp", "xmpp_domain", "xmpp-sip.kamailio1.com")
modparam("xmpp", "xmpp_host", "xmpp.kamailio1.com")
modparam("xmpp", "backend", "component")
modparam("xmpp", "xmpp_password", "secret")
modparam("xmpp", "domain_separator", "*")
modparam("xmpp", "xmpp_port", 5347)
........................
if (method == "MESSAGE") {
log("*** xmpp-handled MESSAGE message.\n");
if($ct=~"text/plain") {
if (xmpp_send_message()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not found");
}
return;
}
}
And ejabberd:
{hosts, ["xmpp.kamailio1.com"]}.
{5347, ejabberd_service, [
{access, all},
{shaper_rule, fast},
{ip, {192, 168, 1, 21}},
{hosts, ["xmpp.kamailio1.com"], [{password, "secret"}]}
]},
Register with sip client: 103*sip.kamailio1.com, cal the buddy 102*xmpp.kamailio1.com@sip.kamailio1.com. On the sip client, it appear some pop up to type the account login to sip.kamailio1.com. If you fill in, it still appear the other pop up to login again.
Anyone have any suggest for me about this problem? or detect any wrong in my configuration. I think I missed some things on it.
P/S: I installed powerdns on server 192.168.1.26, and config as below:
- sip.kamailio1.com 192.168.1.25
- sip-xmpp.kamailio1.com 192.168.1.25
- xmpp-sip.kamailio1.com 192.168.1.25
- xmpp.kamailio1.com 192.168.1.21
The sip_trace is in attached file.
Thanks for your help,
Huy Nguyen
HTK-INC Co.,Ltd
www.htk-inc.com
_______________________________________________ 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
-- Daniel-Constantin Mierla http://www.asipto.com/
Hello,
in component mode, a subdomain is diverted to respective component, so you don't need users in xmpp server.
Cheers, Daniel
On 8/30/10 2:18 PM, Huy Nguyen wrote:
Hi Daniel,
Thanks so much for your help.
Maybe I still don't understand clearly yet about the scenario to test with this module (component mode):
I install Kamailio and local ejabberd on server 192.168.1.25 with the same domain: kamailio1.com.
I also have another ejabberd server for test with domain ejabberd.com (192.168.1.26).
modparam("xmpp", "gateway_domain", "kamailio1.com") modparam("xmpp", "xmpp_domain", "kamailio1.com") modparam("xmpp", "xmpp_host", "192.168.1.25") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347)
With the guide as below http://www.kamailio.org/docs/modules/3.0.x/modules_k/xmpp.html: "The address of the XMPP(jabber) client looks like this: "sip:username<domain_separator>jabber_server@gateway_domain". The address of a SIP client has the following pattern : "sip_username<domain_separator>openser_domain@xmpp_domain". "
I have one sip client: 101@kamailio1.com and one xmpp client: 102@ejabberd.com.
Login on sip-communicator with 101@kamailio1.com and on pidgin with 102@ejabberd.com:
If sip client-101 want to chat with ejabberd client-102, I must add 102 to sip contact list of 101 as: 102*ejabberd.com@kamailio1.com or 102*kamailio1.com@ejabberd.com ?
When 102@ejabberd.com want to chat with sip client 101, on the buddy list of 102, will we add 101*kamailio1.com@ejabberd.com or 101*ejabberd.com@kamailio1.com ?
How about the role of the local ejabberd server ? how can 102@ejabberd.com chat to 101@kamailio1.com or we need add 101 as the user of the local ejabberd server ?
Thanks in advanced, Huy Nguyen *
www.htk-inc.com http://www.htk-inc.com/ http://pbxvn.com/forum/
Date: Mon, 30 Aug 2010 12:06:06 +0200 From: miconda@gmail.com To: huy_quocnguyen@live.com CC: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Error when integrate xmpp module to Kamailio 3.0.1
Hello,
the sip trace you attached shows SIP MESSAGE requests sent for key typing events. They have xml payload. You must not send them to xmpp, they are not real message, just indication the user is typing. As said in previous message, you cannot send xml content via XMPP IM.
Cheers, Daniel
On 8/27/10 12:34 PM, Huy Nguyen wrote:
Hi all, I have just changed some things on the config of kamailio: # ---- xmpp ---- modparam("xmpp", "gateway_domain", "sip-xmpp.kamailio1.com") modparam("xmpp", "xmpp_domain", "xmpp-sip.kamailio1.com") modparam("xmpp", "xmpp_host", "xmpp.kamailio1.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347) ........................ if (method == "MESSAGE") { log("*** xmpp-handled MESSAGE message.\n"); if($ct=~"text/plain") { if (xmpp_send_message()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } return; } } And ejabberd: {hosts, ["xmpp.kamailio1.com"]}. {5347, ejabberd_service, [ {access, all}, {shaper_rule, fast}, {ip, {192, 168, 1, 21}}, {hosts, ["xmpp.kamailio1.com"], [{password, "secret"}]} ]}, Register with sip client: 103*sip.kamailio1.com, cal the buddy 102*xmpp.kamailio1.com@sip.kamailio1.com <mailto:102*xmpp.kamailio1.com@sip.kamailio1.com>. On the sip client, it appear some pop up to type the account login to sip.kamailio1.com. If you fill in, it still appear the other pop up to login again. Anyone have any suggest for me about this problem? or detect any wrong in my configuration. I think I missed some things on it. P/S: I installed powerdns on server 192.168.1.26, and config as below: - sip.kamailio1.com 192.168.1.25 - sip-xmpp.kamailio1.com 192.168.1.25 - xmpp-sip.kamailio1.com 192.168.1.25 - xmpp.kamailio1.com 192.168.1.21 The sip_trace is in attached file. Thanks for your help, Huy Nguyen* * ------------------------------------------------------------------------ ------------------------------------------------------------------------ HTK-INC Co.,Ltd www.htk-inc.com <http://www.htk-inc.com/> http://pbxvn.com/forum/ _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://www.asipto.com/
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 Daniel and All list,
From my sip client, if I chat to ejabberd client, I recognized that: the MESSAGE can't authorized with SIP/2.0 407 Proxy Authentication Required. So, the MESSAGE was droped before sent to xmpp server. If my sip client chat to the other sip client, I don't see any 407 message, and the MESSAGE sent successful.
I install my local ejabberd server at the same machine with kamailio server and they have same domain:
modparam("xmpp", "gateway_domain", "kamailio1.com") modparam("xmpp", "xmpp_domain", "kamailio1.com") modparam("xmpp", "xmpp_host", "kamailio1.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347)
Are there the reason of this error ?
Thanks, Huy Nguyen www.htk-inc.com http://pbxvn.com/forum/
Date: Tue, 31 Aug 2010 23:37:07 +0200 From: miconda@gmail.com To: huy_quocnguyen@live.com CC: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Error when integrate xmpp module to Kamailio 3.0.1
Hello,
in component mode, a subdomain is diverted to respective component, so you don't need users in xmpp server.
Cheers,
Daniel
On 8/30/10 2:18 PM, Huy Nguyen wrote:
Hi Daniel,
Thanks so much for your help.
Maybe I still don't understand clearly yet about the scenario to test with this module (component mode):
I install Kamailio and local ejabberd on server 192.168.1.25 with the same domain: kamailio1.com.
I also have another ejabberd server for test with domain ejabberd.com (192.168.1.26).
modparam("xmpp", "gateway_domain", "kamailio1.com")
modparam("xmpp", "xmpp_domain", "kamailio1.com")
modparam("xmpp", "xmpp_host", "192.168.1.25")
modparam("xmpp", "backend", "component")
modparam("xmpp", "xmpp_password", "secret")
modparam("xmpp", "domain_separator", "*")
modparam("xmpp", "xmpp_port", 5347)
With the guide as below:
"The address of the XMPP(jabber) client looks like this: "sip:username<domain_separator>jabber_server@gateway_domain". The address of a SIP client has the following pattern : "sip_username<domain_separator>openser_domain@xmpp_domain". "
I have one sip client: 101@kamailio1.com and one xmpp client: 102@ejabberd.com.
Login on sip-communicator with 101@kamailio1.com and on pidgin with 102@ejabberd.com:
If sip client-101 want to chat with ejabberd client-102, I must add 102 to sip contact list of 101 as: 102*ejabberd.com@kamailio1.com or 102*kamailio1.com@ejabberd.com ?
When 102@ejabberd.com want to chat with sip client 101, on the buddy list of 102, will we add 101*kamailio1.com@ejabberd.com or 101*ejabberd.com@kamailio1.com ?
How about the role of the local ejabberd server ? how can 102@ejabberd.com chat to 101@kamailio1.com or we need add 101 as the user of the local ejabberd server ?
Thanks in advanced,
Huy Nguyen
www.htk-inc.com
Date: Mon, 30 Aug 2010 12:06:06 +0200
From: miconda@gmail.com
To: huy_quocnguyen@live.com
CC: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Error when integrate xmpp module to Kamailio 3.0.1
Hello,
the sip trace you attached shows SIP MESSAGE requests sent for key typing events. They have xml payload. You must not send them to xmpp, they are not real message, just indication the user is typing. As said in previous message, you cannot send xml content via XMPP IM.
Cheers,
Daniel
On 8/27/10 12:34 PM, Huy Nguyen wrote:
Hi all,
I have just changed some things on the config of kamailio:
# ---- xmpp ----
modparam("xmpp", "gateway_domain", "sip-xmpp.kamailio1.com")
modparam("xmpp", "xmpp_domain", "xmpp-sip.kamailio1.com")
modparam("xmpp", "xmpp_host", "xmpp.kamailio1.com")
modparam("xmpp", "backend", "component")
modparam("xmpp", "xmpp_password", "secret")
modparam("xmpp", "domain_separator", "*")
modparam("xmpp", "xmpp_port", 5347)
........................
if (method == "MESSAGE") {
log("*** xmpp-handled MESSAGE message.\n");
if($ct=~"text/plain") {
if (xmpp_send_message()) {
sl_send_reply("200", "Accepted");
} else {
sl_send_reply("404", "Not found");
}
return;
}
}
And ejabberd:
{hosts, ["xmpp.kamailio1.com"]}.
{5347, ejabberd_service, [
{access, all},
{shaper_rule, fast},
{ip, {192, 168, 1, 21}},
{hosts, ["xmpp.kamailio1.com"], [{password, "secret"}]}
]},
Register with sip client: 103*sip.kamailio1.com, cal the buddy 102*xmpp.kamailio1.com@sip.kamailio1.com. On the sip client, it appear some pop up to type the account login to sip.kamailio1.com. If you fill in, it still appear the other pop up to login again.
Anyone have any suggest for me about this problem? or detect any wrong in my configuration. I think I missed some things on it.
P/S: I installed powerdns on server 192.168.1.26, and config as below:
- sip.kamailio1.com 192.168.1.25
- sip-xmpp.kamailio1.com 192.168.1.25
- xmpp-sip.kamailio1.com 192.168.1.25
- xmpp.kamailio1.com 192.168.1.21
The sip_trace is in attached file.
Thanks for your help,
Huy Nguyen
HTK-INC Co.,Ltd
www.htk-inc.com
_______________________________________________ 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
-- Daniel-Constantin Mierla http://www.asipto.com/
_______________________________________________ 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
-- Daniel-Constantin Mierla http://www.asipto.com/
Hello,
On 8/26/10 10:27 AM, Quốc Huy Nguyễn wrote:
Hi all,
I have some problem when integrate module xmpp to Kamailio 3.0.1. I have already searched on google and mailing-list but can't find the right way to fix it.
I install Kamailio 3.0.1 on server 192.168.1.25 (kamailio1.com), Ejabberd on server 192.168.1.21 (ejabberd.com).
Here the config of kamailio1 server:
# ---- xmpp ---- modparam("xmpp", "gateway_domain", "kamailio1.com") modparam("xmpp", "xmpp_domain", "ejabberd.com") modparam("xmpp", "xmpp_host", "ejabberd.com") modparam("xmpp", "backend", "component") modparam("xmpp", "xmpp_password", "secret") modparam("xmpp", "domain_separator", "*") modparam("xmpp", "xmpp_port", 5347) ........
if (method == "MESSAGE") { log("*** xmpp-handled MESSAGE message.\n"); if (xmpp_send_message()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } return; } log("*** xmpp: unhandled message type\n"); sl_send_reply("503", "Service unavailable"); return;
Here the config of ejabberd server:
{5347, ejabberd_service, [ {access, all}, {shaper_rule, fast}, {ip, {192, 168, 1, 21}}, {hosts, ["kamailio1.com"], [{password, "secret"}]} ]},
I create 1 user on kamailio1 server: 103@kamailio1.com
And 1 user on ejabberd.com: 102@ejabberd.com
Test:
- Login with account 103@kamailio1.com on sip communicator. Add
102*ejabberd.com@kamailio1.com on the sip contact list.
- Login with account 102@ejabberd.com on pidgin. Add
103*kamailio1.com@ejabberd.com on the buddy list.
- When 103@kamailio1.com chat to 102*ejabbed.com@kamailio1.com,
kamailio1 can't send MESSAGE to ejabberd.com, and here the log on kamailio1 server:
/usr/local/sbin/kamailio[4470]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff
the problem is that the instant message does not have text/plan content. Probably is html. Try to use a softphone that is able to send plain text content. Alternative is to strip the html tags in server side, change content type, use msg_apply_changes() and then push it to xmpp.
Cheers, Daniel
/usr/local/sbin/kamailio[4463]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4468]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4470]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4468]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4468]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4470]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff /usr/local/sbin/kamailio[4462]: ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff
I think I had some wrong or miss something in the configuration of kamailio and ejabberd, please help me to check it.
P/S: I also sent the sip trace on the attached file. In the sip trace file, the ip of sip client is 192.168.1.65, and the ip of pidgin client is 192.168.1.11
Thanks and Best Regards, Huy Nguyen
*Nguyễn Quốc Huy*
/Post & Telecommunications Institute and Technology/ /branch Ho Chi Minh City/
/_Email_:/ / // huy_quocnguyen@live.com/
/_Mobile_:// +84 906755226/
_/Y/_/_!M_: //huy_quocnguyen1987/
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