Hello,
perhaps the presence modules must be adjusted to detect the use of
set_contact_alias() and use it properly. This is an issue when presence
module is the first hop.
I have it in mind, but you can open an issue on the tracker.
Cheers,
Daniel
On 31/01/14 10:55, David Claybourne wrote:
Hi Daniel,
that seems to fix the problem :D. Thank you very much.
6(29076) DEBUG: presence [notify.c:927]: ps_build_dlg_t(): CONTACT =
sip:1000@93.220.237.128:64632;transport=ws
6(29076) DEBUG: <core> [socket_info.c:583]: grep_sock_info(): grep_sock_info -
checking if host==us: 12==12 && [5.45.101.128] == [5.45.101.128]
6(29076) DEBUG: <core> [socket_info.c:587]: grep_sock_info(): grep_sock_info
- checking if port 8088 (advertise 0) matches port 8088
6(29076) DEBUG: presence [notify.c:1575]: send_notify_request(): expires 600
status 1
6(29076) DEBUG: presence [notify.c:1728]: shm_dup_cbparam(): === 22/8/37
6(29076) DEBUG: tm [uac.c:243]: t_uac_prepare(): DEBUG:tm:t_uac:
next_hop=<sip:1000@93.220.237.128:64632;transport=ws>
6(29076) DEBUG: tm [uac.c:182]: dlg2hash(): DEBUG: dlg2hash: 5285
6(29076) DEBUG: websocket [ws_frame.c:713]: ws_frame_transmit(): Tx message:
NOTIFY sip:1000@93.220.237.128:64632;transport=ws SIP/2.0
Via: SIP/2.0/WS
5.45.101.128:8088;branch=z9hG4bK5a41.38587e65000000000000000000000000.0
To: <sip:1...@claybourne.de>;tag=vj3bsbnevo
From: <sip:1...@claybourne.de>;tag=6853f4be2e83d57dcdf85008ad4e4098-aa21
CSeq: 2 NOTIFY
Call-ID: jb3kmva261v4bht3sj9...@claybourne.de
Content-Length: 0
User-Agent: kamailio (4.1.1 (x86_64/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:5.45.101.128:8088;transport=ws>
Subscription-State: active;expires=600
6(29076) DEBUG: websocket [ws_frame.c:146]: encode_and_send_ws_frame():
encoding WebSocket frame
6(29076) DEBUG: websocket [ws_frame.c:177]: encode_and_send_ws_frame():
supported non-control frame: 0x1
6(29076) DEBUG: <core> [tcp_main.c:2320]: tcpconn_send_put(): tcp_send: send
from reader (29076 (6)), reusing fd
6(29076) DEBUG: <core> [tcp_main.c:2556]: tcpconn_do_send(): tcp_send:
sending...
6(29076) DEBUG: <core> [tcp_main.c:2590]: tcpconn_do_send(): tcp_send: after
real write: c= 0x7faebf0348b0 n=523 fd=6
6(29076) DEBUG: <core> [tcp_main.c:2591]: tcpconn_do_send(): tcp_send: buf=
?~NOTIFY sip:1000@93.220.237.128:64632;transport=ws SIP/2.0
Via: SIP/2.0/WS
5.45.101.128:8088;branch=z9hG4bK5a41.38587e65000000000000000000000000.0
To: <sip:1...@claybourne.de>;tag=vj3bsbnevo
From: <sip:1...@claybourne.de>;tag=6853f4be2e83d57dcdf85008ad4e4098-aa21
CSeq: 2 NOTIFY
Call-ID: jb3kmva261v4bht3sj9...@claybourne.de
Content-Length: 0
User-Agent: kamailio (4.1.1 (x86_64/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:5.45.101.128:8088;transport=ws>
Subscription-State: active;expires=600
6(29076) INFO: presence [notify.c:1602]: send_notify_request(): NOTIFY
sip:1...@claybourne.de via sip:1000@93.220.237.128:64632;transport=ws on behalf
of sip:1...@claybourne.de for event presence
Just added your suggestion in my config file.
# Presence server route
route[PRESENCE] {
xlog("SCRIPT: Mal sehen 7\n");
if(!is_method("PUBLISH|SUBSCRIBE"))
return;
#!ifdef WITH_PRESENCE
if (!t_newtran())
{
sl_reply_error();
exit;
};
if(is_method("PUBLISH"))
{
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
fix_nated_contact();
handle_subscribe();
t_release();
}
#!endif
# if presence enabled, this part will not be executed
if (is_method("PUBLISH") || $rU==$null)
{
sl_send_reply("404", "Not here");
exit;
}
return;
}
Your Project rocks. Can you add this fix to the web socket example config for
all others :D?
Greetings
David
Am 31.01.2014 um 06:19 schrieb Daniel-Constantin Mierla <mico...@gmail.com>:
Hello,
can you try to use fix_nated_contact() for subscribe requests?
Cheers,
Daniel
On 28/01/14 23:17, David Claybourne wrote:
Hi Kamailio-Community,
i have the following problem. Publish and subscribe works as suspected. But
after saving the presence state from a publish request and notifying the users
via NOTIFY, users with a websocket connection don't get the notify request at
all :(.
Here is the version of kamailio i use:
version: kamailio 4.1.1 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC,
USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
I created a log file and attached the notify event (the problem is that a
websocket dont have a real IP Address), is there any possibility to use the
nathelper module for fixing this problem?
I also attached the config file. Thanks for the help
Greetings
David
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users