Hi Anca<br>I do not see any error, but I see some warning in tm module. Not sure if they are of concern. I have also pasted the full config file for your review. Yes I did follow the instruction from the opensips example link. Note that I&#39;m using kamailio 1.5.1 because I tried purple initially and then I swityched to pua_xmpp since purple is still new and needs more work. Hope it is ok to use Kamailio for pua_xmpp as well.<br>
<br>I have one question about tls and non-tls. Is it a must that I should use only tls version if I want opensips to talk to other publisc xmpp servers like gtalk etc. I know that jabberd2 has the required tls support to talk to gtalk etc, but should the opensips be also use tls version ?<br>
<br><br>Listening on<br>             udp: 172.16.0.141 [172.16.0.141]:5060<br>Aliases:<br>             udp: <a href="http://xmpp1.smithmicro.com:5060">xmpp1.smithmicro.com:5060</a><br><br>Jun 23 08:28:23 [2675] INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected)<br>
Jun 23 08:28:23 [2677] NOTICE:core:main: version: kamailio 1.5.1-tls (i386/linux)<br>Jun 23 08:28:23 [2677] INFO:core:main: using 32 Mb shared memory<br>Jun 23 08:28:23 [2677] INFO:core:main: using 4 Mb private memory per process<br>
Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module db_mysql<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module mi_fifo<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module sl<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module tm<br>
kmilo:/usr/local/etc/kamailio# Jun 23 08:28:23 [2677] INFO:tm:mod_init: fr_inv_timer_next value is &lt;30&gt;<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module rr<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module pv<br>
Jun 23 08:28:23 [2677] INFO:pv:shvar_init_locks: locks array size 16<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module maxfwd<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module usrloc<br>Jun 23 08:28:23 [2677] INFO:usrloc:ul_init_locks: locks array size 512<br>
Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module registrar<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module textops<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module uri_db<br>
Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module siputils<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module xlog<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module acc<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module auth<br>
Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module auth_db<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module presence<br>Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module presence_xml<br>
Jun 23 08:28:23 [2677] INFO:core:init_mod: initializing module pua<br>Jun 23 08:28:24 [2677] INFO:core:init_mod: initializing module xmpp<br>Jun 23 08:28:24 [2677] INFO:core:init_mod: initializing module pua_xmpp<br>Jun 23 08:28:24 [2677] INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb<br>
Jun 23 08:28:30 [2681] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> for event presence.winfo<br>
Jun 23 08:28:30 [2678] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> for event presence.winfo<br>
Jun 23 08:28:30 [2678] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> for event presence<br>
Jun 23 08:28:30 [2678] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of <a href="mailto:sip%3Arboxall@172.16.0.141">sip:rboxall@172.16.0.141</a> for event presence<br>
Jun 23 08:28:30 [2678] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of sip:jabb2*<a href="http://xmpp1.smithmicro.com">xmpp1.smithmicro.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> for event presence<br>
Jun 23 08:28:30 [2680] INFO:presence:send_notify_request: NOTIFY sip:jabb2*<a href="http://xmpp1.smithmicro.com">xmpp1.smithmicro.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> via sip:<a href="http://172.16.0.141:5060">172.16.0.141:5060</a> on behalf of sip:jabb2*<a href="http://xmpp1.smithmicro.com">xmpp1.smithmicro.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> for event presence.winfo<br>
Jun 23 08:28:30 [2679] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:31 [2680] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of sip:jabb1*<a href="http://xmpp1.smithmicro.com">xmpp1.smithmicro.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> for event presence<br>
Jun 23 08:28:31 [2681] INFO:presence:send_notify_request: NOTIFY sip:jabb1*<a href="http://xmpp1.smithmicro.com">xmpp1.smithmicro.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> via sip:<a href="http://172.16.0.141:5060">172.16.0.141:5060</a> on behalf of sip:jabb1*<a href="http://xmpp1.smithmicro.com">xmpp1.smithmicro.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> for event presence.winfo<br>
Jun 23 08:28:31 [2679] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:31 [2679] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of sip:smvasagam2000*<a href="http://gmail.com">gmail.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> for event presence<br>
Jun 23 08:28:31 [2679] INFO:presence:send_notify_request: NOTIFY sip:smvasagam2000*<a href="http://gmail.com">gmail.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> via sip:<a href="http://172.16.0.141:5060">172.16.0.141:5060</a> on behalf of sip:smvasagam2000*<a href="http://gmail.com">gmail.com</a>@<a href="http://sip-xmpp1.smithmicro.com">sip-xmpp1.smithmicro.com</a> for event presence.winfo<br>
Jun 23 08:28:31 [2681] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:34 [2678] INFO:presence:send_notify_request: NOTIFY <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> via sip:msivaraman@172.16.1.125:7489;transport=udp on behalf of <a href="mailto:sip%3Amsivaraman@172.16.0.141">sip:msivaraman@172.16.0.141</a> for event presence<br>
Jun 23 08:28:38 [2681] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:38 [2679] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:38 [2681] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>
Jun 23 08:28:46 [2678] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:46 [2680] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:46 [2678] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>
Jun 23 08:28:54 [2679] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:54 [2680] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>Jun 23 08:28:54 [2679] WARNING:tm:t_unref: script writer didn&#39;t release transaction<br>
<br><br>config File :<br>---------------------<br><br>#<br># $Id: kamailio.cfg 5800 2009-04-20 11:01:49Z miconda $<br>#<br># Kamailio (OpenSER) SIP Server - basic configuration script<br>#     - web: <a href="http://www.kamailio.org">http://www.kamailio.org</a><br>
#     - svn: <a href="http://openser.svn.sourceforge.net/viewvc/openser/">http://openser.svn.sourceforge.net/viewvc/openser/</a><br>#<br># Direct your questions about this file to: &lt;<a href="mailto:users@lists.kamailio.org">users@lists.kamailio.org</a>&gt;<br>
#<br># Refer to the Core CookBook at <a href="http://www.kamailio.org/dokuwiki/doku.php">http://www.kamailio.org/dokuwiki/doku.php</a><br># for an explanation of possible statements, functions and parameters.<br>#<br># There are comments showing how to enable different features in th econfig<br>
# file. Such commented code starts with #X# where X is a letter to identify<br># a feature. Delete entire #X# if you want to enable that feature. Next are<br># sed commands that help you enable such features.<br>#<br>####### Global Parameters #########<br>
<br>debug=3<br>log_stderror=no<br>log_facility=LOG_LOCAL0<br><br>fork=yes<br>children=4<br><br>/* uncomment the following lines to enable debugging */<br>#debug=6<br>#fork=no<br>log_stderror=yes<br><br>/* uncomment the next line to disable TCP (default on) */<br>
#disable_tcp=yes<br><br>/* uncomment the next line to enable the auto temporary blacklisting of<br>   not available destinations (default disabled) */<br>#disable_dns_blacklist=no<br><br>/* uncomment the next line to enable IPv6 lookup after IPv4 dns<br>
   lookup failures (default disabled) */<br>#dns_try_ipv6=yes<br><br>/* uncomment the next line to disable the auto discovery of local aliases<br>   based on revers DNS on IPs (default on) */<br>#auto_aliases=no<br><br>/* uncomment the following lines to enable TLS support  (default off) */<br>
