Hello everyone,
I have setup the openser server with the very basic default configuration. Now I have to configure my openser server to connect with a xmpp envoironment on another host with a purpose of piloting the SIP SIMPLE - XMPP IOP.
So does anyone here have successful experience of configure openser to connect with XMPP on different hosts? Or could someone provide me some instruction how to configure it.
Thanks a lot in advance
Gaoqiang Qian wrote:
Hello everyone,
I have setup the openser server with the very basic default configuration. Now I have to configure my openser server to connect with a xmpp envoironment on another host with a purpose of piloting the SIP SIMPLE - XMPP IOP.
So does anyone here have successful experience of configure openser to connect with XMPP on different hosts? Or could someone provide me some instruction how to configure it.
I have not been able to make SIMPLE -> XMPP work. I have attached my config below.
Also, what I do not understand is how the jabber server (jabberd2 in my case) knows how to deal with the sip_username<delim>openser_domain@xmpp_domain sitaution.
My jabber secret is the default secret.
Here is my config:
listen=udp:1.2.3.4:5060 mpath="/usr/local/lib/openser/modules" children = 8 debug = 3 fork = yes log_stderror = no disable_tcp = no log_facility = LOG_DAEMON tcp_children = 4 mhomed = no server_signature = yes reply_to_via = no sip_warning = no check_via = no dns = no rev_dns = no disable_core_dump = no dns_try_ipv6 = yes dns_use_search_list = yes
loadmodule "usrloc.so" modparam("usrloc", "db_url", "mysql://user:pass@localhost/openser") modparam("usrloc", "db_mode", 2)
loadmodule "mysql.so"
loadmodule "sl.so" loadmodule "tm.so" loadmodule "maxfwd.so" loadmodule "textops.so" loadmodule "registrar.so"
loadmodule "avpops.so" loadmodule "pua.so" modparam("pua", "db_url", "mysql://user:pass@localhost/openser")
loadmodule "pua_mi.so" loadmodule "pua_usrloc.so" modparam("pua_usrloc", "default_domain", "valid.domian.name")
loadmodule "rr.so" modparam("rr", "enable_full_lr", 1)
loadmodule "mi_fifo.so" modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
loadmodule "xmpp.so" modparam("xmpp", "domain_separator", "*") modparam("xmpp", "gateway_domain", "valid.domain.name") modparam("xmpp", "xmpp_domain", "valid.domain.name") modparam("xmpp", "xmpp_host", "valid.domain.name") modparam("xmpp", "backend", "component")
loadmodule "pua_xmpp.so" modparam("pua_xmpp", "server_address", "sip:1.2.3.4:5060")
loadmodule "xlog.so" modparam("xlog", "buf_size", 4096) modparam("xlog", "force_color", 0)
loadmodule "uri.so"
loadmodule "presence.so" modparam("presence", "db_url", "mysql://user:pass@localhost/openser") modparam("presence", "max_expires", 60) modparam("presence", "server_address", "sip:1.2.3.4:5060")
loadmodule "presence_xml.so" modparam("presence_xml", "db_url","mysql://user:pass@localhost/openser") modparam("presence_xml", "force_active", 1)
#### Main Routing Block #### route { if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; };
if (msg:len >= max_len) { sl_send_reply("513", "Message too big"); exit; };
if (has_totag()) { if (loose_route()) { route(1); } else { if (is_method("SUBSCRIBE") && $rd = "1.2.3.4") { # in-dialog subscribe requests route(2); exit; } if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n"); exit; } } sl_send_reply("404","Not here"); } exit; }
if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; } t_check_trans();
# record routing if (!is_method("REGISTER|MESSAGE")) record_route();
if (!uri==myself) route(1);
if(is_method("PUBLISH|SUBSCRIBE")) route(2);
if (is_method("MESSAGE")) { # THIS DOESN'T WORK EITHER :( xlog("Processed MESSAGE method\n"); if (xmpp_send_message()) { t_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } exit; } if (is_method("REGISTER")) { sl_send_reply("100", "Trying");
#if (!www_authorize("", "subscriber")) { # www_challenge("", "0"); # exit; #};
if(!save("location")) { xlog("L_ERR", "Saving contact failed - RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); sl_reply_error(); exit; } xlog("L_INFO", "Registration Successful - RURI=$ru F=$fu\n"); exit; };
if ($rU==NULL) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; }
if (is_method("INVITE")) { xlog("L_INFO", "In invite\n"); if (!lookup("location")) { xlog("L_ERR", "URI Unknown: $ru\n"); sl_send_reply("404", "Not Found"); exit; } } route(1); } xlog("Unhandled message type: M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); t_reply("503", "Service unavailable"); exit; }
route[1] { if (!t_relay()) { sl_reply_error(); }; exit; } route[2] { xlog("L_INFO", "Dealing with $rm F:$fu T:$tu\n"); sl_send_reply("100","trying"); if (!t_newtran()) { sl_reply_error(); exit; };
if(is_method("PUBLISH")) { if($hdr(Sender)!= NULL) { handle_publish("$hdr(Sender)"); } else { handle_publish(""); } t_release(); } else { if(is_method("SUBSCRIBE")) { handle_subscribe(); if (($hdr(Event)== "presence") && (uri =~ "^sip:.+@valid.domain.name")) { xlog("L_INFO", "In subscribe, winfo\n"); pua_xmpp_req_winfo("$ruri", "$hdr(Expires)"); } t_release(); } } exit; }
onreply_route[1] { exit; }
I have just noticed that OpenSER is repeatedly slamming my jabberd2 server (router.log croaked jabberd2 once it hit 2gig)
This is a very basic setup with no custom transports. I followed the "Jabber 2 Doc Project" configuration guide.
Here is the openser debug:
Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 1: stream:error Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 2: n/a Apr 26 18:42:18 [5296] DBG:xmpp:net_connect: resolving valid.dns.name.com... Apr 26 18:42:18 [5296] DBG:xmpp:net_connect: connecting to 1.2.3.4:5347... Apr 26 18:42:18 [5296] DBG:xmpp:net_connect: connected to 1.2.3.4:5347... Apr 26 18:42:18 [5296] DBG:xmpp:net_printf: net_printf: [<?xml version='1.0'?><stream:stream xmlns='jabber:component:accept' to='valid.dns.name.com' version='1.0' xmlns:stream='http://etherx.jabber.org/streams%27%3E] Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:component:accept' from='valid.dns.name.com' version='1.0' id='9ojljcsehbuo53rybzljjrotplb8mbhv00hkd9yu'>] Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 0: stream:stream Apr 26 18:42:18 [5296] DBG:xmpp:xode_send: xode_send [<handshake>ca0dbec77c1fc68395ba9d1f4b29ce58a832222f</handshake>] Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<stream:features xmlns:stream='http://etherx.jabber.org/streams%27%3E<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism></mechanisms></stream:features>] Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 1: stream:features Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<handshake xmlns='jabber:component:accept'/>] Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 1: handshake Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: handshake succeeded Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<stream:error xmlns:stream='http://etherx.jabber.org/streams%27%3E<host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>requested name is already in use</text></stream:error></stream:stream>]
Jeremy McNamara
Hello,
seems that you use same domain name for the component at it is for the jabber server. When registering to the jabbers, the xmpp module instructs the xmpp server to divert all the traffic for "xmpp_domain" to it. By configuring the server with same dns name and as the parameter "xmpp_domain", there will be a routing conflict in the jabberd. Try to set the default domain for the jabber2 to something different.
Cheers, Daniel
On 04/27/08 04:59, Jeremy McNamara wrote:
I have just noticed that OpenSER is repeatedly slamming my jabberd2 server (router.log croaked jabberd2 once it hit 2gig)
This is a very basic setup with no custom transports. I followed the "Jabber 2 Doc Project" configuration guide.
Here is the openser debug:
Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 1: stream:error Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 2: n/a Apr 26 18:42:18 [5296] DBG:xmpp:net_connect: resolving valid.dns.name.com... Apr 26 18:42:18 [5296] DBG:xmpp:net_connect: connecting to 1.2.3.4:5347... Apr 26 18:42:18 [5296] DBG:xmpp:net_connect: connected to 1.2.3.4:5347... Apr 26 18:42:18 [5296] DBG:xmpp:net_printf: net_printf: [<?xml version='1.0'?><stream:stream xmlns='jabber:component:accept' to='valid.dns.name.com' version='1.0' xmlns:stream='http://etherx.jabber.org/streams%27%3E] Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:component:accept' from='valid.dns.name.com' version='1.0' id='9ojljcsehbuo53rybzljjrotplb8mbhv00hkd9yu'>] Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 0: stream:stream Apr 26 18:42:18 [5296] DBG:xmpp:xode_send: xode_send [<handshake>ca0dbec77c1fc68395ba9d1f4b29ce58a832222f</handshake>] Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<stream:features xmlns:stream='http://etherx.jabber.org/streams%27%3E<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism></mechanisms></stream:features>] Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 1: stream:features Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<handshake xmlns='jabber:component:accept'/>] Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: stream callback: 1: handshake Apr 26 18:42:18 [5296] DBG:xmpp:stream_node_callback: handshake succeeded Apr 26 18:42:18 [5296] DBG:xmpp:xmpp_component_child_process: server read [<stream:error xmlns:stream='http://etherx.jabber.org/streams%27%3E<host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>requested name is already in use</text></stream:error></stream:stream>]
Jeremy McNamara
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Hello,
On 04/26/08 22:30, Jeremy McNamara wrote:
Gaoqiang Qian wrote:
Hello everyone,
I have setup the openser server with the very basic default configuration. Now I have to configure my openser server to connect with a xmpp envoironment on another host with a purpose of piloting the SIP SIMPLE - XMPP IOP.
So does anyone here have successful experience of configure openser to connect with XMPP on different hosts? Or could someone provide me some instruction how to configure it.
I have not been able to make SIMPLE -> XMPP work. I have attached my config below.
Also, what I do not understand is how the jabber server (jabberd2 in my case) knows how to deal with the sip_username<delim>openser_domain@xmpp_domain sitaution.
when registering as component, the xmpp server should divert the entire traffic to "xmpp_domain" to openser xmpp module. If server, the xmpp module will listen and accept messages for that domain.
"sip_username<delim>openser_domain" is considered as a whole the user id (username) for xmpp. I am looking at enhancing the module to be able to work without this addressing scheme. The idea behind is to have a gateway that can work with any domain name, not only with the one corresponding to your server.
So, I as a sip user, if I want to write to my folks on googletalk, using the gateway of my sip provider, I will address:
myfriendid*googletalk.com@sip-xmpp-gw.myprovider.com
The xmpp module will set the destination address for xmpp side to myfriendid@googletalk.com and the source address mysipid*myprovider.com@xmpp-sip-gw.myprovider.com
Cheers, Daniel
My jabber secret is the default secret.
Here is my config:
listen=udp:1.2.3.4:5060 mpath="/usr/local/lib/openser/modules" children = 8 debug = 3 fork = yes log_stderror = no disable_tcp = no log_facility = LOG_DAEMON tcp_children = 4 mhomed = no server_signature = yes reply_to_via = no sip_warning = no check_via = no dns = no rev_dns = no disable_core_dump = no dns_try_ipv6 = yes dns_use_search_list = yes
loadmodule "usrloc.so" modparam("usrloc", "db_url", "mysql://user:pass@localhost/openser") modparam("usrloc", "db_mode", 2)
loadmodule "mysql.so"
loadmodule "sl.so" loadmodule "tm.so" loadmodule "maxfwd.so" loadmodule "textops.so" loadmodule "registrar.so"
loadmodule "avpops.so" loadmodule "pua.so" modparam("pua", "db_url", "mysql://user:pass@localhost/openser")
loadmodule "pua_mi.so" loadmodule "pua_usrloc.so" modparam("pua_usrloc", "default_domain", "valid.domian.name")
loadmodule "rr.so" modparam("rr", "enable_full_lr", 1)
loadmodule "mi_fifo.so" modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
loadmodule "xmpp.so" modparam("xmpp", "domain_separator", "*") modparam("xmpp", "gateway_domain", "valid.domain.name") modparam("xmpp", "xmpp_domain", "valid.domain.name") modparam("xmpp", "xmpp_host", "valid.domain.name") modparam("xmpp", "backend", "component")
loadmodule "pua_xmpp.so" modparam("pua_xmpp", "server_address", "sip:1.2.3.4:5060")
loadmodule "xlog.so" modparam("xlog", "buf_size", 4096) modparam("xlog", "force_color", 0)
loadmodule "uri.so"
loadmodule "presence.so" modparam("presence", "db_url", "mysql://user:pass@localhost/openser") modparam("presence", "max_expires", 60) modparam("presence", "server_address", "sip:1.2.3.4:5060")
loadmodule "presence_xml.so" modparam("presence_xml", "db_url","mysql://user:pass@localhost/openser") modparam("presence_xml", "force_active", 1)
#### Main Routing Block #### route { if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; };
if (msg:len >= max_len) { sl_send_reply("513", "Message too big"); exit; }; if (has_totag()) { if (loose_route()) { route(1); } else { if (is_method("SUBSCRIBE") && $rd = "1.2.3.4") { # in-dialog subscribe requests route(2); exit; } if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful
ACK; must be an ACK after a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n"); exit; } } sl_send_reply("404","Not here"); } exit; }
if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; } t_check_trans(); # record routing if (!is_method("REGISTER|MESSAGE")) record_route(); if (!uri==myself) route(1); if(is_method("PUBLISH|SUBSCRIBE")) route(2); if (is_method("MESSAGE")) { # THIS DOESN'T WORK EITHER :( xlog("Processed MESSAGE method\n"); if (xmpp_send_message()) { t_reply("200", "Accepted"); } else { sl_send_reply("404", "Not found"); } exit; } if (is_method("REGISTER")) { sl_send_reply("100", "Trying"); #if (!www_authorize("", "subscriber")) { # www_challenge("", "0"); # exit; #}; if(!save("location")) { xlog("L_ERR", "Saving contact failed - RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n"); sl_reply_error(); exit; } xlog("L_INFO", "Registration Successful - RURI=$ru F=$fu\n"); exit; };
if ($rU==NULL) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; } if (is_method("INVITE")) { xlog("L_INFO", "In invite\n"); if (!lookup("location")) { xlog("L_ERR", "URI Unknown: $ru\n"); sl_send_reply("404", "Not Found"); exit; } } route(1); } xlog("Unhandled message type: M=$rm RURI=$ru F=$fu T=$tu IP=$si
ID=$ci\n"); t_reply("503", "Service unavailable"); exit; }
route[1] { if (!t_relay()) { sl_reply_error(); }; exit; } route[2] { xlog("L_INFO", "Dealing with $rm F:$fu T:$tu\n"); sl_send_reply("100","trying"); if (!t_newtran()) { sl_reply_error(); exit; };
if(is_method("PUBLISH")) { if($hdr(Sender)!= NULL) { handle_publish("$hdr(Sender)"); } else { handle_publish(""); } t_release(); } else { if(is_method("SUBSCRIBE")) { handle_subscribe(); if (($hdr(Event)== "presence") && (uri =~
"^sip:.+@valid.domain.name")) { xlog("L_INFO", "In subscribe, winfo\n"); pua_xmpp_req_winfo("$ruri", "$hdr(Expires)"); } t_release(); } } exit; }
onreply_route[1] { exit; }
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users