[SR-Users] SIP-XMPP problem, please help

Martin Pohančeník pohancenik.martin at gmail.com
Mon Apr 4 19:19:34 CEST 2011


Hello everyone.
I am a student at University of Žilina (Faculty of Management Science and
Informatics), which has been recently awarded Kamailio 2010 Awards for
various articles about SIP and KAMAILIO on portal nil.uniza.sk.
I am doing a bachelor thesis on topic SIP/SIMPLE - XMPP traversal, but I am
experiencing some problems.
I have a working Kamailio server serving domain sip.uniza.sk and a working
Jabberd2 server serving domain xmpp.uniza.sk.
I am running Kamailio 3.1 with XMPP module with following configuration:

fork=yes
children=4
log_stderror=yes
alias="sip.uniza.sk"
...
loadmodule "XMPP.so"
...
modparam("xmpp", "backend", "component")
modparam("xmpp", "domain_separator", "*")
modparam("xmpp", "gateway_domain", "sip.uniza.sk")
modparam("xmpp", "xmpp_domain", "xmpp-sip.uniza.sk")
modparam("xmpp", "xmpp_host", "server.xmpp.uniza.sk")
modparam("xmpp", "xmpp_password", "secret")
...
#main routing logic
route {
...
 if( uri=~"sip:.+[*].+ at sip.uniza.sk")
        {
                # absorb retransmissions ###
                if (!t_newtran())
                {
                        sl_reply_error();
                        return;
                }
                if (method == "MESSAGE")
                {
                        log("*** xmpp-handled MESSAGE message.\n");
                        if (xmpp_send_message())
                        {
                                t_reply("200", "Accepted");
                        } else
                        {
                                t_reply("404", "Not found");
                        }
                        return;
                } else
                {
                        t_reply("403","not supported");
                        exit;
                }
        }
...
}

To my knowledge there is no configuration required on the Jabberd2 server
(except the password, that the XMPP component authenticates with).
I am trying to enable SIP clients to chat with the XMPP clients and vice
versa.
SIP clients can send messages to XMPP clients. XMPP modules translates SIP
to XMPP and forwards the massage to Jabberd2 server.
URIs look like:
XMPP client from SIP view: xmpp_client*xmpp.uniza.sk at sip.uniza.sk
SIP client from XMPP view: sip_client*sip.uniza.sk at xmpp-sip.uniza.sk
The message arrives to XMPP client, but he can not reply.
I have sniffed the traffic on the Kamailio server. The XMPP message arrives
to kamailio XMPP module (correct port and everything), but the module
somehow ignores it, doesn't translate XMPP to SIP and doesn't send it to the
SIP recipient.
The sniffed message looks like:

<message xmlns='jabber:client' type='chat' to='SIP_client*sip.uniza.sk@
xmpp-sip.uniza.sk' id='mir_47' from='XMPP_client at xmpp.uniza.sk/Miranda
'><body>hello</body></message>

Any suggestions on where can the problem be ??
Do I have to add some lines to routing logic for XMPP module to process the
XMPP message (from Jabberd2) for SIP_client ??

Thanks
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110404/f37c5fca/attachment.htm>


More information about the sr-users mailing list