#disable_tls = no<br>#listen = tls:your_IP:5061<br>#tls_verify_server = 1<br>#tls_verify_client = 1<br>#tls_require_client_certificate = 0<br>#tls_method = TLSv1<br>#tls_certificate = &quot;/usr/local/etc/kamailio/tls/user/user-cert.pem&quot;<br>
#tls_private_key = &quot;/usr/local/etc/kamailio/tls/user/user-privkey.pem&quot;<br>#tls_ca_list     = &quot;/usr/local/etc/kamailio/tls/user/user-calist.pem&quot;<br><br><br>port=5060<br><br>/* uncomment and configure the following line if you want Kamailio to<br>
   bind on a specific interface/port/proto (default bind on all available) */<br>listen=udp:<a href="http://172.16.0.141:5060">172.16.0.141:5060</a><br><br>####### Modules Section ########<br><br>#set module path<br>mpath=&quot;/usr/local/lib/kamailio/modules/&quot;<br>
<br>/* uncomment next line for MySQL DB support */<br>loadmodule &quot;db_mysql.so&quot;<br>loadmodule &quot;mi_fifo.so&quot;<br>loadmodule &quot;sl.so&quot;<br>loadmodule &quot;tm.so&quot;<br>loadmodule &quot;rr.so&quot;<br>
loadmodule &quot;pv.so&quot;<br>loadmodule &quot;maxfwd.so&quot;<br>loadmodule &quot;usrloc.so&quot;<br>loadmodule &quot;registrar.so&quot;<br>loadmodule &quot;textops.so&quot;<br>loadmodule &quot;uri_db.so&quot;<br>loadmodule &quot;siputils.so&quot;<br>
loadmodule &quot;xlog.so&quot;<br>loadmodule &quot;acc.so&quot;<br>/* uncomment next lines for MySQL based authentication support<br>   NOTE: a DB (like db_mysql) module must be also loaded */<br>loadmodule &quot;auth.so&quot;<br>
loadmodule &quot;auth_db.so&quot;<br><br>/* uncomment next line for aliases support<br>   NOTE: a DB (like db_mysql) module must be also loaded */<br>#loadmodule &quot;alias_db.so&quot;<br>/* uncomment next line for multi-domain support<br>
   NOTE: a DB (like db_mysql) module must be also loaded<br>   NOTE: be sure and enable multi-domain support in all used modules<br>         (see &quot;multi-module params&quot; section ) */<br>#loadmodule &quot;domain.so&quot;<br>
