Hello serusers,
I am working on Voice Messaging and IM using SER proxy and jabberd. The component for this system is as follows: ser 0.8.12 on Red Hat 9 jabberd 1.4.3 on another Red Hat 9 msn-transport 1.2.8rc
I have been able to chat with presence between jabberd and MSN, and also I could chat between SER and jabberd with presence.
Exodus <-> jabberd (msn-transport) <-> MSN <-> MSN Messenger Windows Messenger <-> SER (jabber.so) <-> jabberd <-> Exodus
When I try to connect other MSN user, I can login to MSN for my account,
Windows Messenger -> SER (jabber.so) -> jabberd (msn-transport) -> MSN (my account)
But I can't connect to other MSN user.
Windows Messenger -> SER (jabber.so) -> jabberd (msn-transport) -> MSN (my account) - X -> other MSN user
My ser.cfg is, alias=software.com alias=ser.software.com listen="10.196.4.201"
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) #port=5060 #children=4 fifo="/tmp/ser_fifo" .. # -- jabber params -- modparam("jabber", "db_url", "sql://ser:heslo@127.0.0.1/ser") modparam("jabber", "jaddress", "jabber.software.com") modparam("jabber", "jport", 5222) modparam("jabber", "jdomain", "jabber.software.com=*") modparam("jabber", "aliases", "2;msn.jabber.software.com=%;yahoo.jabber.server.com;")
# main routing logic
route{ if (uri=~"[@:]ser.software.com([;:].*)*") { # for testing purposes, simply okay all REGISTERs if (method=="REGISTER") { if (t_newtran()) { save("location"); log("REGISTER received -> reply okay\n"); }; if(search("egistration")) { log("XJAB: Going ONline in Jabber network!!!\n"); if(jab_go_online()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404","Not found"); }; } else { log("XJAB: Going OFFline in Jabber network!!!\n"); if(jab_go_offline()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404","Not found"); }; }; break; }; if (method=="SUBSCRIBE") { if (t_newtran()) { handle_subscription("registrar"); }; break; }; if(!lookup("location")) { sl_send_reply("404","Not found"); break; }; };
if ((search("To:.*@jabber.software.com")) || (search("To:.*@msn.jabber.software.com")) || (search("To:.*@yahoo.jabber.software.com"))) { if (! t_newtran()) { sl_reply_error(); break; }; if (method=="MESSAGE") { log("MESSAGE received -> manage it with XJAB\n"); if(search("\n:on")) { if (jab_go_online()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not found"); }; break; }; if(search("\n:off")) { if (jab_go_offline()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not found"); }; break; };
if(search("\n:join")) { if (jab_join_jconf()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not Found"); }; break; };
if(search("\n:exit")) { if (jab_exit_jconf()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not Found"); }; break; };
if (jab_send_message()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("503","Service Unavailable"); }; break; }; if (method=="SUBSCRIBE") { handle_subscription("jabber"); break; }; log("NON_Message request received for JABBER gateway->dropt!\n"); sl_send_reply("202","Accepted"); break; }; if (!t_relay()) { sl_reply_error(); };
#forward(uri:host,uri:port); }
Also my jabber config is, .. <browse> .. <service type="msn" jid="msn.jabber.software.com" name="MSN Transport"> <ns>jabber:iq:gateway</ns> <ns>jabber:iq:register</ns> </service> .. </browse> .. <service id="msnlinker"> <host>msn.jabber.software.com</host> <host>conference.msn.jabber.software.com</host> <accept> <ip>127.0.0.1</ip> <port>31520</port> <secret>swcm</secret> </accept> </service>
When I set the debug flag in ser.cfg as follows, debug=3 fork=no log_stderror=yes
I get the next error messages when I login using Windows Messenger: ( Test MSN address is already registered on my Win Messenger. )
[root@ser ser]# /usr/sbin/ser Listening on 10.196.4.201 [10.196.4.201]:5060 Aliases: ser:5060 ser.software.com:* software.com:* WARNING: no fork mode print - initializing textops - initializing stateless - initializing Maxfwd module- initializing 0(11485) mod_init(): Database connection opened successfuly 0(0) INFO: udp_init: SO_RCVBUF is initially 65535 0(0) INFO: udp_init: SO_RCVBUF is finally 131070 2(0) INFO: fifo process starting: 11493 2(11493) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo... 0(11485) ERROR: parse_uri: bad uri, state 0 parsed: <yyas> (4) / <yyasuko7%hot mail.com@msn.jabber.software.com> (44) 0(11485) XJAB:extract_aor: Error while parsing URI
This is printed from xj_extract_aor() in xjab_base.c and actually this is raised at 320 line in parse_uri.c. if (! ( ((buf[0]|0x20)=='s')&&((buf[1]|0x20)=='i')&&((buf[2]|0x20)=='p') )) goto error_bad_uri;
The buf when this happened:
yyasuko%hotmail.com@msn.jabber.software. com SIP/2.0 Via: SIP/2.0/UDP 10.16.64.43:8319 From: "norika" sip:norika@ser.software.com;tag=6fe4a131-fbc8-4137-9d24-078be6b d9c32 To: sip:yyasuko%hotmail.com@msn.jabber.software.com Call-ID: dd74847c-26e3-4a18-a164-236f52585af1@10.16.64.43 CSeq: 1 SUBSCRIBE Contact: sip:10.16.64.43:8319 User-Agent: Windows RTC/1.0 Expires: 1800 Content-Length: 0
So there is no sip: in the head of sip address, but I can find sip string in the ethereal packet dump.
Session Initiation Protocol
Request line: SUBSCRIBE sip:yyasuko7%hotmail.com@msn.jabber.software.com SIP/2.0 Method: SUBSCRIBE Message Header Via: SIP/2.0/UDP 10.16.64.43:8319 From: "norika" sip:norika@ser.software.com;tag=05797f90-72ac-4d96-bc88-65ad1794f1db To: sip:yyasuko7%hotmail.com@msn.jabber.software.com;tag=158f166cb27489bb7c6c6 24552186861-0e2f Call-ID: 3236c4ba-0474-41ee-97bb-743dc0892826@10.16.64.43 CSeq: 1 SUBSCRIBE Contact: sip:10.16.64.43:8319 User-Agent: Windows RTC/1.0 Expires: 1800 Content-Length: 1800
Is there any idea to resolve this problem? Any comment will be appreciated.
-- Yoshiho Yoshida
Open Technologies Corporation Main: +81-3-5940-5798 Direct: +81-3-5940-7587 Fax: +81-3-3947-1214 mailto:yoshida@opentech.co.jp