[SR-Users] Error when integrate xmpp module to Kamailio 3.0.1

Daniel-Constantin Mierla miconda at gmail.com
Mon Aug 30 12:02:48 CEST 2010


  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 at kamailio1.com
>
> And 1 user on ejabberd.com: 102 at ejabberd.com
>
>
> Test:
>
> - Login with account 103 at kamailio1.com on sip communicator. Add 
> 102*ejabberd.com at kamailio1.com on the sip contact list.
>
> - Login with account 102 at ejabberd.com on pidgin. Add 
> 103*kamailio1.com at ejabberd.com on the buddy list.
>
> - When 103 at kamailio1.com chat to 102*ejabbed.com at 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 at live.com/
>
> /_Mobile_:// +84 906755226/
>
> _/Y/_/_!M_: //huy_quocnguyen1987/
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100830/4cb47e69/attachment.htm>


More information about the sr-users mailing list