/* uncomment the next two lines for presence server support<br>   NOTE: a DB (like db_mysql) module must be also loaded */<br>loadmodule &quot;presence.so&quot;<br>loadmodule &quot;presence_xml.so&quot;<br>loadmodule &quot;pua.so&quot;<br>
loadmodule &quot;xmpp.so&quot;<br>loadmodule &quot;pua_xmpp.so&quot;<br>#loadmodule &quot;purple.so&quot;<br><br>#n#loadmodule &quot;nathelper.so&quot;<br><br># ----------------- setting module-specific parameters ---------------<br>
<br><br># ----- mi_fifo params -----<br>modparam(&quot;mi_fifo&quot;, &quot;fifo_name&quot;, &quot;/tmp/kamailio_fifo&quot;)<br><br><br># ----- rr params -----<br># add value to ;lr param to cope with most of the UAs<br>modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<br>
# do not append from tag to the RR (no need for this script)<br>modparam(&quot;rr&quot;, &quot;append_fromtag&quot;, 0)<br><br><br># ----- rr params -----<br>modparam(&quot;registrar&quot;, &quot;method_filtering&quot;, 1)<br>
/* uncomment the next line to disable parallel forking via location */<br># modparam(&quot;registrar&quot;, &quot;append_branches&quot;, 0)<br>/* uncomment the next line not to allow more than 10 contacts per AOR */<br>#modparam(&quot;registrar&quot;, &quot;max_contacts&quot;, 10)<br>
<br><br># ----- uri_db params -----<br>/* by default we disable the DB support in the module as we do not need it<br>   in this configuration */<br>modparam(&quot;uri_db&quot;, &quot;use_uri_table&quot;, 0)<br>modparam(&quot;uri_db&quot;, &quot;db_url&quot;, &quot;&quot;)<br>
<br><br># ----- acc params -----<br>/* what sepcial events should be accounted ? */<br>modparam(&quot;acc&quot;, &quot;early_media&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;report_ack&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;report_cancels&quot;, 1)<br>
/* by default ww do not adjust the direct of the sequential requests.<br>   if you enable this parameter, be sure the enable &quot;append_fromtag&quot;<br>   in &quot;rr&quot; module */<br>modparam(&quot;acc&quot;, &quot;detect_direction&quot;, 0)<br>
/* account triggers (flags) */<br>modparam(&quot;acc&quot;, &quot;failed_transaction_flag&quot;, 3)<br>modparam(&quot;acc&quot;, &quot;log_flag&quot;, 1)<br>modparam(&quot;acc&quot;, &quot;log_missed_flag&quot;, 2)<br>modparam(&quot;acc&quot;, &quot;log_extra&quot;,<br>
        &quot;src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd&quot;)<br>/* uncomment the following lines to enable DB accounting also */<br>#c#modparam(&quot;acc&quot;, &quot;db_flag&quot;, 1)<br>#c#modparam(&quot;acc&quot;, &quot;db_missed_flag&quot;, 2)<br>
