<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
On 8/26/10 10:27 AM, Quốc Huy Nguyễn wrote:
<blockquote cite="mid:SNT143-w395D32927B7BB47B766C359E850@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<font style="" face="Arial">Hi all,<br>
<br>
</font>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. <br>
<br>
I install Kamailio 3.0.1 on server 192.168.1.25 (kamailio1.com),
Ejabberd on server 192.168.1.21 (ejabberd.com).<br>
<br>
Here the config of kamailio1 server:<br>
<br>
<font style="" color="#1f497d"># ---- xmpp ----</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp",
"gateway_domain", "kamailio1.com")</font><font style=""
color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp",
"xmpp_domain", "ejabberd.com")</font><font style=""
color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp",
"xmpp_host", "ejabberd.com")</font><font style=""
color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp", "backend",
"component")</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp",
"xmpp_password", "secret")</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp",
"domain_separator", "*")</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">modparam("xmpp",
"xmpp_port", 5347)</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">........</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> if (method ==
"MESSAGE") {</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> log("***
xmpp-handled MESSAGE message.\n");</font><font style=""
color="#1f497d"><br>
</font><font style="" color="#1f497d"> if
(xmpp_send_message()) {</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
sl_send_reply("200", "Accepted");</font><font style=""
color="#1f497d"><br>
</font><font style="" color="#1f497d"> } else {</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
sl_send_reply("404", "Not found");</font><font style=""
color="#1f497d"><br>
</font><font style="" color="#1f497d"> }</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> return;</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> }</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> log("*** xmpp:
unhandled message type\n");</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> sl_send_reply("503",
"Service unavailable");</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d"> return;</font><br>
<br>
Here the config of ejabberd server:<br>
<br>
<font style="" color="#1f497d"> {5347, ejabberd_service, [</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
{access, all},</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
{shaper_rule, fast},</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
{ip, {192, 168, 1, 21}},</font><font style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
{hosts, ["kamailio1.com"], [{password, "secret"}]}</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">
]},</font><font style="" color="#1f497d"><br>
</font><br>
I create 1 user on kamailio1 server: <a class="moz-txt-link-abbreviated" href="mailto:103@kamailio1.com">103@kamailio1.com</a><br>
<br>
And 1 user on ejabberd.com: <a class="moz-txt-link-abbreviated" href="mailto:102@ejabberd.com">102@ejabberd.com</a><br>
<br>
<br>
Test:<br>
<br>
- Login with account <a class="moz-txt-link-abbreviated" href="mailto:103@kamailio1.com">103@kamailio1.com</a> on sip communicator. Add
<a class="moz-txt-link-abbreviated" href="mailto:102*ejabberd.com@kamailio1.com">102*ejabberd.com@kamailio1.com</a> on the sip contact list.<br>
<br>
- Login with account <a class="moz-txt-link-abbreviated" href="mailto:102@ejabberd.com">102@ejabberd.com</a> on pidgin. Add
<a class="moz-txt-link-abbreviated" href="mailto:103*kamailio1.com@ejabberd.com">103*kamailio1.com@ejabberd.com</a> on the buddy list.<br>
<br>
- When <a class="moz-txt-link-abbreviated" href="mailto:103@kamailio1.com">103@kamailio1.com</a> chat to <a class="moz-txt-link-abbreviated" href="mailto:102*ejabbed.com@kamailio1.com">102*ejabbed.com@kamailio1.com</a>,
kamailio1 can't send MESSAGE to ejabberd.com, and here the log on
kamailio1 server:<br>
<br>
<font style="" color="#1f497d">/usr/local/sbin/kamailio[4470]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font></blockquote>
<br>
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.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote cite="mid:SNT143-w395D32927B7BB47B766C359E850@phx.gbl"
type="cite"><font style="" color="#1f497d">/usr/local/sbin/kamailio[4463]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">/usr/local/sbin/kamailio[4468]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">/usr/local/sbin/kamailio[4470]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">/usr/local/sbin/kamailio[4468]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">/usr/local/sbin/kamailio[4468]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">/usr/local/sbin/kamailio[4470]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><font
style="" color="#1f497d"><br>
</font><font style="" color="#1f497d">/usr/local/sbin/kamailio[4462]:
ERROR: xmpp [xmpp.c:362]: invalid content-type 0x300ff</font><br>
<br>
I think I had some wrong or miss something in the configuration
of kamailio and ejabberd, please help me to check it.<br>
<br>
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<br>
<br>
Thanks and Best Regards,<br>
Huy Nguyen<br>
<font style="" color="#e36c09" face="Arial"><b><font
style="font-size: 12pt;" color="#ff0000" size="3"><br>
<br>
</font></b></font>
<hr size="2" width="100%">
<hr size="2" width="100%"><font style="" color="#e36c09"
face="Arial"><font style="" color="#000000"><b><br>
</b></font><font style="font-size: 12pt;" color="#002060"
size="3">Nguyễn Quốc Huy</font><b><br>
</b></font><font style="" face="Arial"><br>
</font><font style="font-size: 12pt;" color="#0070c0" face="Times
New Roman" size="3"><i>Post & Telecommunications Institute
and Technology</i></font><font style="font-size: 12pt;"
face="Times New Roman" size="3"><br>
</font><font style="" face="Arial"><font style="font-size: 12pt;"
face="Times New Roman" size="3"><i><font style=""
color="#0070c0">branch Ho Chi Minh City</font></i></font><br>
</font><font style="" color="#e36c09" face="Arial">--------------------------------------------------</font><font
style="" face="Arial"><br>
</font><font style="" face="Arial"><br>
</font><font style="" color="#0070c0" face="Arial"><i><u>Email</u>:</i></font><font
style="" face="Arial"> <i><font style="font-size: 10pt;"
size="2"> </font></i></font><font style="" color="#1f497d"><i><font
style="font-size: 10pt;" size="2"><font style="font-size:
12pt;" face="Arial"> </font></font><font
style="font-size: 10pt;" face="Times New Roman" size="2"><font
style="font-size: 12pt;"><a moz-do-not-send="true"
target="_blank">huy_quocnguyen@live.com</a></font></font></i></font><font
style="" face="Arial"><br>
</font><font style="" face="Arial"><br>
</font><font style="" color="#0070c0" face="Arial"><i><u>Mobile</u>:</i></font><i><font
style="" face="Arial"> </font><font style="font-size: 10pt;"
color="#1f497d" face="Arial" size="2">+84 906755226</font></i><font
style="" face="Arial"><br>
</font><font style="" face="Arial"><br>
</font><font style="" color="#0070c0" face="Arial"><u><i>Y</i></u></font><font
style="" face="Arial"><i><font style="" color="#0070c0"><u>!M</u></font><font
style="" color="#0070c0">:</font> <font style=""
color="#002060"> </font></i></font><font style="font-size:
10pt;" color="#1f497d" face="Arial" size="2"><i><font style="">huy_quocnguyen1987</font></i></font><font
style="" face="Arial"><br>
</font><font style="" face="Arial"><br>
</font><br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
</pre>
</body>
</html>