#c#modparam(&quot;domain&quot;, &quot;db_url&quot;,<br>#c#     &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>#c#modparam(&quot;acc&quot;, &quot;db_extra&quot;,<br>
#c#     &quot;src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd&quot;)<br><br><br># ----- usrloc params -----<br>/* uncomment the following lines if you want to enable DB persistency<br>   for location entries */<br>
modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,   2)<br>modparam(&quot;usrloc&quot;, &quot;db_url&quot;,<br>        &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>
<br># ----- auth_db params -----<br>/* uncomment the following lines if you want to enable the DB based<br>   authentication */<br>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, no)<br>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br>
modparam(&quot;auth_db&quot;, &quot;db_url&quot;,<br>        &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>modparam(&quot;auth_db&quot;, &quot;load_credentials&quot;, &quot;&quot;)<br>
<br><br># ----- alias_db params -----<br>/* uncomment the following lines if you want to enable the DB based<br>   aliases */<br>#modparam(&quot;alias_db&quot;, &quot;db_url&quot;,<br>#       &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>
<br><br># ----- domain params -----<br>/* uncomment the following lines to enable multi-domain detection<br>   support */<br>#modparam(&quot;domain&quot;, &quot;db_url&quot;,<br>#       &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>
#modparam(&quot;domain&quot;, &quot;db_mode&quot;, 1)   # Use caching<br><br><br># ----- multi-module params -----<br>/* uncomment the following line if you want to enable multi-domain support<br>   in the modules (dafault off) */<br>
#modparam(&quot;alias_db|auth_db|usrloc|uri_db&quot;, &quot;use_domain&quot;, 1)<br><br><br># ----- presence params -----<br>/* uncomment the following lines if you want to enable presence */<br>modparam(&quot;presence|presence_xml&quot;, &quot;db_url&quot;,<br>
        &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>modparam(&quot;presence_xml&quot;, &quot;force_active&quot;, 1)<br>modparam(&quot;presence&quot;, &quot;server_address&quot;, &quot;sip:<a href="http://172.16.0.141:5060">172.16.0.141:5060</a>&quot;)<br>
<br># -- pua  and pua_xmpp params -- # new params mani added<br>modparam(&quot;pua&quot;, &quot;db_url&quot;, &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>
modparam(&quot;pua_xmpp&quot;, &quot;server_address&quot;, &quot;sip:<a href="http://172.16.0.141:5060">172.16.0.141:5060</a>&quot;)<br><br># -- xmpp parameters -- # new params mani added<br>modparam(&quot;xmpp&quot;, &quot;backend&quot;, &quot;component&quot;)<br>
modparam(&quot;xmpp&quot;, &quot;domain_separator&quot;, &quot;*&quot;)<br>modparam(&quot;xmpp&quot;, &quot;gateway_domain&quot;, &quot;<a href="http://sip-xmpp1.mydomain.com">sip-xmpp1.mydomain.com</a>&quot;)<br>modparam(&quot;xmpp&quot;, &quot;xmpp_domain&quot;, &quot;<a href="http://xmpp-sip1.mydomain.com">xmpp-sip1.mydomain.com</a>&quot;)<br>
modparam(&quot;xmpp&quot;, &quot;xmpp_host&quot;, &quot;<a href="http://xmpp1.mydomain.com">xmpp1.mydomain.com</a>&quot;)<br>modparam(&quot;xmpp&quot;, &quot;xmpp_password&quot;, &quot;secret&quot;)<br><br># ---- purple params -----<br>
#modparam(&quot;purple&quot;, &quot;db_url&quot;, &quot;mysql://<a href="http://openser:openserrw@172.16.0.141/openser">openser:openserrw@172.16.0.141/openser</a>&quot;)<br>#modparam(&quot;purple&quot;, &quot;db_table&quot;, &quot;purplemap&quot;)<br>
#modparam(&quot;purple&quot;, &quot;httpProxy_host&quot;, &quot;10.26.52.12&quot;)<br>#modparam(&quot;purple&quot;, &quot;httpProxy_port&quot;, 3128)<br><br><br># -- nathelper<br>#n#modparam(&quot;nathelper&quot;, &quot;rtpproxy_sock&quot;, &quot;udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a>&quot;)<br>
#n#modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)<br>#n#modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1)<br>#n#modparam(&quot;nathelper&quot;, &quot;sipping_bflag&quot;, 7)<br>#n#modparam(&quot;nathelper&quot;, &quot;sipping_from&quot;, &quot;<a href="mailto:sip%3Apinger@kamailio.org">sip:pinger@kamailio.org</a>&quot;)<br>
#n#modparam(&quot;registrar|nathelper&quot;, &quot;received_avp&quot;, &quot;$avp(i:80)&quot;)<br>#n#modparam(&quot;usrloc&quot;, &quot;nat_bflag&quot;, 6)<br><br><br>####### Routing Logic ########<br><br># main request routing logic<br>
<br>route{<br><br>        # initial sanity checks -- messages with<br>        # max_forwards==0, or excessively long requests<br>        if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>                sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>
                exit;<br>        };<br><br>        if (msg:len &gt;=  2048 ) {<br>               sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>               exit;<br>        };<br><br>        # we record-route all messages -- to make sure that<br>
        # subsequent messages will go through our proxy; that&#39;s<br>        # particularly good if upstream and downstream entities<br>        # use different transport protocol<br>        if (!method==&quot;REGISTER&quot;)<br>
                record_route();<br><br>        # subsequent messages withing a dialog should take the<br>        # path determined by record-routing<br>        if (loose_route()) {<br>                # mark routing logic in request<br>
                append_hf(&quot;P-hint: rr-enforced\r\n&quot;);<br>                route(1);<br>        };<br>        if(method == &quot;INVITE&quot;)<br>                setflag(5);<br><br>        if( uri=~&quot;<a href="mailto:sip%3A.%2B@sip-xmpp1.mydomain.com">sip:.+@sip-xmpp1.mydomain.com</a>&quot; ||<br>
                 uri=~&quot;<a href="mailto:sip%3A.%2B@sip-xmpp1.mydomain.com">sip:.+@sip-xmpp1.mydomain.com</a>&quot;)<br>        {<br>                if( is_method(&quot;PUBLISH|SUBSCRIBE|NOTIFY&quot;))<br>                        route(2);<br>
        }<br><br>        if( uri=~&quot;<a href="mailto:sip%3A.%2B@sip-xmpp1.mydomain.com">sip:.+@sip-xmpp1.mydomain.com</a>&quot;)<br>        {<br>                # absorb retransmissions ###<br>                if (!t_newtran()) {<br>
                        sl_reply_error();<br>                        return;<br>                }<br>        if (method == &quot;MESSAGE&quot;) {<br>                        log(&quot;*** xmpp-handled MESSAGE message.\n&quot;);<br>
                        if (xmpp_send_message()) {<br>                                t_reply(&quot;200&quot;, &quot;Accepted&quot;);<br>                        } else {<br>                                t_reply(&quot;404&quot;, &quot;Not found&quot;);<br>
                        }<br>                        return;<br>                }else {<br>                        t_reply(&quot;403&quot;,&quot;not supported&quot;);<br>                        exit;<br>                }<br>
<br>        }<br><br>        if (!uri==myself) {<br>                # mark routing logic in request<br>                append_hf(&quot;P-hint: outbound\r\n&quot;);<br>                # if you have some interdomain connections via TLS<br>
                #if(uri=~&quot;@<a href="http://tls_domain1.net">tls_domain1.net</a>&quot;) {<br>                #       t_relay(&quot;tls:<a href="http://domain1.net">domain1.net</a>&quot;);<br>                #       exit;<br>
                #} else if(uri=~&quot;@<a href="http://tls_domain2.net">tls_domain2.net</a>&quot;) {<br>                #       t_relay(&quot;tls:<a href="http://domain2.net">domain2.net</a>&quot;);<br>                #       exit;<br>
                #}<br>                route(1);<br>        };<br><br>        # if the request is for other domain use UsrLoc<br>        # (in case, it does not work, use the following command<br>        # with proper names and addresses in it)<br>
        if (uri==myself) {<br><br>                if( is_method(&quot;PUBLISH|SUBSCRIBE|NOTIFY&quot;))<br>                        route(2);<br><br>                if (method==&quot;REGISTER&quot;) {<br><br>                        if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;))<br>
                        {<br>                                www_challenge(&quot;&quot;, &quot;0&quot;);<br>                                exit;<br>                        }<br><br>                        if (!check_to())<br>
                        {<br>                                sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);<br>                                exit;<br>                        }<br><br>                        if (!save(&quot;location&quot;))<br>
                                sl_reply_error();<br><br>                        exit;<br>                };<br><br>                # native SIP destinations are handled using our USRLOC DB<br>                if (!lookup(&quot;location&quot;)) {<br>
                        sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);<br>                        exit;<br>                };<br>                append_hf(&quot;P-hint: usrloc applied\r\n&quot;);<br>        };<br>
<br>        route(1);<br>}<br><br><br>route[1] {<br>        # send it out now; use stateful forwarding as it works reliably<br>        # even for UDP2TCP<br>        if (!t_relay()) {<br>                sl_reply_error();<br>
        };<br>        exit;<br>}<br><br>route[2]<br>{<br>        if ( !t_newtran() ){<br>        sl_reply_error();<br>        exit;<br>     };<br><br>        if( is_method(&quot;NOTIFY&quot;) &amp;&amp; uri=~&quot;<a href="mailto:sip%3A.%2B@sip-xmpp1.mydomain.com">sip:.+@sip-xmpp1.mydomain.com</a>&quot;){<br>
                        log(&quot;*** calling pua_xmpp_notify() NOTIFY message.\n&quot;);<br>                pua_xmpp_notify();<br>                t_reply(&quot;200&quot;, &quot;OK&quot;);<br>                exit;<br>        }<br>
<br>        if(is_method(&quot;PUBLISH&quot;)){<br>                handle_publish();<br>                #t_release();<br>                /* the call to t_release is no longer needed in 1.5 */<br>        }<br>        else<br>
        if( is_method(&quot;SUBSCRIBE&quot;)){<br>                handle_subscribe();<br>                if( uri=~&quot;<a href="mailto:sip%3A.%2B@sip-xmpp1.mydomain.com">sip:.+@sip-xmpp1.mydomain.com</a>&quot; &amp;&amp; $hdr(Event)== &quot;presence&quot;){<br>
                        log(&quot;*** calling  pua_xmpp_req_winfo SUBSCRIBE message.\n&quot;);<br>                        pua_xmpp_req_winfo(&quot;$ruri&quot;, &quot;$hdr(Expires)&quot;);<br>                }<br>                #t_release();<br>
                /* the call to t_release is no longer needed in 1.5 */<br>        }<br><br>        exit;<br>}<br><br><br><br><br><div class="gmail_quote">On Tue, Jun 23, 2009 at 5:01 AM, Anca Vamanu <span dir="ltr">&lt;<a href="mailto:anca@opensips.org">anca@opensips.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Mani,<br>
<br>
Have you followed the config example from this link <a href="http://www.opensips.org/Resources/PuaXmppConfig" target="_blank">http://www.opensips.org/Resources/PuaXmppConfig</a> ?<br>
You must call  &#39;pua_xmpp_req_winfo&#39; for subscriptions to xmpp buddies.<br>
<br>
Do you see any error in the config file?<br>
<br>
regards,<br>
Anca<br>
<br>
mani sivaraman wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hello<br>
After a whole week of trying to connect sip and xmpp through opensips I&#39;m not able to add a xmpp buddy in a sip client and vice versa.I&#39;m able to send and receive messages between a sip and xmpp buddy. However the Presence Notification does not work either way. I get NOTIFY for &quot;presence.winfo&quot; event, but NO Notify for &quot;presence&quot; event.<br>

<br>
ANy one succesfully recevied presence event for an xmpp buddy ? Please help<br>
<br>
I&#39;m using Jabberd2 server as my xmpp server on the same physical box as that of opensips.<br>
<br>
Thanks in advance.<br>
Mani<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
  <br>
</blockquote>
<br>
</blockquote></div><br>