Re: [SR-Users] Issue handling SRTP and RTP with rtpproxy and rtpengine
On 07/15/2015 08:44 AM, Alberto Sagredo wrote: Hi Alberto, can you also share part of the relevant place where you are calling that route? Cheers, Roberto Fichera. Hi Daniel Kamailio is for hard people and fun :) Thanks Visily i finnaly got it working with your tip. You were right about internal external options instead direction=... Here its some code to someone could need it route[RTPPROXY] { if (is_method(INVITE)){ if(ds_is_from_list(1)){ if (is_ip_rfc1918($si)) { if (sdp_get_line_startswith($avp(mline), m=)) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ SAVP) { xlog(L_INFO, We got SRTP ); rtpengine_manage(trust-address internal external replace-origin replace-session-connection ICE=remove ); return; } #!endif if ($avp(mline) =~ AVP) { xlog(L_INFO, We got RTP ); #!ifdef WITH_RTPPROXY set_rtp_proxy_set(1); rtpproxy_manage(fwei); start_recording(); #!endif #!ifdef WITH_RTPENGINE rtpengine_manage(trust-address internal external replace-origin replace-session-connection ICE=remove ); #!endif } } } } else if(!ds_is_from_list()){ if (sdp_get_line_startswith($avp(mline), m=)) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ SAVP) { xlog(L_INFO, We got SRTP ); rtpengine_manage(external internal replace-origin replace-session-connection ICE=remove RTP AVP); return; } #!endif if ($avp(mline) =~ AVP) { xlog(L_INFO, We got RTP ); #!ifdef WITH_RTPPROXY set_rtp_proxy_set(1); rtpproxy_manage(fwie); start_recording(); #!endif #!ifdef WITH_RTPENGINE rtpengine_manage(external internal replace-origin replace-session-connection ICE=remove RTP AVP); #!endif } } } } } 2015-07-14 18:46 GMT+02:00 Daniel Tryba d.tr...@pocos.nl mailto:d.tr...@pocos.nl: On Tuesday 14 July 2015 18:19:02 Alberto Sagredo wrote: In my tests rtpproxy recording waste less resources than asterisk That was one of the reasons How much time have you spend so far on a problem that asterisk can handle out of the box? ;) I'd love to do this with kamailio/rtpengine (I don't record), but sofar the blunt quickfix is to use asterisk. I needed a transcoder anyway and handling RTP/SRTP conversions when either endpoint needs it is simple. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ 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 ___ 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
Re: [SR-Users] Kannot start kamailio 4.3
On 06/23/2015 02:58 PM, Yuriy Gorlichenko wrote: Hi, Try to start kamailio on Ubuntu 14.04.02 Get this errors ERROR: ctl [init_socks.c:115]: init_unix_sock(): ERROR: init_unix_sock: bind: No such file or directory [2] Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: ctl [ctl.c:273]: mod_init(): ERROR: ctl: mod_init: init ctrl. sockets failed Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: core [sr_module.c:945]: init_mod(): Error while initializing module ctl (/usr/local/lib64/kamailio/modules/ctl.so) my params for ctl # - ctl params - modparam(ctl, binrpc, unix:/var/run/kamailio/kamailio_ctl) mkdir -p /var/run/kamailio chmod kamailio:kamailio /var/run/kamailio and restart it version: kamailio 4.4.0-dev1 (x86_64/linux) 1dbd53 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, F_MALLOC, DBG_F_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 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 1dbd53 compiled on 06:24:22 Jun 23 2015 with gcc 4.8.4 ___ 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 ___ 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
Re: [SR-Users] Kannot start kamailio 4.3
On 06/23/2015 03:57 PM, Yuriy Gorlichenko wrote: Hi Yuriy, done this. now kamailio fails when try to fork... Jun 23 09:56:22 kamailio-test kamailio[4122]: ALERT: core [main.c:725]: handle_sigs(): child process 4133 exited normally, status=255 Jun 23 09:56:22 kamailio-test kamailio[4122]: INFO: core [main.c:743]: handle_sigs(): terminating due to SIGCHLD Please post more logs because this isn't enough. 2015-06-23 16:08 GMT+03:00 Roberto Fichera ker...@tekno-soft.it mailto:ker...@tekno-soft.it: On 06/23/2015 03:03 PM, Roberto Fichera wrote: On 06/23/2015 02:58 PM, Yuriy Gorlichenko wrote: Hi, Try to start kamailio on Ubuntu 14.04.02 Get this errors ERROR: ctl [init_socks.c:115]: init_unix_sock(): ERROR: init_unix_sock: bind: No such file or directory [2] Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: ctl [ctl.c:273]: mod_init(): ERROR: ctl: mod_init: init ctrl. sockets failed Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: core [sr_module.c:945]: init_mod(): Error while initializing module ctl (/usr/local/lib64/kamailio/modules/ctl.so) my params for ctl # - ctl params - modparam(ctl, binrpc, unix:/var/run/kamailio/kamailio_ctl) mkdir -p /var/run/kamailio chmod kamailio:kamailio /var/run/kamailio sorry chown kamailio:kamailio /var/run/kamailio and restart it version: kamailio 4.4.0-dev1 (x86_64/linux) 1dbd53 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, F_MALLOC, DBG_F_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 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 1dbd53 compiled on 06:24:22 Jun 23 2015 with gcc 4.8.4 ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ 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 ___ 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
Re: [SR-Users] Kannot start kamailio 4.3
On 06/23/2015 03:03 PM, Roberto Fichera wrote: On 06/23/2015 02:58 PM, Yuriy Gorlichenko wrote: Hi, Try to start kamailio on Ubuntu 14.04.02 Get this errors ERROR: ctl [init_socks.c:115]: init_unix_sock(): ERROR: init_unix_sock: bind: No such file or directory [2] Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: ctl [ctl.c:273]: mod_init(): ERROR: ctl: mod_init: init ctrl. sockets failed Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: core [sr_module.c:945]: init_mod(): Error while initializing module ctl (/usr/local/lib64/kamailio/modules/ctl.so) my params for ctl # - ctl params - modparam(ctl, binrpc, unix:/var/run/kamailio/kamailio_ctl) mkdir -p /var/run/kamailio chmod kamailio:kamailio /var/run/kamailio sorry chown kamailio:kamailio /var/run/kamailio and restart it version: kamailio 4.4.0-dev1 (x86_64/linux) 1dbd53 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, F_MALLOC, DBG_F_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 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 1dbd53 compiled on 06:24:22 Jun 23 2015 with gcc 4.8.4 ___ 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 ___ 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
Re: [SR-Users] Kannot start kamailio 4.3
On 06/23/2015 03:03 PM, Roberto Fichera wrote: On 06/23/2015 02:58 PM, Yuriy Gorlichenko wrote: Hi, Try to start kamailio on Ubuntu 14.04.02 Get this errors ERROR: ctl [init_socks.c:115]: init_unix_sock(): ERROR: init_unix_sock: bind: No such file or directory [2] Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: ctl [ctl.c:273]: mod_init(): ERROR: ctl: mod_init: init ctrl. sockets failed Jun 23 08:54:29 kamailio-test kamailio[3706]: ERROR: core [sr_module.c:945]: init_mod(): Error while initializing module ctl (/usr/local/lib64/kamailio/modules/ctl.so) my params for ctl # - ctl params - modparam(ctl, binrpc, unix:/var/run/kamailio/kamailio_ctl) mkdir -p /var/run/kamailio chmod kamailio:kamailio /var/run/kamailio sorry chown kamailio:kamailio /var/run/kamailio and restart it version: kamailio 4.4.0-dev1 (x86_64/linux) 1dbd53 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, F_MALLOC, DBG_F_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 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 1dbd53 compiled on 06:24:22 Jun 23 2015 with gcc 4.8.4 ___ 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 ___ 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
Re: [SR-Users] WARNING: tm [t_lookup.c:1537]: t_unref(): WARNING: script writer didn't release transaction
On 06/18/2015 11:24 PM, Daniel-Constantin Mierla wrote: Hello, Hi Daniel, save() for REGISTER request sends a 200ok stateless if the transaction was not created before. But an async function creates a transaction, suspending it for a while in memory. If the route executed by async is not forwarding the register nor sending a reply to it via tm, then the register transaction end up in an undecided routing state in memory. That is the reason of the warning you get. As you don't want to process the register in asynchronous mode, might be better to use mqueue and rtimer to delegate the tasks for notifications to another process. Ok! I'll try it. Cheers, Roberto Fichera. Cheers, Daniel On 18/06/15 15:37, Roberto Fichera wrote: On 06/10/2015 04:19 PM, Roberto Fichera wrote: Hi All, Hi All, I'm getting the warning in the subject after replacing a route() with a async_task_route(). In the called route() I'm doing some db query and send notify messages using the uac module. The async_task_route() is called once received a register message. Any idea what's is going on? I would show some additional info, the idea is to make asynchronous a db query and some UAC notification message, kamailio is v4.2.5, below is the relevant part of my code: route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); } if (!is_avp_set($avp(received))) { $avp(received) = sip: + $si + : + $sp + ;transport= + $proto; } # Save and update the contact information if (!save(location, 0x04)) sl_reply_error(); if(@contact.expires) { $var(expires) = @contact.expires; } else { if(is_present_hf(Expires)) { $var(expires) = $hdr(Expires); } else { $var(expires) = 300; } } if($var(expires) == 0) { xlog(L_INFO, $ci|end|unregister request from $Au $si:$sp); $avp(s:subs_from) = $fU; $avp(s:subs_status) = Offline; route(PUSH_NOTIFICATION); exit; } $avp(s:subs_from) = $fU; $avp(s:subs_status) = Online; route(PUSH_NOTIFICATION); Se cambio la async_route() con una semplice route() tutto funziona correttamente. route[PUSH_NOTIFICATION] { async_route(ASYNC_PUSH_NOTIFICATION_USERCONTACTS, 5); } route[ASYNC_PUSH_NOTIFICATION_USERCONTACTS] { $var(subs_to) = $avp(s:subs_from); xlog(L_INFO, Request contacts push notification for $var(subs_to)); sql_query(ca, select contact from contactsmap where username = '$var(subs_to)', ra); if($dbr(ra=rows)0) { $var(i) = 0; while($var(i) $dbr(ra=rows)) { $avp(s:subs_from) = $dbr(ra=[$var(i),0]); $avp(s:subs_to) = $var(subs_to); xlog(L_INFO, Checking presence of $avp(s:subs_from)); if(registered(location, sip:$avp(s:subs_from)@test.net)) { xlog(L_INFO, Username $avp(s:subs_from) is registered sending push notification); route(send_event_notify_presence); } else { xlog(L_INFO, Username $avp(s:subs_from) is not registered, skipping); } $var(i) = $var(i) + 1; } } sql_result_free(ra); t_release(); } route[send_event_notify_presence] { xlog(L_INFO, request to send NOTIFY from $avp(s:subs_from) to $avp(s:subs_to)); $uac_req(method)= NOTIFY; $uac_req(ruri) = sip: + $avp(s:subs_to) + @test.net; $uac_req(turi) = sip: + $avp(s:subs_to) + @test.net; $uac_req(furi) = sip: + $avp(s:subs_from) + @test.net; $uac_req(ouri) = sip:test.net:5060; $uac_req(hdrs) = Event: voneus-contact-status\r\nVoneus-Status: + $avp(s:subs_status) + \r\n; $uac_req(body) = ; return uac_req_send(); } and the corresponding backtrack I've got: [root@ip-10-227-0-26 coredump]# coredumpctl gdb PID: 12881 (kamailio) UID: 997 (kamailio) GID: 996 (kamailio) Signal: 11 (SEGV) Timestamp: Thu 2015-06-18 14:22:25 BST (6min ago) Command Line: /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 32 -u kamailio -g kamailio -w /tmp Executable: /usr/sbin/kamailio Control Group: /system.slice/kamailio.service Unit: kamailio.service Slice: system.slice Boot ID: dbaf18ffab95459080b8f579d1c4c9bc Machine ID: 9388a5eb453d59f4fd98567b37061720 Hostname: ip-10-227-0-26.localdomain Coredump: /var/lib/systemd/coredump/core.kamailio.997.dbaf18ffab95459080b8f579d1c4c9bc.12881.143463374500.xz Message: Process 12881 (kamailio) of user 997 dumped core. Stack trace of thread 12881: #0 0x7464be9a atomic_cmpxchg_int
Re: [SR-Users] WARNING: tm [t_lookup.c:1537]: t_unref(): WARNING: script writer didn't release transaction
On 06/10/2015 04:19 PM, Roberto Fichera wrote: Hi All, Hi All, I'm getting the warning in the subject after replacing a route() with a async_task_route(). In the called route() I'm doing some db query and send notify messages using the uac module. The async_task_route() is called once received a register message. Any idea what's is going on? I would show some additional info, the idea is to make asynchronous a db query and some UAC notification message, kamailio is v4.2.5, below is the relevant part of my code: route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); } if (!is_avp_set($avp(received))) { $avp(received) = sip: + $si + : + $sp + ;transport= + $proto; } # Save and update the contact information if (!save(location, 0x04)) sl_reply_error(); if(@contact.expires) { $var(expires) = @contact.expires; } else { if(is_present_hf(Expires)) { $var(expires) = $hdr(Expires); } else { $var(expires) = 300; } } if($var(expires) == 0) { xlog(L_INFO, $ci|end|unregister request from $Au $si:$sp); $avp(s:subs_from) = $fU; $avp(s:subs_status) = Offline; route(PUSH_NOTIFICATION); exit; } $avp(s:subs_from) = $fU; $avp(s:subs_status) = Online; route(PUSH_NOTIFICATION); Se cambio la async_route() con una semplice route() tutto funziona correttamente. route[PUSH_NOTIFICATION] { async_route(ASYNC_PUSH_NOTIFICATION_USERCONTACTS, 5); } route[ASYNC_PUSH_NOTIFICATION_USERCONTACTS] { $var(subs_to) = $avp(s:subs_from); xlog(L_INFO, Request contacts push notification for $var(subs_to)); sql_query(ca, select contact from contactsmap where username = '$var(subs_to)', ra); if($dbr(ra=rows)0) { $var(i) = 0; while($var(i) $dbr(ra=rows)) { $avp(s:subs_from) = $dbr(ra=[$var(i),0]); $avp(s:subs_to) = $var(subs_to); xlog(L_INFO, Checking presence of $avp(s:subs_from)); if(registered(location, sip:$avp(s:subs_from)@test.net)) { xlog(L_INFO, Username $avp(s:subs_from) is registered sending push notification); route(send_event_notify_presence); } else { xlog(L_INFO, Username $avp(s:subs_from) is not registered, skipping); } $var(i) = $var(i) + 1; } } sql_result_free(ra); t_release(); } route[send_event_notify_presence] { xlog(L_INFO, request to send NOTIFY from $avp(s:subs_from) to $avp(s:subs_to)); $uac_req(method)= NOTIFY; $uac_req(ruri) = sip: + $avp(s:subs_to) + @test.net; $uac_req(turi) = sip: + $avp(s:subs_to) + @test.net; $uac_req(furi) = sip: + $avp(s:subs_from) + @test.net; $uac_req(ouri) = sip:test.net:5060; $uac_req(hdrs) = Event: voneus-contact-status\r\nVoneus-Status: + $avp(s:subs_status) + \r\n; $uac_req(body) = ; return uac_req_send(); } and the corresponding backtrack I've got: [root@ip-10-227-0-26 coredump]# coredumpctl gdb PID: 12881 (kamailio) UID: 997 (kamailio) GID: 996 (kamailio) Signal: 11 (SEGV) Timestamp: Thu 2015-06-18 14:22:25 BST (6min ago) Command Line: /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 32 -u kamailio -g kamailio -w /tmp Executable: /usr/sbin/kamailio Control Group: /system.slice/kamailio.service Unit: kamailio.service Slice: system.slice Boot ID: dbaf18ffab95459080b8f579d1c4c9bc Machine ID: 9388a5eb453d59f4fd98567b37061720 Hostname: ip-10-227-0-26.localdomain Coredump: /var/lib/systemd/coredump/core.kamailio.997.dbaf18ffab95459080b8f579d1c4c9bc.12881.143463374500.xz Message: Process 12881 (kamailio) of user 997 dumped core. Stack trace of thread 12881: #0 0x7464be9a atomic_cmpxchg_int (async.so) #1 0x7464beee futex_get (async.so) #2 0x7464d947 async_sleep (async.so) #3 0x74650d26 w_async_route (async.so) #4 0x08187a7a do_action (kamailio) #5 0x08192a9f run_actions (kamailio) #6 0x08184b24 do_action (kamailio) #7 0x08192a9f run_actions (kamailio) #8 0x0819310d run_top_route (kamailio) #9 0x74866288 reg_ul_expired_contact (registrar.so) #10 0x74895e16 run_ul_callbacks (usrloc.so) #11 0x74897977 wb_timer (usrloc.so) #12 0x74898948 timer_urecord (usrloc.so) #13 0x74891bc7 mem_timer_udomain (usrloc.so
[SR-Users] WARNING: tm [t_lookup.c:1537]: t_unref(): WARNING: script writer didn't release transaction
Hi All, I'm getting the warning in the subject after replacing a route() with a async_task_route(). In the called route() I'm doing some db query and send notify messages using the uac module. The async_task_route() is called once received a register message. Any idea what's is going on? Cheers, Roberto Fichera. ___ 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
[SR-Users] Playing with presence module and offline AoR
Hi All, I've started to play with presence module on kamailo 4.1.6, everything seems to work quite well up to now except one thing. I would like to notify the presence status of a NOT currently registered AoR as not online instead of not present. How can I do that? Thanks in advance, Roberto Fichera. ___ 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
Re: [SR-Users] tsilo module
On 03/24/2015 07:48 AM, Federico Cabiddu wrote: Ciao Federico, Hi Alex, the use case for which I wrote the module is the following. Suppose that your service is mobile oriented and thus you are using push (APN, GCM or custom one) mechanism to reach your customers' devices. The devices are not registered most of the time, they do after receiving a push triggered by an incoming INVITE. In a real scenario a user could have some traditional SIP devices always registered, some Android devices and some iOS devices. You don't know how many devices the customer has, you don't know how many devices are reachable by push at the moment you send it, you don't know how much time it will take for each device to register and maybe some will never receive the push. So, in the traditional way the lookup is done, you have to wait for all the devices to register or take some arbitrary decision on when stop waiting and sending out the INVITE. This is the use case I wrote the module for: as soon as the first device registers you send out the INVITE and when other devices for the same AOR register you keep adding branches to the transaction previously stored with ts_store(). It seemed to me that this was the simplest and more effective way to manage this scenario. At the beginning I though that it would be enough to write a function for the tmx module but then things got too complicated with the dependencies from the TM and the REGISTRAR module, so it was decided to have a dedicated module. Maybe some other use cases can be addressed by it. Hope I have been clear enough, maybe I should write a tutorial to better explain this. Can you please post an APN working example of usage? Thanks in advance, Roberto Fichera. Regards, Federico On Tue, Mar 24, 2015 at 4:25 AM, Alex Balashov abalas...@evaristesys.com mailto:abalas...@evaristesys.com wrote: Hello, I don't understand the tsilo module. What is the practical use case for it? Thanks, -- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States Tel: +1-800-250-5920 tel:%2B1-800-250-5920 (toll-free) / +1-678-954-0671 tel:%2B1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ 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 ___ 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
Re: [SR-Users] Fedora 18-20 kamailio GeoIP module missing?
On 07/02/2014 07:44 AM, Hossein Aghaie wrote: Hi, hi fo install geoip on fedora : #yum install GeoIP http://fedorafans.com/1393/01/04/3236/ Sorry! I've synthesized too much my request. I meant kamailio geoip module. Cheers, Roberto Fichera. On 7/1/14, Roberto Fichera ker...@tekno-soft.it wrote: Hi All, is there any reason why the GeoIP module is missing in the Fedora repo? Thanks in advance. Roberto Fichera. ___ 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 ___ 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 ___ 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
[SR-Users] Fedora 18-20 GeoIP missing?
Hi All, is there any reason why the GeoIP module is missing in the Fedora repo? Thanks in advance. Roberto Fichera. ___ 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
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/11/2014 04:17 PM, Roberto Fichera wrote: Hi Daniel, do you have an idea why I'm getting the issue below? Cheers, Roberto Fichera. On 06/10/2014 12:40 PM, Roberto Fichera wrote: Hi, On 06/10/2014 12:22 PM, Daniel-Constantin Mierla wrote: Hi, On 10/06/14 10:37, Roberto Fichera wrote: [..] the parse from error don't seem to be from parse_msg(). Can you print the uac buffer and send it over here to see if it is something wrong there? Jun 10 09:32:29 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29663]: DEBUG: msilo [msilo.c:1403]: m_tm_callback_on_delivered_event(): t-uac[0].request.buffer: MESSAGE sip:te...@test.com SIP/2.0 I've used LM_DBG() to print it. Can you paste here the full LM_DBG line? It prints only the first line. Maybe you can print also the length of the buffer which is a special field just to see its value. this is what journalctl -xfa is printing out. Likely it is truncating the output. This is what the t-uac[0].request.buffer has in the callback: MESSAGE sip:te...@test.com SIP/2.0 Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK6c43.66304147.0 To: sip:te...@test.com From: sip:te...@test.com;tag=90a2f67ea18c2dbc1dd6d5c5f690acb0-5ca3 CSeq: 10 MESSAGE Call-ID: 3f7b9fdc-4789@10.227.0.26 Max-Forwards: 70 Content-Length: 18 User-Agent: kamailio (4.1.3 (i386/linux)) Date: Wed, 11 Jun 2014 13:59:48 GMT Content-Type: text/chat DICE-Msg-Id: 332a0c12-82c5-4bac-ab3f-80626ebfa108 MSILO: true test message while the log shown: Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 59261 label 0 branch 0 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0xb2fc5bfc)! Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end=0xb2fc5bfc Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2206]: reply_received(): DEBUG: reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=0) Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:1304]: t_should_relay_response(): - T_code=0, new_code=200 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2086]: local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2123]: local_reply(): DEBUG: local transaction completed Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_hooks.c:288]: run_trans_callbacks_internal(): DBG: trans=0xb2fc5bfc, callback type 1024, id 0 entered Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1378]: m_tm_callback_on_delivered_event(): msilo_notification_event 0xb30a4e14 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1380]: m_tm_callback_on_delivered_event(): completed with status 200 [mid: 157] Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1393]: m_tm_callback_on_delivered_event(): message 157 was sent successfully Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [ms_msg_list.c:236]: msg_list_set_flag(): mid:157 fl:4 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:623]: parse_msg(): SIP Request: Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:625]: parse_msg(): method: MESSAGE Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:627]: parse_msg(): uri: sip:te...@test.com Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:629]: parse_msg(): version: SIP/2.0 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1412]: m_tm_callback_on_delivered_event(): executing event_route[msilo:on-delivered] (1) Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1419]: m_tm_callback_on_delivered_event(): event_route[msilo:on-delivered] req=0xbfcbbdd0) Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: ERROR: core [parser/parse_from.c:58]: parse_from_header
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/10/2014 12:40 PM, Roberto Fichera wrote: Hi, On 06/10/2014 12:22 PM, Daniel-Constantin Mierla wrote: Hi, On 10/06/14 10:37, Roberto Fichera wrote: [..] the parse from error don't seem to be from parse_msg(). Can you print the uac buffer and send it over here to see if it is something wrong there? Jun 10 09:32:29 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29663]: DEBUG: msilo [msilo.c:1403]: m_tm_callback_on_delivered_event(): t-uac[0].request.buffer: MESSAGE sip:te...@test.com SIP/2.0 I've used LM_DBG() to print it. Can you paste here the full LM_DBG line? It prints only the first line. Maybe you can print also the length of the buffer which is a special field just to see its value. this is what journalctl -xfa is printing out. Likely it is truncating the output. This is what the t-uac[0].request.buffer has in the callback: MESSAGE sip:te...@test.com SIP/2.0 Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK6c43.66304147.0 To: sip:te...@test.com From: sip:te...@test.com;tag=90a2f67ea18c2dbc1dd6d5c5f690acb0-5ca3 CSeq: 10 MESSAGE Call-ID: 3f7b9fdc-4789@10.227.0.26 Max-Forwards: 70 Content-Length: 18 User-Agent: kamailio (4.1.3 (i386/linux)) Date: Wed, 11 Jun 2014 13:59:48 GMT Content-Type: text/chat DICE-Msg-Id: 332a0c12-82c5-4bac-ab3f-80626ebfa108 MSILO: true test message while the log shown: Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 59261 label 0 branch 0 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0xb2fc5bfc)! Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end=0xb2fc5bfc Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2206]: reply_received(): DEBUG: reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=0) Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:1304]: t_should_relay_response(): - T_code=0, new_code=200 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2086]: local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2123]: local_reply(): DEBUG: local transaction completed Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: tm [t_hooks.c:288]: run_trans_callbacks_internal(): DBG: trans=0xb2fc5bfc, callback type 1024, id 0 entered Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1378]: m_tm_callback_on_delivered_event(): msilo_notification_event 0xb30a4e14 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1380]: m_tm_callback_on_delivered_event(): completed with status 200 [mid: 157] Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1393]: m_tm_callback_on_delivered_event(): message 157 was sent successfully Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [ms_msg_list.c:236]: msg_list_set_flag(): mid:157 fl:4 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:623]: parse_msg(): SIP Request: Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:625]: parse_msg(): method: MESSAGE Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:627]: parse_msg(): uri: sip:te...@test.com Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: core [parser/msg_parser.c:629]: parse_msg(): version: SIP/2.0 Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1412]: m_tm_callback_on_delivered_event(): executing event_route[msilo:on-delivered] (1) Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1419]: m_tm_callback_on_delivered_event(): event_route[msilo:on-delivered] req=0xbfcbbdd0) Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: ERROR: core [parser/parse_from.c:58]: parse_from_header(): ERROR:parse_from_header: bad msg or missing FROM header Jun 11 15:06:24 ip-10-227-0-26.localdomain /usr/sbin/kamailio[4895]: ERROR: pv [pv_core.c:449]: pv_get_from_attr(): cannot parse From header Jun 11 15:06:24 ip-10-227-0-26
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/09/2014 08:55 PM, Daniel-Constantin Mierla wrote: Hello, Hi, the $ru should be the same as $tu in this case. $ru will change when the message loops back and there is a lookup(location) in the config, but in the callback you don't get it. If you really want to get the content of the sip MESSAGE request sent out, you can find it in the t-uac[0].request.buffer (iirc) as plain text. you can take it from there and parse it in a sip_msg_t structure inside the callback. But with the SIP reply structure you may get what you need (if you just need $ru which is available in $tu). I've tried your suggestion but looks like something is missing in the buffer, the code I've added just for testing is the following: /* execute the msilo:on-delivered event route */ if(unlikely(msilo_event_on_delivered=0)) { int sflag_bk; int backup_route_type; struct run_act_ctx ctx; struct sip_msg req; -- if (parse_msg(t-uac[0].request.buffer, t-uac[0].request.buffer_len, req) != 0) { LM_ERR(parse_msg failed\n); goto done; } LM_DBG(executing event_route[msilo:on-delivered] (%d)\n, msilo_event_on_delivered); sflag_bk = getsflags(); backup_route_type = get_route_type(); set_route_type(EVENT_ROUTE); init_run_actions_ctx(ctx); LM_DBG(event_route[msilo:on-delivered] req=%p)\n, req); run_top_route(event_rt.rlist[msilo_event_on_delivered], req, ctx); set_route_type(backup_route_type); setsflagsval(sflag_bk); shm_free(event-req-buf); shm_free(event-req); shm_free(event); } but doesn't properly work: Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: DEBUG: msilo [msilo.c:1410]: m_tm_callback_on_delivered_event(): executing event_route[msilo:on-delivered] (1) Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: DEBUG: msilo [msilo.c:1417]: m_tm_callback_on_delivered_event(): event_route[msilo:on-delivered] event-req=0xbf81b830) Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: ERROR: core [parser/parse_from.c:58]: parse_from_header(): ERROR:parse_from_header: bad msg or missing FROM header Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: ERROR: pv [pv_core.c:449]: pv_get_from_attr(): cannot parse From header Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: INFO: script: MSILO event on-delivered null to ??? Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29250]: : core [pass_fd.c:293]: receive_fd(): ERROR: receive_fd: EOF on 13 Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29227]: ALERT: core [main.c:775]: handle_sigs(): child process 29231 exited by a signal 11 Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29250]: DEBUG: core [tcp_main.c:3595]: handle_ser_child(): DBG: handle_ser_child: dead child 2, pid 29231 (shutting down?) Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29227]: ALERT: core [main.c:778]: handle_sigs(): core was not generated Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29250]: DEBUG: core [io_wait.h:617]: io_watch_del(): DBG: io_watch_del (0x82cf640, 13, -1, 0x0) fd_no=23 called Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29227]: INFO: core [main.c:790]: handle_sigs(): INFO: terminating due to SIGCHLD Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29249]: INFO: core [main.c:841]: sig_usr(): INFO: signal 15 received Cheers, Roberto Fichera. Cheers, Daniel On 09/06/14 18:29, Roberto Fichera wrote: On 06/09/2014 06:16 PM, Daniel-Constantin Mierla wrote: [...] ps-req is null, because there is no incoming request, but you should have ps-rpl available if there is a 200ok. Which is my case! Only triggered once a 200ok has been received! Anyway it seems to work because the event route get executed but $ru seems not defined: Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1378]: m_tm_callback_on_delivered_event(): msilo_notification_event 0xb30cb748 Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1380]: m_tm_callback_on_delivered_event(): completed with status 200 [mid: 148] Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1393]: m_tm_callback_on_delivered_event(): message 148 was sent successfully Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [ms_msg_list.c:236]: msg_list_set_flag(): mid:148 fl:4 Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1403
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/10/2014 10:20 AM, Daniel-Constantin Mierla wrote: Hello, Hi, the parse from error don't seem to be from parse_msg(). Can you print the uac buffer and send it over here to see if it is something wrong there? Jun 10 09:32:29 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29663]: DEBUG: msilo [msilo.c:1403]: m_tm_callback_on_delivered_event(): t-uac[0].request.buffer: MESSAGE sip:te...@test.com SIP/2.0 I've used LM_DBG() to print it. You get a crash as well, very likely due to the shm free at the end. The rest of the code hasn't changed, so I kept all the shm_malloc(), actually I do not expect them to fail. Cheers, Roberto Fichera. Cheers, Daniel On 10/06/14 09:40, Roberto Fichera wrote: On 06/09/2014 08:55 PM, Daniel-Constantin Mierla wrote: Hello, Hi, the $ru should be the same as $tu in this case. $ru will change when the message loops back and there is a lookup(location) in the config, but in the callback you don't get it. If you really want to get the content of the sip MESSAGE request sent out, you can find it in the t-uac[0].request.buffer (iirc) as plain text. you can take it from there and parse it in a sip_msg_t structure inside the callback. But with the SIP reply structure you may get what you need (if you just need $ru which is available in $tu). I've tried your suggestion but looks like something is missing in the buffer, the code I've added just for testing is the following: /* execute the msilo:on-delivered event route */ if(unlikely(msilo_event_on_delivered=0)) { int sflag_bk; int backup_route_type; struct run_act_ctx ctx; struct sip_msg req; -- if (parse_msg(t-uac[0].request.buffer, t-uac[0].request.buffer_len, req) != 0) { LM_ERR(parse_msg failed\n); goto done; } LM_DBG(executing event_route[msilo:on-delivered] (%d)\n, msilo_event_on_delivered); sflag_bk = getsflags(); backup_route_type = get_route_type(); set_route_type(EVENT_ROUTE); init_run_actions_ctx(ctx); LM_DBG(event_route[msilo:on-delivered] req=%p)\n, req); run_top_route(event_rt.rlist[msilo_event_on_delivered], req, ctx); set_route_type(backup_route_type); setsflagsval(sflag_bk); shm_free(event-req-buf); shm_free(event-req); shm_free(event); } but doesn't properly work: Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: DEBUG: msilo [msilo.c:1410]: m_tm_callback_on_delivered_event(): executing event_route[msilo:on-delivered] (1) Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: DEBUG: msilo [msilo.c:1417]: m_tm_callback_on_delivered_event(): event_route[msilo:on-delivered] event-req=0xbf81b830) Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: ERROR: core [parser/parse_from.c:58]: parse_from_header(): ERROR:parse_from_header: bad msg or missing FROM header Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: ERROR: pv [pv_core.c:449]: pv_get_from_attr(): cannot parse From header Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29231]: INFO: script: MSILO event on-delivered null to ??? Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29250]: : core [pass_fd.c:293]: receive_fd(): ERROR: receive_fd: EOF on 13 Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29227]: ALERT: core [main.c:775]: handle_sigs(): child process 29231 exited by a signal 11 Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29250]: DEBUG: core [tcp_main.c:3595]: handle_ser_child(): DBG: handle_ser_child: dead child 2, pid 29231 (shutting down?) Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29227]: ALERT: core [main.c:778]: handle_sigs(): core was not generated Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29250]: DEBUG: core [io_wait.h:617]: io_watch_del(): DBG: io_watch_del (0x82cf640, 13, -1, 0x0) fd_no=23 called Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29227]: INFO: core [main.c:790]: handle_sigs(): INFO: terminating due to SIGCHLD Jun 10 08:32:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29249]: INFO: core [main.c:841]: sig_usr(): INFO: signal 15 received Cheers, Roberto Fichera. Cheers, Daniel On 09/06/14 18:29, Roberto Fichera wrote: On 06/09/2014 06:16 PM, Daniel-Constantin Mierla wrote: [...] ps-req is null, because there is no incoming request, but you should have ps-rpl available if there is a 200ok. Which is my case! Only triggered once a 200ok has been received! Anyway it seems to work because the event route get executed but $ru seems not defined
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/10/2014 12:22 PM, Daniel-Constantin Mierla wrote: Hi, On 10/06/14 10:37, Roberto Fichera wrote: [..] the parse from error don't seem to be from parse_msg(). Can you print the uac buffer and send it over here to see if it is something wrong there? Jun 10 09:32:29 ip-10-227-0-26.localdomain /usr/sbin/kamailio[29663]: DEBUG: msilo [msilo.c:1403]: m_tm_callback_on_delivered_event(): t-uac[0].request.buffer: MESSAGE sip:te...@test.com SIP/2.0 I've used LM_DBG() to print it. Can you paste here the full LM_DBG line? It prints only the first line. Maybe you can print also the length of the buffer which is a special field just to see its value. this is what journalctl -xfa is printing out. Likely it is truncating the output. Cheers, Daniel You get a crash as well, very likely due to the shm free at the end. The rest of the code hasn't changed, so I kept all the shm_malloc(), actually I do not expect them to fail. Cheers, Roberto Fichera. -- 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 ___ 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
[SR-Users] MSILO add on deliver event route still no joy
Hi All, I'm trying to add an event route to be execute for each successfully delivered message from msilo module, but I'm still not getting running the event route I have defined for it in the script. If someone can have a look at the patch and give me some hint would be really great. Thanks in advance. Roberto Fichera. diff --git a/modules/msilo/msilo.c b/modules/msilo/msilo.c index 903b3cf..3d55c3a 100644 --- a/modules/msilo/msilo.c +++ b/modules/msilo/msilo.c @@ -62,9 +62,13 @@ #include ../../parser/contact/parse_contact.h #include ../../parser/parse_allow.h #include ../../parser/parse_methods.h +#include ../../parser/msg_parser.h #include ../../resolve.h #include ../../usr_avp.h #include ../../mod_fix.h +#include ../../dprint.h +#include ../../globals.h +#include ../../dset.h #include ../../modules/tm/tm_load.h @@ -73,7 +77,7 @@ #include api.h #define MAX_DEL_KEYS 1 -#define NR_KEYS 11 +#define NR_KEYS 12 static str sc_mid = str_init(id); /* 0 */ static str sc_from= str_init(src_addr); /* 1 */ @@ -86,6 +90,7 @@ static str sc_exp_time= str_init(exp_time); /* 7 */ static str sc_inc_time= str_init(inc_time); /* 8 */ static str sc_snd_time= str_init(snd_time); /* 9 */ static str sc_stored_hdrs = str_init(extra_hdrs); /* 10 */ +static str sc_callid = str_init(callid); /* 11 */ #define SET_STR_VAL(_str, _res, _r, _c) \ if (RES_ROWS(_res)[_r].values[_c].nul == 0) \ @@ -185,6 +190,7 @@ int check_message_support(struct sip_msg* msg); /** TM callback function */ static void m_tm_callback( struct cell *t, int type, struct tmcb_params *ps); +static void m_tm_callback_on_delivered_event( struct cell *t, int type, struct tmcb_params *ps); static cmd_export_t cmds[]={ {m_store, (cmd_function)m_store_2, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE}, @@ -224,6 +230,7 @@ static param_export_t params[]={ { sc_inc_time, STR_PARAM, sc_inc_time.s }, { sc_snd_time, STR_PARAM, sc_snd_time.s }, { sc_stored_hdrs, STR_PARAM, sc_stored_hdrs.s}, + { sc_callid,STR_PARAM, sc_callid.s }, { snd_time_avp, STR_PARAM, ms_snd_time_avp_param.s }, { extra_hdrs_avp, STR_PARAM, ms_extra_hdrs_avp_param.s }, { add_date, INT_PARAM, ms_add_date }, @@ -281,6 +288,17 @@ static int bind_msilo(msilo_api_t* api) return 0; } +/* where to go for the local request route (msilo:on-delivered) */ +static int msilo_event_on_delivered=-1; /* default disabled */ + +typedef struct msilo_notification_event +{ + struct sip_msg *req; + int mid; +} msilo_notification_event_t; + +static msilo_notification_event_t *msilo_make_request(str *ruri, str *to, str *from, str *hdr, str *callid, int mid); + /** * init module function */ @@ -480,6 +498,11 @@ static int mod_init(void) if(ms_outbound_proxy.s!=NULL) ms_outbound_proxy.len = strlen(ms_outbound_proxy.s); +/* check if the on-delivered route event exists or not */ + msilo_event_on_delivered=route_lookup(event_rt, msilo:on-delivered); + if (msilo_event_on_delivered=0 event_rt.rlist[msilo_event_on_delivered]==0) + msilo_event_on_delivered=-1; /* disable */ + return 0; } @@ -583,8 +606,8 @@ static int m_store(struct sip_msg* msg, str *owner_s) #define EXTRA_HDRS_BUF_LEN 1024 static char extra_hdrs_buf[EXTRA_HDRS_BUF_LEN]; str extra_hdrs; - db_key_t db_keys[NR_KEYS-1]; - db_val_t db_vals[NR_KEYS-1]; + db_key_t db_keys[NR_KEYS]; + db_val_t db_vals[NR_KEYS]; db_key_t db_cols[1]; db1_res_t* res = NULL; uac_req_t uac_r; @@ -839,6 +862,16 @@ static int m_store(struct sip_msg* msg, str *owner_s) db_vals[nr_keys].val.blob_val.len = extra_hdrs.len; nr_keys++; + +/* add callid */ + db_keys[nr_keys] = sc_callid; + + db_vals[nr_keys].type = DB1_STR; + db_vals[nr_keys].nul = 0; + db_vals[nr_keys].val.str_val.s = msg-callid-body.s; + db_vals[nr_keys].val.str_val.len = msg-callid-body.len; + + nr_keys++; if(msilo_dbf.insert(db_con, db_keys, db_vals, nr_keys) 0) { @@ -962,16 +995,16 @@ static int m_dump(struct sip_msg* msg, str* owner_s) db_key_t ob_key; db_op_t db_ops[3]; db_val_t db_vals[3]; - db_key_t db_cols[7]; + db_key_t db_cols[8]; db1_res_t* db_res = NULL; - int i, db_no_cols = 7, db_no_keys = 3, mid, n; + int i, db_no_cols = 8, db_no_keys = 3, mid, n; static char hdr_buf[1024]; static char body_buf[1024]; struct sip_uri puri; uac_req_t uac_r; - str str_vals[5], hdr_str, body_str, extra_hdrs_str, tmp_extra_hdrs; + str str_vals[6], hdr_str, body_str, extra_hdrs_str, tmp_extra_hdrs; time_t rtime; - + /* init */ ob_key = sc_mid; @@ -989,6 +1022,7 @@ static int m_dump(struct sip_msg* msg, str* owner_s) db_cols[4]=sc_ctype; db_cols[5]=sc_inc_time; db_cols[6]=sc_stored_hdrs; + db_cols[7]=sc_callid; LM_DBG( start \n); @@ -1096,8 +1130,8 @@ static int m_dump(struct sip_msg* msg, str* owner_s) SET_STR_VAL
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/09/2014 05:16 PM, Daniel-Constantin Mierla wrote: Hello, Hi, your patch seems a bit to complex -- I didn't figure out why you store the message in pkg memory. Ok! So I will need to shm_malloc() the memory in such case, right? Also, you change to use Call-ID from database, any reason for that? MESSAGE request doesn't create a dialog and reusing call-id later can result in side effects if the CSeq overlaps or is lower. Ah! Ok! I'll remove it! Cheers, Roberto Fichera. Daniel On 09/06/14 15:47, Roberto Fichera wrote: Hi All, I'm trying to add an event route to be execute for each successfully delivered message from msilo module, but I'm still not getting running the event route I have defined for it in the script. If someone can have a look at the patch and give me some hint would be really great. Thanks in advance. Roberto Fichera. ___ 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 -- 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 ___ 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
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/09/2014 05:49 PM, Daniel-Constantin Mierla wrote: Hello, Hi, On 09/06/14 17:41, Roberto Fichera wrote: [...] your patch seems a bit to complex -- I didn't figure out why you store the message in pkg memory. Ok! So I will need to shm_malloc() the memory in such case, right? I don't get why you need to do that at all. If you need to access from, to, etc..., you can get them from the SIP response. You go in dangerous zone as you do that cloning. The idea was to set a sip_msg just to have all the pseudo-variable available within the event route and nothing else. Because you want to execute the event route on 200ok, the best is to run the event route with the SIP response structure. At the beginning this was my choice, but I'd always got ps-req = NULL in the callback tmcb_params hence the event route wasn't executed. But I'll re-try it just to be sure. BTW! using shm_malloc() I was finally able to execute the event route in the script with all the pseudo-variable correctly set! Cheers, Roberto Fichera. Cheers, Daniel -- 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 ___ 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
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/09/2014 06:03 PM, Roberto Fichera wrote: Hi, On 06/09/2014 05:49 PM, Daniel-Constantin Mierla wrote: Hello, Hi, On 09/06/14 17:41, Roberto Fichera wrote: [...] your patch seems a bit to complex -- I didn't figure out why you store the message in pkg memory. Ok! So I will need to shm_malloc() the memory in such case, right? I don't get why you need to do that at all. If you need to access from, to, etc..., you can get them from the SIP response. You go in dangerous zone as you do that cloning. The idea was to set a sip_msg just to have all the pseudo-variable available within the event route and nothing else. Because you want to execute the event route on 200ok, the best is to run the event route with the SIP response structure. At the beginning this was my choice, but I'd always got ps-req = NULL in the callback tmcb_params hence the event route wasn't executed. But I'll re-try it just to be sure. I can confirm, I'm always getting ps-req = NULL un 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 39390 label 0 branch 0 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0xb2f7ebfc)! Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end=0xb2f7ebfc Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:2206]: reply_received(): DEBUG: reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=0) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:1304]: t_should_relay_response(): - T_code=0, new_code=200 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:2086]: local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:2123]: local_reply(): DEBUG: local transaction completed Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_hooks.c:288]: run_trans_callbacks_internal(): DBG: trans=0xb2f7ebfc, callback type 1024, id 0 entered Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1378]: m_tm_callback_on_delivered_event(): msilo_notification_event 0xb301669c Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1380]: m_tm_callback_on_delivered_event(): completed with status 200 [mid: 147] Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1393]: m_tm_callback_on_delivered_event(): message 147 was sent successfully Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [ms_msg_list.c:236]: msg_list_set_flag(): mid:147 fl:4 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1403]: m_tm_callback_on_delivered_event(): executing event_route[msilo:on-delivered] (1) --- Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1410]: m_tm_callback_on_delivered_event(): event_route[msilo:on-delivered] ps-req=(nil)) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:1663]: cleanup_uac_timers(): DEBUG: cleanup_uac_timers: RETR/FR timers reset Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up
Re: [SR-Users] MSILO add on deliver event route still no joy
On 06/09/2014 06:16 PM, Daniel-Constantin Mierla wrote: Hello, Hi, ps-req is null, because there is no incoming request, but you should have ps-rpl available if there is a 200ok. Which is my case! Only triggered once a 200ok has been received! Anyway it seems to work because the event route get executed but $ru seems not defined: Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1378]: m_tm_callback_on_delivered_event(): msilo_notification_event 0xb30cb748 Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1380]: m_tm_callback_on_delivered_event(): completed with status 200 [mid: 148] Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1393]: m_tm_callback_on_delivered_event(): message 148 was sent successfully Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [ms_msg_list.c:236]: msg_list_set_flag(): mid:148 fl:4 Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1403]: m_tm_callback_on_delivered_event(): executing event_route[msilo:on-delivered] (1) Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: msilo [msilo.c:1410]: m_tm_callback_on_delivered_event(): event_route[msilo:on-delivered] event-req=0xb7275680) Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=90a2f67ea18c2dbc1dd6d5c5f690acb0-25e2 Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: INFO: script: MSILO event on-delivered sip:te...@test.com to null Jun 09 17:25:01 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25288]: DEBUG: tm [t_reply.c:1663]: cleanup_uac_timers(): DEBUG: cleanup_uac_timers: RETR/FR timers reset Cheers, Roberto Fichera. Cheers, Daniel On 09/06/14 18:12, Roberto Fichera wrote: On 06/09/2014 06:03 PM, Roberto Fichera wrote: Hi, On 06/09/2014 05:49 PM, Daniel-Constantin Mierla wrote: Hello, Hi, On 09/06/14 17:41, Roberto Fichera wrote: [...] your patch seems a bit to complex -- I didn't figure out why you store the message in pkg memory. Ok! So I will need to shm_malloc() the memory in such case, right? I don't get why you need to do that at all. If you need to access from, to, etc..., you can get them from the SIP response. You go in dangerous zone as you do that cloning. The idea was to set a sip_msg just to have all the pseudo-variable available within the event route and nothing else. Because you want to execute the event route on 200ok, the best is to run the event route with the SIP response structure. At the beginning this was my choice, but I'd always got ps-req = NULL in the callback tmcb_params hence the event route wasn't executed. But I'll re-try it just to be sure. I can confirm, I'm always getting ps-req = NULL un 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 39390 label 0 branch 0 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0xb2f7ebfc)! Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end=0xb2f7ebfc Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:2206]: reply_received(): DEBUG: reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=0) Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:1304]: t_should_relay_response(): - T_code=0, new_code=200 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:2086]: local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0 Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_reply.c:2123]: local_reply(): DEBUG: local transaction completed Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: tm [t_hooks.c:288]: run_trans_callbacks_internal(): DBG: trans=0xb2f7ebfc, callback type 1024, id 0 entered Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1378]: m_tm_callback_on_delivered_event(): msilo_notification_event 0xb301669c Jun 09 17:06:38 ip-10-227-0-26.localdomain /usr/sbin/kamailio[25089]: DEBUG: msilo [msilo.c:1380]: m_tm_callback_on_delivered_event
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/27/2014 08:37 AM, Daniel-Constantin Mierla wrote: Hello, Ciao, you can re-use the lib/kcore/faked_msg.{c,h} in your code, same being done by many event routes. Alternative is to build it yourself from the outgoing buffer, which is in transaction structure, inside the uac field (see tm_cell_t structure). Thanks! I'll have a look. Easier might be to run this event route with the response sip msg structure -- if you run it only when 200ok is received, the callback from tm has the response structure. Yep! The idea is to run it only when a 200 is received and to populate all the pseudo-variable with all fields of the delivered message. About the response structure from tm callback, do you mean the cell or tmcb_params? Cheers, Roberto Fichera. Cheers, Daniel On 26/05/14 16:46, Roberto Fichera wrote: On 05/26/2014 01:04 PM, Roberto Fichera wrote: Ciao, [...] On 26/05/14 12:13, Roberto Fichera wrote: On 05/26/2014 12:03 PM, Daniel-Constantin Mierla wrote: Hello, Ciao! good that you sent a reminder -- I checked while offline traveling, but then forgot to follow up. I expect that ps-req is null in this case, because there is no request received by kamailio. That results in xlog not doing anything. In other words, I expect the event route being executed, just the action inside is doesn't do anything in this case. Does this mean that I'll have to set a faked ps-req in order to get the event route executed? that's the safe way. The event route is executed, but many functions that you can use inside config routing blocks require a non-null sip message structure. It is the case of xlog() for example, which simply returns -1 if request is null. Ok! Can you suggest the safest and reasonable way to setup the request for this case? Ah! No! Wait! The event route is executed within a tm callback via tmb.t_request() so I'd expect a valid ps-req, don't you think so? I've found how to change the code ... just testing the logic. I'll get back to you in case. After a while I've found that I can pass a request using the uac_r.cbp field, so I've fixed the callback to use the passed fields instead a straight int (previously mid==message id) but I'm not sure how to build a fake sip_msg request regarding the given msilo dumped msg, could you please give me a tips how to do so? Cheers, Roberto Fichera. ___ 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
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/22/2014 09:08 AM, Roberto Fichera wrote: On 05/21/2014 11:15 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, have you had time to look at the problem below? Cheers, Roberto Fichera. Ciao, can you send the log messages printed with debug=3? Yes! Sure! Here it is: May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:633]: parse_msg(): SIP Reply (status): May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:635]: parse_msg(): version: SIP/2.0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:637]: parse_msg(): status: 202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:639]: parse_msg(): reason: Accepted May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, branch = z9hG4bK016e.a6c662d40000; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, rport = 1169; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 234, received = xx.xx.xx.xx; state=16 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [receive.c:152]: receive_msg(): After parse_msg... May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=0 T start=0x May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=74b38630e6be28bab2ebe17319971f33-c57e May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: To [88]; uri=[sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 58896 label 0 branch 0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0x7f21ba974408)! May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end=0x7f21ba974408 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:2206]: reply_received(): DEBUG: reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=0) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:1304]: t_should_relay_response(): - T_code=0, new_code=202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:2086]: local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:2123]: local_reply(): DEBUG: local transaction completed May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_hooks.c:288]: run_trans_callbacks_internal(): DBG: trans=0x7f21ba974408, callback type 1024, id 0 entered May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: msilo [msilo.c:1327]: m_tm_callback(): completed with status 202 [mid: 139782841221704/4] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: msilo [msilo.c:1340]: m_tm_callback(): message 4 was sent successfully May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: msilo [ms_msg_list.c:236]: msg_list_set_flag(): mid:4 fl:4 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/26/2014 12:03 PM, Daniel-Constantin Mierla wrote: Hello, Ciao! good that you sent a reminder -- I checked while offline traveling, but then forgot to follow up. I expect that ps-req is null in this case, because there is no request received by kamailio. That results in xlog not doing anything. In other words, I expect the event route being executed, just the action inside is doesn't do anything in this case. Does this mean that I'll have to set a faked ps-req in order to get the event route executed? Cheers, Roberto Fichera. Cheers, Daniel On 26/05/14 11:40, Roberto Fichera wrote: On 05/22/2014 09:08 AM, Roberto Fichera wrote: On 05/21/2014 11:15 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, have you had time to look at the problem below? Cheers, Roberto Fichera. Ciao, can you send the log messages printed with debug=3? Yes! Sure! Here it is: May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:633]: parse_msg(): SIP Reply (status): May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:635]: parse_msg(): version: SIP/2.0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:637]: parse_msg(): status: 202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:639]: parse_msg(): reason: Accepted May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, branch = z9hG4bK016e.a6c662d40000; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, rport = 1169; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 234, received = xx.xx.xx.xx; state=16 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [receive.c:152]: receive_msg(): After parse_msg... May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=0 T start=0x May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=74b38630e6be28bab2ebe17319971f33-c57e May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: To [88]; uri=[sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 58896 label 0 branch 0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0x7f21ba974408)! May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end=0x7f21ba974408 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:2206]: reply_received(): DEBUG: reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=0) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:1304]: t_should_relay_response(): - T_code=0, new_code=202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:2086]: local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_reply.c:2123]: local_reply(): DEBUG: local transaction completed May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/26/2014 12:25 PM, Roberto Fichera wrote: Ciao, On 05/26/2014 12:17 PM, Daniel-Constantin Mierla wrote: Ciao, Hello, On 26/05/14 12:13, Roberto Fichera wrote: On 05/26/2014 12:03 PM, Daniel-Constantin Mierla wrote: Hello, Ciao! good that you sent a reminder -- I checked while offline traveling, but then forgot to follow up. I expect that ps-req is null in this case, because there is no request received by kamailio. That results in xlog not doing anything. In other words, I expect the event route being executed, just the action inside is doesn't do anything in this case. Does this mean that I'll have to set a faked ps-req in order to get the event route executed? that's the safe way. The event route is executed, but many functions that you can use inside config routing blocks require a non-null sip message structure. It is the case of xlog() for example, which simply returns -1 if request is null. Ok! Can you suggest the safest and reasonable way to setup the request for this case? Ah! No! Wait! The event route is executed within a tm callback via tmb.t_request() so I'd expect a valid ps-req, don't you think so? Cheers, Roberto Fichera. Cheers, Daniel Cheers, Roberto Fichera. Cheers, Daniel On 26/05/14 11:40, Roberto Fichera wrote: On 05/22/2014 09:08 AM, Roberto Fichera wrote: On 05/21/2014 11:15 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, have you had time to look at the problem below? Cheers, Roberto Fichera. Ciao, can you send the log messages printed with debug=3? Yes! Sure! Here it is: May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:633]: parse_msg(): SIP Reply (status): May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:635]: parse_msg(): version: SIP/2.0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:637]: parse_msg(): status: 202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:639]: parse_msg(): reason: Accepted May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, branch = z9hG4bK016e.a6c662d40000; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, rport = 1169; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 234, received = xx.xx.xx.xx; state=16 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [receive.c:152]: receive_msg(): After parse_msg... May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=0 T start=0x May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=74b38630e6be28bab2ebe17319971f33-c57e May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: To [88]; uri=[sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 58896 label 0 branch 0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T=0x7f21ba974408)! May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T end
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/26/2014 12:32 PM, Roberto Fichera wrote: Ciao, On 05/26/2014 12:25 PM, Roberto Fichera wrote: Ciao, On 05/26/2014 12:17 PM, Daniel-Constantin Mierla wrote: Ciao, Hello, On 26/05/14 12:13, Roberto Fichera wrote: On 05/26/2014 12:03 PM, Daniel-Constantin Mierla wrote: Hello, Ciao! good that you sent a reminder -- I checked while offline traveling, but then forgot to follow up. I expect that ps-req is null in this case, because there is no request received by kamailio. That results in xlog not doing anything. In other words, I expect the event route being executed, just the action inside is doesn't do anything in this case. Does this mean that I'll have to set a faked ps-req in order to get the event route executed? that's the safe way. The event route is executed, but many functions that you can use inside config routing blocks require a non-null sip message structure. It is the case of xlog() for example, which simply returns -1 if request is null. Ok! Can you suggest the safest and reasonable way to setup the request for this case? Ah! No! Wait! The event route is executed within a tm callback via tmb.t_request() so I'd expect a valid ps-req, don't you think so? I've found how to change the code ... just testing the logic. I'll get back to you in case. Cheer, Roberto Fichera. Cheers, Roberto Fichera. Cheers, Daniel Cheers, Roberto Fichera. Cheers, Daniel On 26/05/14 11:40, Roberto Fichera wrote: On 05/22/2014 09:08 AM, Roberto Fichera wrote: On 05/21/2014 11:15 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, have you had time to look at the problem below? Cheers, Roberto Fichera. Ciao, can you send the log messages printed with debug=3? Yes! Sure! Here it is: May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:633]: parse_msg(): SIP Reply (status): May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:635]: parse_msg(): version: SIP/2.0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:637]: parse_msg(): status: 202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:639]: parse_msg(): reason: Accepted May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, branch = z9hG4bK016e.a6c662d40000; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, rport = 1169; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 234, received = xx.xx.xx.xx; state=16 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [receive.c:152]: receive_msg(): After parse_msg... May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=0 T start=0x May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=74b38630e6be28bab2ebe17319971f33-c57e May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: To [88]; uri=[sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:949]: t_reply_matching(): DEBUG: t_reply_matching: hash 58896 label 0 branch 0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1004]: t_reply_matching(): DEBUG: t_reply_matching: reply matched (T
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/26/2014 01:04 PM, Roberto Fichera wrote: Ciao, [...] On 26/05/14 12:13, Roberto Fichera wrote: On 05/26/2014 12:03 PM, Daniel-Constantin Mierla wrote: Hello, Ciao! good that you sent a reminder -- I checked while offline traveling, but then forgot to follow up. I expect that ps-req is null in this case, because there is no request received by kamailio. That results in xlog not doing anything. In other words, I expect the event route being executed, just the action inside is doesn't do anything in this case. Does this mean that I'll have to set a faked ps-req in order to get the event route executed? that's the safe way. The event route is executed, but many functions that you can use inside config routing blocks require a non-null sip message structure. It is the case of xlog() for example, which simply returns -1 if request is null. Ok! Can you suggest the safest and reasonable way to setup the request for this case? Ah! No! Wait! The event route is executed within a tm callback via tmb.t_request() so I'd expect a valid ps-req, don't you think so? I've found how to change the code ... just testing the logic. I'll get back to you in case. After a while I've found that I can pass a request using the uac_r.cbp field, so I've fixed the callback to use the passed fields instead a straight int (previously mid==message id) but I'm not sure how to build a fake sip_msg request regarding the given msilo dumped msg, could you please give me a tips how to do so? Cheers, Roberto Fichera. Cheer, Roberto Fichera. Cheers, Roberto Fichera. Cheers, Daniel Cheers, Roberto Fichera. Cheers, Daniel On 26/05/14 11:40, Roberto Fichera wrote: On 05/22/2014 09:08 AM, Roberto Fichera wrote: On 05/21/2014 11:15 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, have you had time to look at the problem below? Cheers, Roberto Fichera. Ciao, can you send the log messages printed with debug=3? Yes! Sure! Here it is: May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:633]: parse_msg(): SIP Reply (status): May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:635]: parse_msg(): version: SIP/2.0 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:637]: parse_msg(): status: 202 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:639]: parse_msg(): reason: Accepted May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, branch = z9hG4bK016e.a6c662d40000; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, rport = 1169; state=6 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:1284]: parse_via_param(): Found param type 234, received = xx.xx.xx.xx; state=16 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [receive.c:152]: receive_msg(): After parse_msg... May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=0 T start=0x May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=74b38630e6be28bab2ebe17319971f33-c57e May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: To [88]; uri=[sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [sip:te...@test.com] May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq CSeq: 10 MESSAGE May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: tm [t_lookup.c:949
Re: [SR-Users] Kamailio and MSILO with TLS AORs
: cleanup_uac_timers: RETR/FR timers reset May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil) May 22 08:58:04 dragon.tekno-soft.it /usr/sbin/kamailio[8436]: DEBUG: core [receive.c:296]: receive_msg(): receive_msg: cleaning up May 22 08:58:08 dragon.tekno-soft.it /usr/sbin/kamailio[8441]: DEBUG: pike [timer.c:77]: check_and_split_timer(): splitting 0x7f21ba98dab0(0x7f21ba7b15f8,0x7f21ba7b15f8)node=0x7f21ba98daa0 May 22 08:58:08 dragon.tekno-soft.it /usr/sbin/kamailio[8441]: DEBUG: pike [timer.c:102]: check_and_split_timer(): succ. to split (h=0x7f21ba7b15f8)(p=0x7f21ba7b15f8,n=0x7f21ba7b15f8) May 22 08:58:08 dragon.tekno-soft.it /usr/sbin/kamailio[8441]: DEBUG: pike [pike_funcs.c:234]: clean_routine(): clean node 0x7f21ba98daa0 (kids=(nil); hits=[0,0];leaf=[0,0]) May 22 08:58:08 dragon.tekno-soft.it /usr/sbin/kamailio[8441]: DEBUG: pike [pike_funcs.c:265]: clean_routine(): rmv node 0x7f21ba98daa0[192] May 22 08:58:08 dragon.tekno-soft.it /usr/sbin/kamailio[8441]: DEBUG: pike [ip_tree.c:364]: remove_node(): destroying node 0x7f21ba98daa0 May 22 08:58:10 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [io_wait.h:617]: io_watch_del(): DBG: io_watch_del (0x8eb2e0, 9, -1, 0x10) fd_no=2 called May 22 08:58:10 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [tcp_read.c:1437]: release_tcpconn(): releasing con 0x7f21ba9420c0, state 1, fd=9, id=2 May 22 08:58:10 dragon.tekno-soft.it /usr/sbin/kamailio[8454]: DEBUG: core [tcp_read.c:1438]: release_tcpconn(): extra_data 0x7f21ba941028 May 22 08:58:10 dragon.tekno-soft.it /usr/sbin/kamailio[8456]: DEBUG: core [tcp_main.c:3385]: handle_tcp_child(): handle_tcp_child: reader response= 7f21ba9420c0, 1 from 2 May 22 08:58:10 dragon.tekno-soft.it /usr/sbin/kamailio[8456]: DEBUG: core [io_wait.h:390]: io_watch_add(): DBG: io_watch_add(0x893040, 28, 2, 0x7f21ba9420c0), fd_no=20 May 22 08:58:10 dragon.tekno-soft.it /usr/sbin/kamailio[8456]: DEBUG: core [tcp_main.c:3515]: handle_tcp_child(): handle_tcp_child: CONN_RELEASE 0x7f21ba9420c0 refcnt= 1 Cheers, Roberto Fichera. Cheers, Daniel On 21/05/14 18:37, Roberto Fichera wrote: On 05/21/2014 09:08 AM, Roberto Fichera wrote: Hi There, On 05/20/2014 09:15 PM, Peter Villeneuve wrote: Hi Roberto, Hi Peter, Did you ever figure out how to do it? I'd be interested too. Not yet! I tried other ways, barely workarounds, but I guess I'll have to go into this quite soon because it is the straight way to go. The main problem is the lack of my knowledge of kamailio API so I'll have to study a bit some code in order to understand how to use it. BTW the idea is to trigger an event route were I'd like to set all the info regarding the dispatched message including the result of the delivering. I don't know if is possible but the best would be to set all the pseudo-variables so that such event route will be in the right context of the given MSILO message. So, any advice regarding the API would definitively help and put me in the right direction. Actually I've started to play with the above idea, so below you will find my current implementation which seems executed because I see the LM_DBG() log but the code within the event route but the corresponding script code does not. Any help? Cheers, Roberto Fichera. event_route [msilo:on-delivered] { xlog(L_INFO, MSILO event on-delivered $fu to $ru\n); } diff --git a/modules/msilo/msilo.c b/modules/msilo/msilo.c index 903b3cf..742c48d 100644 --- a/modules/msilo/msilo.c +++ b/modules/msilo/msilo.c @@ -281,6 +281,9 @@ static int bind_msilo(msilo_api_t* api) return 0; } +/* where to go for the local request route (msilo:on-delivered) */ +int msilo_event_on_delivered=-1; /* default disabled */ + /** * init module function */ @@ -480,6 +483,11 @@ static int mod_init(void) if(ms_outbound_proxy.s!=NULL) ms_outbound_proxy.len = strlen(ms_outbound_proxy.s
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/20/2014 09:15 PM, Peter Villeneuve wrote: Hi Roberto, Hi Peter, Did you ever figure out how to do it? I'd be interested too. Not yet! I tried other ways, barely workarounds, but I guess I'll have to go into this quite soon because it is the straight way to go. The main problem is the lack of my knowledge of kamailio API so I'll have to study a bit some code in order to understand how to use it. BTW the idea is to trigger an event route were I'd like to set all the info regarding the dispatched message including the result of the delivering. I don't know if is possible but the best would be to set all the pseudo-variables so that such event route will be in the right context of the given MSILO message. So, any advice regarding the API would definitively help and put me in the right direction. Cheers, Roberto Fichera. Cheers, Peter On Thu, Apr 17, 2014 at 4:04 PM, Roberto Fichera ker...@tekno-soft.it mailto:ker...@tekno-soft.it wrote: On 04/17/2014 10:36 AM, Roberto Fichera wrote: Hi All, On 04/16/2014 07:15 PM, Roberto Fichera wrote: Hi All, On 04/16/2014 06:53 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, most likely the messages are looped back, be sure you allow requests from 'myself' without authentication. You can watch loopback interface with ngrep to see if the messages are sent out. Yep! Allowing requests from myself solved the problem! Thanks! Another thing regarding MSILO, I would like to preserve some custom header fields for both instant message and notification. How can I do it? I was able to solve this issue too, pretty straight I mean, there is the extra_hdrs_avp param which did the trick. BTW, is there a way to send back the notification to the sender that the message has been sent correctly via m_dump(), so to get a 200 about the given m_dump()ed message? I think that this can be solved in a different way, the idea is to add an event_route for the msilo module so that we get notified for each m_dump()ed message about the given IM status and then handle it in the cfg file. So, looking at the code within m_tm_callback() it seems that it's right place where to add such feature. Since I'm not a kamailio developer but I've quite long time experience in C coding, does anyone can show/point me to some example about how to do that? Thanks in advance, Roberto Fichera. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ 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 ___ 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
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 05/21/2014 09:08 AM, Roberto Fichera wrote: Hi There, On 05/20/2014 09:15 PM, Peter Villeneuve wrote: Hi Roberto, Hi Peter, Did you ever figure out how to do it? I'd be interested too. Not yet! I tried other ways, barely workarounds, but I guess I'll have to go into this quite soon because it is the straight way to go. The main problem is the lack of my knowledge of kamailio API so I'll have to study a bit some code in order to understand how to use it. BTW the idea is to trigger an event route were I'd like to set all the info regarding the dispatched message including the result of the delivering. I don't know if is possible but the best would be to set all the pseudo-variables so that such event route will be in the right context of the given MSILO message. So, any advice regarding the API would definitively help and put me in the right direction. Actually I've started to play with the above idea, so below you will find my current implementation which seems executed because I see the LM_DBG() log but the code within the event route but the corresponding script code does not. Any help? Cheers, Roberto Fichera. event_route [msilo:on-delivered] { xlog(L_INFO, MSILO event on-delivered $fu to $ru\n); } diff --git a/modules/msilo/msilo.c b/modules/msilo/msilo.c index 903b3cf..742c48d 100644 --- a/modules/msilo/msilo.c +++ b/modules/msilo/msilo.c @@ -281,6 +281,9 @@ static int bind_msilo(msilo_api_t* api) return 0; } +/* where to go for the local request route (msilo:on-delivered) */ +int msilo_event_on_delivered=-1; /* default disabled */ + /** * init module function */ @@ -480,6 +483,11 @@ static int mod_init(void) if(ms_outbound_proxy.s!=NULL) ms_outbound_proxy.len = strlen(ms_outbound_proxy.s); +/* check if the on-delivered route event exists or not */ + msilo_event_on_delivered=route_lookup(event_rt, msilo:on-delivered); + if (msilo_event_on_delivered=0 event_rt.rlist[msilo_event_on_delivered]==0) + msilo_event_on_delivered=-1; /* disable */ + return 0; } @@ -1330,6 +1338,26 @@ void m_tm_callback( struct cell *t, int type, struct tmcb_params *ps) LM_DBG(message %d was sent successfully\n, *((int*)ps-param)); msg_list_set_flag(ml, *((int*)ps-param), MS_MSG_DONE); +/* execute the msilo:on-delivered event route */ +if(unlikely(msilo_event_on_delivered=0)) +{ +int sflag_bk; +int backup_route_type; +struct run_act_ctx ctx; + +LM_DBG(executing event_route[msilo:on-delivered] (%d)\n, msilo_event_on_delivered); + +sflag_bk = getsflags(); +backup_route_type = get_route_type(); + +set_route_type(EVENT_ROUTE); +init_run_actions_ctx(ctx); +run_top_route(event_rt.rlist[msilo_event_on_delivered], ps-req, ctx); + +set_route_type(backup_route_type); +setsflagsval(sflag_bk); +} + done: return; } Cheers, Roberto Fichera. Cheers, Peter On Thu, Apr 17, 2014 at 4:04 PM, Roberto Fichera ker...@tekno-soft.it mailto:ker...@tekno-soft.it wrote: On 04/17/2014 10:36 AM, Roberto Fichera wrote: Hi All, On 04/16/2014 07:15 PM, Roberto Fichera wrote: Hi All, On 04/16/2014 06:53 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, most likely the messages are looped back, be sure you allow requests from 'myself' without authentication. You can watch loopback interface with ngrep to see if the messages are sent out. Yep! Allowing requests from myself solved the problem! Thanks! Another thing regarding MSILO, I would like to preserve some custom header fields for both instant message and notification. How can I do it? I was able to solve this issue too, pretty straight I mean, there is the extra_hdrs_avp param which did the trick. BTW, is there a way to send back the notification to the sender that the message has been sent correctly via m_dump(), so to get a 200 about the given m_dump()ed message? I think that this can be solved in a different way, the idea is to add an event_route for the msilo module so that we get notified for each m_dump()ed message about the given IM status and then handle it in the cfg file. So, looking at the code within m_tm_callback() it seems that it's right place where to add such feature. Since I'm not a kamailio developer but I've quite long time experience in C coding, does anyone can show/point me to some example about how to do that? Thanks in advance, Roberto Fichera. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip
[SR-Users] Large Content-Length crash with instant message
Hi All, I'm playing with instant messaging with a PJSIP client, but as soon as I send body with payload to about 100k I'm getting the error below: Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: core [tcp_main.c:715]: _wbufq_add(): ERROR: wbufq_add(40552 bytes): write queue full or timeout (0, total 0, last write 51946505 s ago) Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [../../forward.h:240]: msg_send(): msg_send: ERROR: tcp_send failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2910]: ERROR: core [tcp_main.c:3638]: handle_ser_child(): handle_ser_child: ERROR: received CON_ERROR for 0xb30ddcd8 (id 352), refcnt 2, flags 0x5092 Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [t_fwd.c:1609]: t_send_branch(): ERROR: t_send_branch: sending request on branch 0 failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: sl [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used: Unfortunately error on sending to next hop occurred (477/SL) And the app get SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/SL) Via: SIP/2.0/TLS XX.XX.XX.XX:55859;rport=55859;branch=z9hG4bKPjkkazEy.XcjJkYDCEzwbwUVAONDzcCN8t;alias From: sip:aa...@test.net;tag=9gcb.Ay3wSCZNFgs8PNCbdkRq7jfxbDx To: sip:bb...@test.net;tag=9a285338e10af1c086406d08dc7f5d79.e457 Call-ID: v9JlsK1AEH4So8AIEfqiGuUOEx5Fub1C CSeq: 28450 MESSAGE Server: kamailio (4.1.3 (i386/linux)) Content-Length: 0 --end msg-- Kamailio is already set with tcp_rd_buf_size=204800 Does anyone can suggest how to fix this? Thanks in advance, Roberto Fichera. ___ 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
Re: [SR-Users] Large Content-Length crash with instant message
On 04/28/2014 03:45 PM, Daniel-Constantin Mierla wrote: Hello, Hi, it doesn't look like a crash at all, but normal behaviour when message is too large to send. Or are there other log messages you haven't posted here indicating a crash? Opsss! Sorry! It wasn't a crash, I wrote the wrongly! Indeed it's a normal error log. You may have to adjust write buffers for tcp -- look at core cookbook, tcp parameters section, and identify the ones with 'wq' in the name. are you talking about tcp_wq_blk_size or tcp_wq_max? For the first the documentation reports that might be ignored, the latter seems defaulting to 10MB. Cheers, Roberto Fichera. Cheers, Daniel On 28/04/14 15:29, Roberto Fichera wrote: Hi All, I'm playing with instant messaging with a PJSIP client, but as soon as I send body with payload to about 100k I'm getting the error below: Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: core [tcp_main.c:715]: _wbufq_add(): ERROR: wbufq_add(40552 bytes): write queue full or timeout (0, total 0, last write 51946505 s ago) Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [../../forward.h:240]: msg_send(): msg_send: ERROR: tcp_send failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2910]: ERROR: core [tcp_main.c:3638]: handle_ser_child(): handle_ser_child: ERROR: received CON_ERROR for 0xb30ddcd8 (id 352), refcnt 2, flags 0x5092 Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [t_fwd.c:1609]: t_send_branch(): ERROR: t_send_branch: sending request on branch 0 failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: sl [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used: Unfortunately error on sending to next hop occurred (477/SL) And the app get SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/SL) Via: SIP/2.0/TLS XX.XX.XX.XX:55859;rport=55859;branch=z9hG4bKPjkkazEy.XcjJkYDCEzwbwUVAONDzcCN8t;alias From: sip:aa...@test.net;tag=9gcb.Ay3wSCZNFgs8PNCbdkRq7jfxbDx To: sip:bb...@test.net;tag=9a285338e10af1c086406d08dc7f5d79.e457 Call-ID: v9JlsK1AEH4So8AIEfqiGuUOEx5Fub1C CSeq: 28450 MESSAGE Server: kamailio (4.1.3 (i386/linux)) Content-Length: 0 --end msg-- Kamailio is already set with tcp_rd_buf_size=204800 Does anyone can suggest how to fix this? Thanks in advance, Roberto Fichera. ___ 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 ___ 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
Re: [SR-Users] Large Content-Length crash with instant message
On 04/28/2014 04:05 PM, Roberto Fichera wrote: On 04/28/2014 03:45 PM, Daniel-Constantin Mierla wrote: Hello, Hi, it doesn't look like a crash at all, but normal behaviour when message is too large to send. Or are there other log messages you haven't posted here indicating a crash? Opsss! Sorry! It wasn't a crash, I wrote the wrongly! Indeed it's a normal error log. You may have to adjust write buffers for tcp -- look at core cookbook, tcp parameters section, and identify the ones with 'wq' in the name. are you talking about tcp_wq_blk_size or tcp_wq_max? For the first the documentation reports that might be ignored, the latter seems defaulting to 10MB. Mmmhhh! Maybe it's tcp_conn_wq_max ? Cheers, Roberto Fichera. Cheers, Daniel On 28/04/14 15:29, Roberto Fichera wrote: Hi All, I'm playing with instant messaging with a PJSIP client, but as soon as I send body with payload to about 100k I'm getting the error below: Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: core [tcp_main.c:715]: _wbufq_add(): ERROR: wbufq_add(40552 bytes): write queue full or timeout (0, total 0, last write 51946505 s ago) Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [../../forward.h:240]: msg_send(): msg_send: ERROR: tcp_send failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2910]: ERROR: core [tcp_main.c:3638]: handle_ser_child(): handle_ser_child: ERROR: received CON_ERROR for 0xb30ddcd8 (id 352), refcnt 2, flags 0x5092 Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [t_fwd.c:1609]: t_send_branch(): ERROR: t_send_branch: sending request on branch 0 failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: sl [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used: Unfortunately error on sending to next hop occurred (477/SL) And the app get SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/SL) Via: SIP/2.0/TLS XX.XX.XX.XX:55859;rport=55859;branch=z9hG4bKPjkkazEy.XcjJkYDCEzwbwUVAONDzcCN8t;alias From: sip:aa...@test.net;tag=9gcb.Ay3wSCZNFgs8PNCbdkRq7jfxbDx To: sip:bb...@test.net;tag=9a285338e10af1c086406d08dc7f5d79.e457 Call-ID: v9JlsK1AEH4So8AIEfqiGuUOEx5Fub1C CSeq: 28450 MESSAGE Server: kamailio (4.1.3 (i386/linux)) Content-Length: 0 --end msg-- Kamailio is already set with tcp_rd_buf_size=204800 Does anyone can suggest how to fix this? Thanks in advance, Roberto Fichera. ___ 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 ___ 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 ___ 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
Re: [SR-Users] Large Content-Length crash with instant message
On 04/28/2014 04:09 PM, Roberto Fichera wrote: On 04/28/2014 04:05 PM, Roberto Fichera wrote: On 04/28/2014 03:45 PM, Daniel-Constantin Mierla wrote: Hello, Hi, it doesn't look like a crash at all, but normal behaviour when message is too large to send. Or are there other log messages you haven't posted here indicating a crash? Opsss! Sorry! It wasn't a crash, I wrote the wrongly! Indeed it's a normal error log. You may have to adjust write buffers for tcp -- look at core cookbook, tcp parameters section, and identify the ones with 'wq' in the name. are you talking about tcp_wq_blk_size or tcp_wq_max? For the first the documentation reports that might be ignored, the latter seems defaulting to 10MB. Mmmhhh! Maybe it's tcp_conn_wq_max ? Yep! It was! Increased to 200K solved the problem! Cheers, Roberto Fichera. Cheers, Daniel On 28/04/14 15:29, Roberto Fichera wrote: Hi All, I'm playing with instant messaging with a PJSIP client, but as soon as I send body with payload to about 100k I'm getting the error below: Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: core [tcp_main.c:715]: _wbufq_add(): ERROR: wbufq_add(40552 bytes): write queue full or timeout (0, total 0, last write 51946505 s ago) Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [../../forward.h:240]: msg_send(): msg_send: ERROR: tcp_send failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2910]: ERROR: core [tcp_main.c:3638]: handle_ser_child(): handle_ser_child: ERROR: received CON_ERROR for 0xb30ddcd8 (id 352), refcnt 2, flags 0x5092 Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: tm [t_fwd.c:1609]: t_send_branch(): ERROR: t_send_branch: sending request on branch 0 failed Apr 28 09:16:52 ip-10-227-0-26 /usr/sbin/kamailio[2909]: ERROR: sl [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used: Unfortunately error on sending to next hop occurred (477/SL) And the app get SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/SL) Via: SIP/2.0/TLS XX.XX.XX.XX:55859;rport=55859;branch=z9hG4bKPjkkazEy.XcjJkYDCEzwbwUVAONDzcCN8t;alias From: sip:aa...@test.net;tag=9gcb.Ay3wSCZNFgs8PNCbdkRq7jfxbDx To: sip:bb...@test.net;tag=9a285338e10af1c086406d08dc7f5d79.e457 Call-ID: v9JlsK1AEH4So8AIEfqiGuUOEx5Fub1C CSeq: 28450 MESSAGE Server: kamailio (4.1.3 (i386/linux)) Content-Length: 0 --end msg-- Kamailio is already set with tcp_rd_buf_size=204800 Does anyone can suggest how to fix this? Thanks in advance, Roberto Fichera. ___ 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 ___ 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 ___ 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 ___ 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
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 04/16/2014 07:15 PM, Roberto Fichera wrote: Hi All, On 04/16/2014 06:53 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, most likely the messages are looped back, be sure you allow requests from 'myself' without authentication. You can watch loopback interface with ngrep to see if the messages are sent out. Yep! Allowing requests from myself solved the problem! Thanks! Another thing regarding MSILO, I would like to preserve some custom header fields for both instant message and notification. How can I do it? I was able to solve this issue too, pretty straight I mean, there is the extra_hdrs_avp param which did the trick. BTW, is there a way to send back the notification to the sender that the message has been sent correctly via m_dump(), so to get a 200 about the given m_dump()ed message? Thanks in advance, Roberto Fichera. Cheers, Roberto Fichera. Cheers, Daniel On 16/04/14 18:46, Roberto Fichera wrote: Hi All, I've started to play with MSILO module on kamailio v4.1.2, but it seems that all the stored messages aren't delivered to the give user even if, looking at the debug log, the given messages are found and queued for shipping. Another info I can add is that all the users are connected in TLS. The relevant conf is below. Doe anyone can suggest a working setup for TLS users? Thanks in advance, Roberto Fichera. # - msilo params - modparam(msilo, db_url, DBURL) modparam(msilo, from_address, sip:$r...@test.net) modparam(msilo, contact_hdr, Contact: ms...@test.net:5060;msilo=yes\r\n) modparam(msilo, content_type_hdr, Content-Type: text/plain\r\n) # Handle SIP registrations route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); # uncomment next line to do SIP NAT pinging ## setbflag(FLB_NATSIPPING); } # MSILO - dumping user's offline messages if (m_dump()) { xlog(MSILO: offline messages dumped - if they were for user $fu\n); } else { xlog(MSILO: no offline messages dumped\n); } exit; } } and in the route[LOCATION] I've this snippet xlog( Checking the destination user $rU exists\n); if(avp_db_query(select username from subscriber where username='$rU')) { xlog(MESSAGE received $ru - storing using MSILO user=$rU\n); if(m_store($ru)) { xlog(MSILO: offline message stored\n); if (!t_reply(202, Accepted)) { sl_reply_error(); } } else { xlog(MSILO: offline message NOT stored\n); if (!t_reply(503, Service Unavailable)) { sl_reply_error(); } } # if the downstream UA doesn't support MESSAGE requests # go to failure_route[1] t_on_failure(1); exit; } else { # The destination recipiend doen't exist xlog( Unable to store message for $ru because the user doesn't exist ); if (!t_reply(404, Not Found)) { sl_reply_error(); } exit; } } ___ 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 ___ 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 ___ 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
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 04/17/2014 10:36 AM, Roberto Fichera wrote: Hi All, On 04/16/2014 07:15 PM, Roberto Fichera wrote: Hi All, On 04/16/2014 06:53 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, most likely the messages are looped back, be sure you allow requests from 'myself' without authentication. You can watch loopback interface with ngrep to see if the messages are sent out. Yep! Allowing requests from myself solved the problem! Thanks! Another thing regarding MSILO, I would like to preserve some custom header fields for both instant message and notification. How can I do it? I was able to solve this issue too, pretty straight I mean, there is the extra_hdrs_avp param which did the trick. BTW, is there a way to send back the notification to the sender that the message has been sent correctly via m_dump(), so to get a 200 about the given m_dump()ed message? I think that this can be solved in a different way, the idea is to add an event_route for the msilo module so that we get notified for each m_dump()ed message about the given IM status and then handle it in the cfg file. So, looking at the code within m_tm_callback() it seems that it's right place where to add such feature. Since I'm not a kamailio developer but I've quite long time experience in C coding, does anyone can show/point me to some example about how to do that? Thanks in advance, Roberto Fichera. ___ 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
[SR-Users] Kamailio and MSILO with TLS AORs
Hi All, I've started to play with MSILO module on kamailio v4.1.2, but it seems that all the stored messages aren't delivered to the give user even if, looking at the debug log, the given messages are found and queued for shipping. Another info I can add is that all the users are connected in TLS. The relevant conf is below. Doe anyone can suggest a working setup for TLS users? Thanks in advance, Roberto Fichera. # - msilo params - modparam(msilo, db_url, DBURL) modparam(msilo, from_address, sip:$r...@test.net) modparam(msilo, contact_hdr, Contact: ms...@test.net:5060;msilo=yes\r\n) modparam(msilo, content_type_hdr, Content-Type: text/plain\r\n) # Handle SIP registrations route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); # uncomment next line to do SIP NAT pinging ## setbflag(FLB_NATSIPPING); } # MSILO - dumping user's offline messages if (m_dump()) { xlog(MSILO: offline messages dumped - if they were for user $fu\n); } else { xlog(MSILO: no offline messages dumped\n); } exit; } } and in the route[LOCATION] I've this snippet xlog( Checking the destination user $rU exists\n); if(avp_db_query(select username from subscriber where username='$rU')) { xlog(MESSAGE received $ru - storing using MSILO user=$rU\n); if(m_store($ru)) { xlog(MSILO: offline message stored\n); if (!t_reply(202, Accepted)) { sl_reply_error(); } } else { xlog(MSILO: offline message NOT stored\n); if (!t_reply(503, Service Unavailable)) { sl_reply_error(); } } # if the downstream UA doesn't support MESSAGE requests # go to failure_route[1] t_on_failure(1); exit; } else { # The destination recipiend doen't exist xlog( Unable to store message for $ru because the user doesn't exist ); if (!t_reply(404, Not Found)) { sl_reply_error(); } exit; } } ___ 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
Re: [SR-Users] Kamailio and MSILO with TLS AORs
On 04/16/2014 06:53 PM, Daniel-Constantin Mierla wrote: Hello, Ciao Daniel, most likely the messages are looped back, be sure you allow requests from 'myself' without authentication. You can watch loopback interface with ngrep to see if the messages are sent out. Yep! Allowing requests from myself solved the problem! Thanks! Another thing regarding MSILO, I would like to preserve some custom header fields for both instant message and notification. How can I do it? Cheers, Roberto Fichera. Cheers, Daniel On 16/04/14 18:46, Roberto Fichera wrote: Hi All, I've started to play with MSILO module on kamailio v4.1.2, but it seems that all the stored messages aren't delivered to the give user even if, looking at the debug log, the given messages are found and queued for shipping. Another info I can add is that all the users are connected in TLS. The relevant conf is below. Doe anyone can suggest a working setup for TLS users? Thanks in advance, Roberto Fichera. # - msilo params - modparam(msilo, db_url, DBURL) modparam(msilo, from_address, sip:$r...@test.net) modparam(msilo, contact_hdr, Contact: ms...@test.net:5060;msilo=yes\r\n) modparam(msilo, content_type_hdr, Content-Type: text/plain\r\n) # Handle SIP registrations route[REGISTRAR] { if (is_method(REGISTER)) { if(isflagset(FLT_NATS)) { setbflag(FLB_NATB); # uncomment next line to do SIP NAT pinging ## setbflag(FLB_NATSIPPING); } # MSILO - dumping user's offline messages if (m_dump()) { xlog(MSILO: offline messages dumped - if they were for user $fu\n); } else { xlog(MSILO: no offline messages dumped\n); } exit; } } and in the route[LOCATION] I've this snippet xlog( Checking the destination user $rU exists\n); if(avp_db_query(select username from subscriber where username='$rU')) { xlog(MESSAGE received $ru - storing using MSILO user=$rU\n); if(m_store($ru)) { xlog(MSILO: offline message stored\n); if (!t_reply(202, Accepted)) { sl_reply_error(); } } else { xlog(MSILO: offline message NOT stored\n); if (!t_reply(503, Service Unavailable)) { sl_reply_error(); } } # if the downstream UA doesn't support MESSAGE requests # go to failure_route[1] t_on_failure(1); exit; } else { # The destination recipiend doen't exist xlog( Unable to store message for $ru because the user doesn't exist ); if (!t_reply(404, Not Found)) { sl_reply_error(); } exit; } } ___ 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 ___ 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
Re: [SR-Users] RPC User lookup
On 09/05/2013 11:19 PM, Daniel-Constantin Mierla wrote: Hello, Hi, On 9/5/13 3:21 PM, Roberto Fichera wrote: Hi All, just to know if exist an RPC, actually XML, to get/check user's info. I've tried ul.lookup but this one returns only online users. the (xml)rpc commands are mainly to deal with kamailio internals (in-memory structures). The profiles for users are in subscriber table inside database. You can make own web app that can connect to database, kamailio itself doesn't implement in its C code a command to manage database records via rpc. Ok! Thanks! There is a rather new module that could be helpful here, see xhttp_pi - might give something similar to what you look, although could be just http. Cheers, Daniel ___ 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
[SR-Users] RPC User lookup
Hi All, just to know if exist an RPC, actually XML, to get/check user's info. I've tried ul.lookup but this one returns only online users. Thanks in advance, Roberto Fichera. ___ 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/16/2013 12:29 PM, Roberto Fichera wrote: On 08/14/2013 09:58 PM, Vitaliy Aleksandrov wrote: On 08/14/2013 07:32 PM, Roberto Fichera wrote: On 08/14/2013 04:36 PM, Vitaliy Aleksandrov wrote: If you won't be able to disable SIP ALG on your router you can fill $avp(received) manually before calling save(): $avp(received) = sip: + $si + : + $sp + ;transport= + $proto; In this case all user location records will have the received attribut even if a UA isn't behind NAT, but I don't see any problems with that. This one looks working, but the callee doesn't answer correctly because the TCP isn't correct: Contact:: sip:528@94.94.X.X:1380;transport=TCP;ob;q=;expires=294;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;received=sip:94.94.X.X:37030;transport=tcp;user_agent=PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17;reg-id=0 The contact uses a port which isn't translated inside by the router, the received field shows the right one. Should I change the Contact header instead? In case, how can I do that? I didn't understand what callee doesn't answer correctly means. Callee doesn't know what's in the received field of its registration. Sorry! My typo! I meant why kamilio wasn't reusing the TCP port specified in the REGISTER even for the INVITE. I mean, kamailio now knows the received field so I'm expecting it routes the requests for the called UA through the address:port specified in this field. The only problem I see is that your router changes ip in the contact field of REGISTER requests and then kamailio puts this value (new_ip:old_port) to INVITEs destined to UAs behind your NAT router. Indeed, my testing router is affected by this ALG problem! I guess it's better to disable it and complete simple TCP tests then move to TLS. It's not likely, but maybe pjsip doesn't like INVITEs with RURI which differs from what it put to the contact during registration. IIRC pjsua prints lots of debugging information. So you can check if pjsua shows anything when INVITE comes in its log and also attach a trace of such a call. pjsua doesn't report any problem so far, so seems accepting the INVITE. P.S. IMHO the best way to pass sip through such routers is sip over TLS. Yep! I'll do that. Just to say that everything works pretty fine once moved to TLS! ___ 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 ___ 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 ___ 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
Re: [SR-Users] tls.so: mod_register failed on fedora 18 x86_64
On 08/21/2013 10:23 PM, Daniel-Constantin Mierla wrote: Hello, On 8/20/13 4:24 PM, Roberto Fichera wrote: [...] Mmmhhh!!! Looks like this particular version has problem, see: http://bugs.python.org/msg191610 I can confirm that the bug is present in both Fedora 18 19. The openssl has a bug which prevent the tls module to work due to allow_customize = 0 set in one of the functions called by OPENSSL_init() within CRYPTO_set_mem_functions(). You can check easily with this small code: #include stdio.h #include openssl/ssl.h static void *myMalloc( size_t s ) { return NULL; } static void *myRealloc( void *p, size_t s ) { return NULL; } static void myFree( void *p ) {} int main() { if ( !CRYPTO_set_mem_functions( myMalloc, myRealloc, myFree) ) { fprintf( stderr, Unable to set the memory allocation functions\n); return -1; } return 0; } compile with gcc -o testssl testssl.c -lssl -lcrypto I've done a small patch in order to workaround the problem in case someone need it. Thanks for investigating further and providing proper references. Is the patch for kamailio? If yes, you can attach it here or on our tracker, so others can use it. Eventually we can integrate it in the module, there are couple of other workarounds for openssl bugs there. Unfortunately not! I haven't found yet a solution to workaround the openssl patch! I guess we cannot easily workaround inside the kamailio tls module since the problem is strictly related to openssl. Cheers, Daniel -- 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
Re: [SR-Users] tls.so: mod_register failed on fedora 18 x86_64
On 08/22/2013 10:23 AM, Daniel-Constantin Mierla wrote: On 8/22/13 9:00 AM, Roberto Fichera wrote: On 08/21/2013 10:23 PM, Daniel-Constantin Mierla wrote: Hello, On 8/20/13 4:24 PM, Roberto Fichera wrote: [...] Mmmhhh!!! Looks like this particular version has problem, see: http://bugs.python.org/msg191610 I can confirm that the bug is present in both Fedora 18 19. The openssl has a bug which prevent the tls module to work due to allow_customize = 0 set in one of the functions called by OPENSSL_init() within CRYPTO_set_mem_functions(). You can check easily with this small code: #include stdio.h #include openssl/ssl.h static void *myMalloc( size_t s ) { return NULL; } static void *myRealloc( void *p, size_t s ) { return NULL; } static void myFree( void *p ) {} int main() { if ( !CRYPTO_set_mem_functions( myMalloc, myRealloc, myFree) ) { fprintf( stderr, Unable to set the memory allocation functions\n); return -1; } return 0; } compile with gcc -o testssl testssl.c -lssl -lcrypto I've done a small patch in order to workaround the problem in case someone need it. Thanks for investigating further and providing proper references. Is the patch for kamailio? If yes, you can attach it here or on our tracker, so others can use it. Eventually we can integrate it in the module, there are couple of other workarounds for openssl bugs there. Unfortunately not! I haven't found yet a solution to workaround the openssl patch! I guess we cannot easily workaround inside the kamailio tls module since the problem is strictly related to openssl. Can you share the openssl patch? Maybe we find a solution together here... Sure! See below diff -urN openssl-1.0.1e/crypto/mem.c openssl-1.0.1e/crypto/mem.c --- openssl-1.0.1e/crypto/mem.c2013-02-11 16:26:04.0 +0100 +++ openssl-1.0.1e/crypto/mem.c2013-08-20 12:44:01.375906737 +0200 @@ -125,7 +125,7 @@ void (*f)(void *)) { /* Dummy call just to ensure OPENSSL_init() gets linked in */ -OPENSSL_init(); +static void *ptr = (void*)OPENSSL_init; if (!allow_customize) return 0; if ((m == 0) || (r == 0) || (f == 0)) Cheers, Daniel -- 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
Re: [SR-Users] tls.so: mod_register failed on fedora 18 x86_64
On 08/19/2013 03:34 PM, Roberto Fichera wrote: On 08/19/2013 12:37 PM, Daniel-Constantin Mierla wrote: Hi Daniel, Does it work with tls.so as first loaded module? If not, can you send the logs messages with debug=3? Cheers, Daniel On 8/19/13 12:26 PM, Roberto Fichera wrote: On 08/19/2013 12:14 PM, Daniel-Constantin Mierla wrote: Hello, Hi, what version of libssl is installed? [root@proxy CA]# rpm -q -a openssl-libs openssl-libs-1.0.1e-4.fc18.x86_64 [root@proxy CA]# Mmmhhh!!! Looks like this particular version has problem, see: http://bugs.python.org/msg191610 I can confirm that the bug is present in both Fedora 18 19. The openssl has a bug which prevent the tls module to work due to allow_customize = 0 set in one of the functions called by OPENSSL_init() within CRYPTO_set_mem_functions(). You can check easily with this small code: #include stdio.h #include openssl/ssl.h static void *myMalloc( size_t s ) { return NULL; } static void *myRealloc( void *p, size_t s ) { return NULL; } static void myFree( void *p ) {} int main() { if ( !CRYPTO_set_mem_functions( myMalloc, myRealloc, myFree) ) { fprintf( stderr, Unable to set the memory allocation functions\n); return -1; } return 0; } compile with gcc -o testssl testssl.c -lssl -lcrypto I've done a small patch in order to workaround the problem in case someone need it. can you list what modules are loaded in your kamailio.cfg? Try with tls.so loaded as first module... Sure! #!define WITH_PGSQL #!define WITH_AUTH #!define WITH_NAT #!define WITH_TLS #!define WITH_ANTIFLOOD #!define WITH_ACCDB #!define WITH_DIALPLAN . # set paths to location of modules (to sources or installation folders) #!ifdef WITH_SRCPATH mpath=modules_k:modules #!else mpath=/usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ #!endif #!ifdef WITH_TLS loadmodule tls.so #!endif #!ifdef WITH_MYSQL loadmodule db_mysql.so #!endif #!ifdef WITH_PGSQL loadmodule db_postgres.so #!endif loadmodule mi_fifo.so loadmodule kex.so loadmodule corex.so loadmodule tm.so loadmodule tmx.so loadmodule sl.so loadmodule rr.so loadmodule pv.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule siputils.so loadmodule xlog.so loadmodule sanity.so loadmodule ctl.so loadmodule cfg_rpc.so loadmodule mi_rpc.so loadmodule acc.so loadmodule avpops.so #!ifdef WITH_AUTH loadmodule auth.so loadmodule auth_db.so #!ifdef WITH_IPAUTH loadmodule permissions.so #!endif #!endif #!ifdef WITH_ALIASDB loadmodule alias_db.so #!endif #!ifdef WITH_SPEEDDIAL loadmodule speeddial.so #!endif #!ifdef WITH_DIALPLAN loadmodule dialplan.so #!endif #!ifdef WITH_MULTIDOMAIN loadmodule domain.so #!endif #!ifdef WITH_PRESENCE loadmodule presence.so loadmodule presence_xml.so #!endif #!ifdef WITH_NAT loadmodule nathelper.so loadmodule rtpproxy.so #!endif #!ifdef WITH_ANTIFLOOD loadmodule htable.so loadmodule pike.so #!endif #!ifdef WITH_XMLRPC loadmodule xmlrpc.so #!endif #!ifdef WITH_DEBUG loadmodule debugger.so #!endif Cheers, Roberto Fichera. Cheers, Daniel On 8/19/13 11:47 AM, Roberto Fichera wrote: Hi All, I'm just trying to setup the TLS on the last Kamailio v4.0.3 on Fedora 18 64bits. Kamailio doesn't start and terminate with the error below: loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ 0(1676) ERROR: tls [tls_init.c:471]: tls_pre_init(): Unable to set the memory allocation functions 0(1676) ERROR: core [sr_module.c:600]: load_module(): ERROR: load_module: /usr/lib64/kamailio/modules/tls.so: mod_register failed 0(1676) : core [cfg.y:3567]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 279, column 12-19: failed to load module 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 439, column 51: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 440, column 97: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 441, column 92: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 442, column 64: Can't set module parameter ERROR: bad config file (5 errors
[SR-Users] tls.so: mod_register failed on fedora 18 x86_64
Hi All, I'm just trying to setup the TLS on the last Kamailio v4.0.3 on Fedora 18 64bits. Kamailio doesn't start and terminate with the error below: loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ 0(1676) ERROR: tls [tls_init.c:471]: tls_pre_init(): Unable to set the memory allocation functions 0(1676) ERROR: core [sr_module.c:600]: load_module(): ERROR: load_module: /usr/lib64/kamailio/modules/tls.so: mod_register failed 0(1676) : core [cfg.y:3567]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 279, column 12-19: failed to load module 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 439, column 51: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 440, column 97: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 441, column 92: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 442, column 64: Can't set module parameter ERROR: bad config file (5 errors) Cheers, Roberto Fichera. ___ 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
Re: [SR-Users] tls.so: mod_register failed on fedora 18 x86_64
On 08/19/2013 12:14 PM, Daniel-Constantin Mierla wrote: Hello, Hi, what version of libssl is installed? [root@proxy CA]# rpm -q -a openssl-libs openssl-libs-1.0.1e-4.fc18.x86_64 [root@proxy CA]# can you list what modules are loaded in your kamailio.cfg? Try with tls.so loaded as first module... Sure! #!define WITH_PGSQL #!define WITH_AUTH #!define WITH_NAT #!define WITH_TLS #!define WITH_ANTIFLOOD #!define WITH_ACCDB #!define WITH_DIALPLAN . # set paths to location of modules (to sources or installation folders) #!ifdef WITH_SRCPATH mpath=modules_k:modules #!else mpath=/usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ #!endif #!ifdef WITH_TLS loadmodule tls.so #!endif #!ifdef WITH_MYSQL loadmodule db_mysql.so #!endif #!ifdef WITH_PGSQL loadmodule db_postgres.so #!endif loadmodule mi_fifo.so loadmodule kex.so loadmodule corex.so loadmodule tm.so loadmodule tmx.so loadmodule sl.so loadmodule rr.so loadmodule pv.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule siputils.so loadmodule xlog.so loadmodule sanity.so loadmodule ctl.so loadmodule cfg_rpc.so loadmodule mi_rpc.so loadmodule acc.so loadmodule avpops.so #!ifdef WITH_AUTH loadmodule auth.so loadmodule auth_db.so #!ifdef WITH_IPAUTH loadmodule permissions.so #!endif #!endif #!ifdef WITH_ALIASDB loadmodule alias_db.so #!endif #!ifdef WITH_SPEEDDIAL loadmodule speeddial.so #!endif #!ifdef WITH_DIALPLAN loadmodule dialplan.so #!endif #!ifdef WITH_MULTIDOMAIN loadmodule domain.so #!endif #!ifdef WITH_PRESENCE loadmodule presence.so loadmodule presence_xml.so #!endif #!ifdef WITH_NAT loadmodule nathelper.so loadmodule rtpproxy.so #!endif #!ifdef WITH_ANTIFLOOD loadmodule htable.so loadmodule pike.so #!endif #!ifdef WITH_XMLRPC loadmodule xmlrpc.so #!endif #!ifdef WITH_DEBUG loadmodule debugger.so #!endif Cheers, Roberto Fichera. Cheers, Daniel On 8/19/13 11:47 AM, Roberto Fichera wrote: Hi All, I'm just trying to setup the TLS on the last Kamailio v4.0.3 on Fedora 18 64bits. Kamailio doesn't start and terminate with the error below: loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ 0(1676) ERROR: tls [tls_init.c:471]: tls_pre_init(): Unable to set the memory allocation functions 0(1676) ERROR: core [sr_module.c:600]: load_module(): ERROR: load_module: /usr/lib64/kamailio/modules/tls.so: mod_register failed 0(1676) : core [cfg.y:3567]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 279, column 12-19: failed to load module 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 439, column 51: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 440, column 97: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 441, column 92: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 442, column 64: Can't set module parameter ERROR: bad config file (5 errors) Cheers, Roberto Fichera. ___ 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 ___ 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
Re: [SR-Users] tls.so: mod_register failed on fedora 18 x86_64
On 08/19/2013 12:37 PM, Daniel-Constantin Mierla wrote: Does it work with tls.so as first loaded module? No! I doesn't! If not, can you send the logs messages with debug=3? 0(2122) DEBUG: core [cfg.y:1804]: yyparse(): loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ 0(2122) DEBUG: core [cfg.y:1791]: yyparse(): loading module tls.so 0(2122) DEBUG: core [sr_module.c:499]: load_module(): load_module: module file not found /usr/local/lib/kamailio/modules_k/tls.so 0(2122) DEBUG: core [sr_module.c:522]: load_module(): load_module: module file not found /usr/local/lib/kamailio/modules_k/tls/tls.so 0(2122) DEBUG: core [sr_module.c:564]: load_module(): load_module: trying to load /usr/lib64/kamailio/modules/tls.so 0(2122) DEBUG: core [mem/q_malloc.c:202]: qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=1024 0(2122) DEBUG: core [mem/q_malloc.c:204]: qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=1075, qm_block size=43048 0(2122) DEBUG: core [mem/q_malloc.c:205]: qm_malloc_init(): qm_malloc_init(0x7ff2ea44c000, 33554432), start=0x7ff2ea44c000 0(2122) DEBUG: core [mem/q_malloc.c:213]: qm_malloc_init(): qm_malloc_init: size= 33554432, init_overhead=43088 0(2122) DEBUG: core [mem/shm_mem.c:203]: shm_mem_init_mallocs(): shm_mem_init: success 0(2122) ERROR: tls [tls_init.c:471]: tls_pre_init(): Unable to set the memory allocation functions 0(2122) ERROR: core [sr_module.c:600]: load_module(): ERROR: load_module: /usr/lib64/kamailio/modules/tls.so: mod_register failed 0(2122) : core [cfg.y:3567]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 216, column 12-19: failed to load module 0(2122) DEBUG: core [cfg.y:1791]: yyparse(): loading module db_postgres.so 0(2122) DEBUG: core [sr_module.c:499]: load_module(): load_module: module file not found /usr/local/lib/kamailio/modules_k/db_postgres.so 0(2122) DEBUG: core [sr_module.c:522]: load_module(): load_module: module file not found /usr/local/lib/kamailio/modules_k/db_postgres/db_postgres.so 0(2122) DEBUG: core [sr_module.c:564]: load_module(): load_module: trying to load /usr/lib64/kamailio/modules/db_postgres.so 0(2122) DEBUG: core [db_query.c:400]: db_query_init(): About to allocate sql_buf size = 65535 0(2122) DEBUG: core [cfg.y:1791]: yyparse(): loading module mi_fifo.so 0(2122) DEBUG: core [sr_module.c:499]: load_module(): load_module: module file not found /usr/local/lib/kamailio/modules_k/mi_fifo.so 0(2122) DEBUG: core [sr_module.c:522]: load_module(): load_module: module file not found /usr/local/lib/kamailio/modules_k/mi_fifo/mi_fifo.so 0(2122) DEBUG: core [sr_module.c:564]: load_module(): load_module: trying to load /usr/lib64/kamailio/modules/mi_fifo.so 0(2122) DEBUG: core [cfg.y:1791]: yyparse(): loading module kex.so Cheers, Roberto Fichera. Cheers, Daniel On 8/19/13 12:26 PM, Roberto Fichera wrote: On 08/19/2013 12:14 PM, Daniel-Constantin Mierla wrote: Hello, Hi, what version of libssl is installed? [root@proxy CA]# rpm -q -a openssl-libs openssl-libs-1.0.1e-4.fc18.x86_64 [root@proxy CA]# can you list what modules are loaded in your kamailio.cfg? Try with tls.so loaded as first module... Sure! #!define WITH_PGSQL #!define WITH_AUTH #!define WITH_NAT #!define WITH_TLS #!define WITH_ANTIFLOOD #!define WITH_ACCDB #!define WITH_DIALPLAN . # set paths to location of modules (to sources or installation folders) #!ifdef WITH_SRCPATH mpath=modules_k:modules #!else mpath=/usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ #!endif #!ifdef WITH_TLS loadmodule tls.so #!endif #!ifdef WITH_MYSQL loadmodule db_mysql.so #!endif #!ifdef WITH_PGSQL loadmodule db_postgres.so #!endif loadmodule mi_fifo.so loadmodule kex.so loadmodule corex.so loadmodule tm.so loadmodule tmx.so loadmodule sl.so loadmodule rr.so loadmodule pv.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule siputils.so loadmodule xlog.so loadmodule sanity.so loadmodule ctl.so loadmodule cfg_rpc.so loadmodule mi_rpc.so loadmodule acc.so loadmodule avpops.so #!ifdef WITH_AUTH loadmodule auth.so loadmodule auth_db.so #!ifdef WITH_IPAUTH loadmodule permissions.so #!endif #!endif #!ifdef WITH_ALIASDB loadmodule alias_db.so #!endif #!ifdef WITH_SPEEDDIAL loadmodule speeddial.so #!endif #!ifdef WITH_DIALPLAN loadmodule dialplan.so #!endif #!ifdef WITH_MULTIDOMAIN loadmodule domain.so #!endif #!ifdef WITH_PRESENCE loadmodule presence.so loadmodule presence_xml.so #!endif #!ifdef WITH_NAT loadmodule nathelper.so loadmodule rtpproxy.so #!endif #!ifdef WITH_ANTIFLOOD loadmodule htable.so loadmodule pike.so #!endif #!ifdef WITH_XMLRPC loadmodule xmlrpc.so #!endif #!ifdef WITH_DEBUG loadmodule debugger.so #!endif Cheers, Roberto
Re: [SR-Users] tls.so: mod_register failed on fedora 18 x86_64
On 08/19/2013 12:37 PM, Daniel-Constantin Mierla wrote: Hi Daniel, Does it work with tls.so as first loaded module? If not, can you send the logs messages with debug=3? Cheers, Daniel On 8/19/13 12:26 PM, Roberto Fichera wrote: On 08/19/2013 12:14 PM, Daniel-Constantin Mierla wrote: Hello, Hi, what version of libssl is installed? [root@proxy CA]# rpm -q -a openssl-libs openssl-libs-1.0.1e-4.fc18.x86_64 [root@proxy CA]# Mmmhhh!!! Looks like this particular version has problem, see: http://bugs.python.org/msg191610 can you list what modules are loaded in your kamailio.cfg? Try with tls.so loaded as first module... Sure! #!define WITH_PGSQL #!define WITH_AUTH #!define WITH_NAT #!define WITH_TLS #!define WITH_ANTIFLOOD #!define WITH_ACCDB #!define WITH_DIALPLAN . # set paths to location of modules (to sources or installation folders) #!ifdef WITH_SRCPATH mpath=modules_k:modules #!else mpath=/usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ #!endif #!ifdef WITH_TLS loadmodule tls.so #!endif #!ifdef WITH_MYSQL loadmodule db_mysql.so #!endif #!ifdef WITH_PGSQL loadmodule db_postgres.so #!endif loadmodule mi_fifo.so loadmodule kex.so loadmodule corex.so loadmodule tm.so loadmodule tmx.so loadmodule sl.so loadmodule rr.so loadmodule pv.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule siputils.so loadmodule xlog.so loadmodule sanity.so loadmodule ctl.so loadmodule cfg_rpc.so loadmodule mi_rpc.so loadmodule acc.so loadmodule avpops.so #!ifdef WITH_AUTH loadmodule auth.so loadmodule auth_db.so #!ifdef WITH_IPAUTH loadmodule permissions.so #!endif #!endif #!ifdef WITH_ALIASDB loadmodule alias_db.so #!endif #!ifdef WITH_SPEEDDIAL loadmodule speeddial.so #!endif #!ifdef WITH_DIALPLAN loadmodule dialplan.so #!endif #!ifdef WITH_MULTIDOMAIN loadmodule domain.so #!endif #!ifdef WITH_PRESENCE loadmodule presence.so loadmodule presence_xml.so #!endif #!ifdef WITH_NAT loadmodule nathelper.so loadmodule rtpproxy.so #!endif #!ifdef WITH_ANTIFLOOD loadmodule htable.so loadmodule pike.so #!endif #!ifdef WITH_XMLRPC loadmodule xmlrpc.so #!endif #!ifdef WITH_DEBUG loadmodule debugger.so #!endif Cheers, Roberto Fichera. Cheers, Daniel On 8/19/13 11:47 AM, Roberto Fichera wrote: Hi All, I'm just trying to setup the TLS on the last Kamailio v4.0.3 on Fedora 18 64bits. Kamailio doesn't start and terminate with the error below: loading modules under /usr/local/lib/kamailio/modules_k/:/usr/lib64/kamailio/modules/ 0(1676) ERROR: tls [tls_init.c:471]: tls_pre_init(): Unable to set the memory allocation functions 0(1676) ERROR: core [sr_module.c:600]: load_module(): ERROR: load_module: /usr/lib64/kamailio/modules/tls.so: mod_register failed 0(1676) : core [cfg.y:3567]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 279, column 12-19: failed to load module 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 439, column 51: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 440, column 97: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 441, column 92: Can't set module parameter 0(1676) ERROR: core [modparam.c:163]: set_mod_param_regex(): set_mod_param_regex: No module matching tls found 0(1676) : core [cfg.y:3570]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 442, column 64: Can't set module parameter ERROR: bad config file (5 errors) Cheers, Roberto Fichera. ___ 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 ___ 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 -- 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/14/2013 09:58 PM, Vitaliy Aleksandrov wrote: On 08/14/2013 07:32 PM, Roberto Fichera wrote: On 08/14/2013 04:36 PM, Vitaliy Aleksandrov wrote: If you won't be able to disable SIP ALG on your router you can fill $avp(received) manually before calling save(): $avp(received) = sip: + $si + : + $sp + ;transport= + $proto; In this case all user location records will have the received attribut even if a UA isn't behind NAT, but I don't see any problems with that. This one looks working, but the callee doesn't answer correctly because the TCP isn't correct: Contact:: sip:528@94.94.X.X:1380;transport=TCP;ob;q=;expires=294;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;received=sip:94.94.X.X:37030;transport=tcp;user_agent=PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17;reg-id=0 The contact uses a port which isn't translated inside by the router, the received field shows the right one. Should I change the Contact header instead? In case, how can I do that? I didn't understand what callee doesn't answer correctly means. Callee doesn't know what's in the received field of its registration. Sorry! My typo! I meant why kamilio wasn't reusing the TCP port specified in the REGISTER even for the INVITE. I mean, kamailio now knows the received field so I'm expecting it routes the requests for the called UA through the address:port specified in this field. The only problem I see is that your router changes ip in the contact field of REGISTER requests and then kamailio puts this value (new_ip:old_port) to INVITEs destined to UAs behind your NAT router. Indeed, my testing router is affected by this ALG problem! I guess it's better to disable it and complete simple TCP tests then move to TLS. It's not likely, but maybe pjsip doesn't like INVITEs with RURI which differs from what it put to the contact during registration. IIRC pjsua prints lots of debugging information. So you can check if pjsua shows anything when INVITE comes in its log and also attach a trace of such a call. pjsua doesn't report any problem so far, so seems accepting the INVITE. P.S. IMHO the best way to pass sip through such routers is sip over TLS. Yep! I'll do that. ___ 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 ___ 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/14/2013 10:19 AM, Daniel-Constantin Mierla wrote: Hi, Hello, as you can see in the REGISTER, the phone give a public IP where it can be contacted and kamailio tries to deliver to that address sip:528@94.94.X.X:1274;transport=TCP REGISTER comes from another port, but that is allowed in SIP. Yep! That's the problem You should disable stun in the client and let the server care of nat traversal. As already said all client doesn't use any stun- Or you can try to add flag 128 to nat test: - http://kamailio.org/docs/modules/stable/modules/nathelper.html#idp15376536 Also, you can try to add an alias for contact port: - http://www.kamailio.org/wiki/cookbooks/4.0.x/core#force_tcp_alias Ok! I'll try both! Cheers, Roberto Fichera. Cheers, Daniel On 8/13/13 4:17 PM, Roberto Fichera wrote: On 08/13/2013 03:32 PM, Roberto Fichera wrote: On 08/13/2013 03:25 PM, Daniel-Constantin Mierla wrote: Can you get a ngrep trace for a registration as well (for the phone using tcp)? Ok! I'll use pjsua from my local machine connecting in the same way as the TCP client was doing. The TCP client it's an iPhone using the same pjlib library. I can confirm that the default cfg for TCP client doesn't work for me. My cfg file is attached. The TCP client doesn't receive any package at INVITE. Finally in /var/log/message I get this log below: Aug 13 14:05:37 proxy /usr/sbin/kamailio[8401]: ERROR: core [tcp_main.c:4247]: handle_tcpconn_ev(): connect 94.94.X.X:1274 failed Contact:: sip:528@94.94.X.X:1274;transport=TCP;ob;q=;expires=38;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;user_agent=PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17;reg-id=0 [root@proxy ~]# kamctl ul show 512 Contact:: sip:512@94.94.X.X:5060;q=;expires=61;flags=0x0;cflags=0x40;state=0;socket=udp:178.79.X.X:5060;methods=0x;received=sip:94.94.X.X:1025 user_agent=DICE 1.8.20.1;reg-id=0 [root@proxy ~]# ngrep -W byline -d eth0 port 5060 interface: eth0 (178.79.X.X/255.255.255.0) filter: (ip or ip6) and ( port 5060 ) # T 94.94.X.X:49519 - 178.79.x.x:5060 [AP] REGISTER sip:test.domain;transport=tcp;hide SIP/2.0. Via: SIP/2.0/TCP 94.94.X.X:49519;rport;branch=z9hG4bKPje03c11fd-d742-4502-98d8-69ca456ddd56;alias. Max-Forwards: 70. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30034 REGISTER. User-Agent: PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob. Expires: 300. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Content-Length: 0. . # T 178.79.x.x:5060 - 94.94.X.X:49519 [AP] SIP/2.0 401 Unauthorized. Via: SIP/2.0/TCP 94.94.X.X:49519;rport=49519;branch=z9hG4bKPje03c11fd-d742-4502-98d8-69ca456ddd56;alias. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.9167. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30034 REGISTER. WWW-Authenticate: Digest realm=test.domain, nonce=Ugo+VFIKPSgVy8fh9fSy9SDLvT0wO4QV. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . # U 178.79.x.x:5060 - 94.94.X.X:1025 ## T 94.94.X.X:49519 - 178.79.x.x:5060 [AP] REGISTER sip:test.domain;transport=tcp;hide SIP/2.0. Via: SIP/2.0/TCP 94.94.X.X:49519;rport;branch=z9hG4bKPj68a9c487-ae8c-428a-8c50-dd195a46a6bf;alias. Max-Forwards: 70. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30035 REGISTER. User-Agent: PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob. Expires: 300. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Authorization: Digest username=528, realm=test.domain, nonce=Ugo+VFIKPSgVy8fh9fSy9SDLvT0wO4QV, uri=sip:test.domain;transport=tcp;hide, response=ac1c7311ccb887fc8fb494d8ebf1bd36. Content-Length: 0. . # T 178.79.x.x:5060 - 94.94.X.X:49519 [AP] SIP/2.0 200 OK. Via: SIP/2.0/TCP 94.94.X.X:49519;rport=49519;branch=z9hG4bKPj68a9c487-ae8c-428a-8c50-dd195a46a6bf;alias. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.5440. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30035 REGISTER. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob;expires=300. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . ## U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:528@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK69275d13;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as4531a4ee. To: sip:528@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/14/2013 11:20 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:16 AM, Roberto Fichera wrote: On 08/14/2013 10:19 AM, Daniel-Constantin Mierla wrote: Hi, Hello, as you can see in the REGISTER, the phone give a public IP where it can be contacted and kamailio tries to deliver to that address sip:528@94.94.X.X:1274;transport=TCP REGISTER comes from another port, but that is allowed in SIP. Yep! That's the problem You should disable stun in the client and let the server care of nat traversal. As already said all client doesn't use any stun- then how they discover the public IP address if they are behind NAT? Or did I misunderstand that they are behind NAT? Yes! They are behind NAT! Shouldn't kamailio detect such behaviour so it will change the contact header and the other fields accordingly using the nat_fix_ functions? If they are on the public IP, they they should listen on the port advertised in the Contact header of registration and accept the connection from Kamailio. Cheers, Daniel Or you can try to add flag 128 to nat test: - http://kamailio.org/docs/modules/stable/modules/nathelper.html#idp15376536 Also, you can try to add an alias for contact port: - http://www.kamailio.org/wiki/cookbooks/4.0.x/core#force_tcp_alias Ok! I'll try both! Cheers, Roberto Fichera. Cheers, Daniel On 8/13/13 4:17 PM, Roberto Fichera wrote: On 08/13/2013 03:32 PM, Roberto Fichera wrote: On 08/13/2013 03:25 PM, Daniel-Constantin Mierla wrote: Can you get a ngrep trace for a registration as well (for the phone using tcp)? Ok! I'll use pjsua from my local machine connecting in the same way as the TCP client was doing. The TCP client it's an iPhone using the same pjlib library. I can confirm that the default cfg for TCP client doesn't work for me. My cfg file is attached. The TCP client doesn't receive any package at INVITE. Finally in /var/log/message I get this log below: Aug 13 14:05:37 proxy /usr/sbin/kamailio[8401]: ERROR: core [tcp_main.c:4247]: handle_tcpconn_ev(): connect 94.94.X.X:1274 failed Contact:: sip:528@94.94.X.X:1274;transport=TCP;ob;q=;expires=38;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;user_agent=PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17;reg-id=0 [root@proxy ~]# kamctl ul show 512 Contact:: sip:512@94.94.X.X:5060;q=;expires=61;flags=0x0;cflags=0x40;state=0;socket=udp:178.79.X.X:5060;methods=0x;received=sip:94.94.X.X:1025 user_agent=DICE 1.8.20.1;reg-id=0 [root@proxy ~]# ngrep -W byline -d eth0 port 5060 interface: eth0 (178.79.X.X/255.255.255.0) filter: (ip or ip6) and ( port 5060 ) # T 94.94.X.X:49519 - 178.79.x.x:5060 [AP] REGISTER sip:test.domain;transport=tcp;hide SIP/2.0. Via: SIP/2.0/TCP 94.94.X.X:49519;rport;branch=z9hG4bKPje03c11fd-d742-4502-98d8-69ca456ddd56;alias. Max-Forwards: 70. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30034 REGISTER. User-Agent: PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob. Expires: 300. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Content-Length: 0. . # T 178.79.x.x:5060 - 94.94.X.X:49519 [AP] SIP/2.0 401 Unauthorized. Via: SIP/2.0/TCP 94.94.X.X:49519;rport=49519;branch=z9hG4bKPje03c11fd-d742-4502-98d8-69ca456ddd56;alias. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.9167. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30034 REGISTER. WWW-Authenticate: Digest realm=test.domain, nonce=Ugo+VFIKPSgVy8fh9fSy9SDLvT0wO4QV. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . # U 178.79.x.x:5060 - 94.94.X.X:1025 ## T 94.94.X.X:49519 - 178.79.x.x:5060 [AP] REGISTER sip:test.domain;transport=tcp;hide SIP/2.0. Via: SIP/2.0/TCP 94.94.X.X:49519;rport;branch=z9hG4bKPj68a9c487-ae8c-428a-8c50-dd195a46a6bf;alias. Max-Forwards: 70. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30035 REGISTER. User-Agent: PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob. Expires: 300. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Authorization: Digest username=528, realm=test.domain, nonce=Ugo+VFIKPSgVy8fh9fSy9SDLvT0wO4QV, uri=sip:test.domain;transport=tcp;hide, response=ac1c7311ccb887fc8fb494d8ebf1bd36. Content-Length: 0. . # T 178.79.x.x:5060 - 94.94.X.X:49519 [AP] SIP/2.0 200 OK. Via: SIP/2.0/TCP 94.94.X.X:49519;rport=49519;branch=z9hG4bKPj68a9c487-ae8c-428a-8c50-dd195a46a6bf;alias. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/14/2013 11:31 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:26 AM, Roberto Fichera wrote: On 08/14/2013 11:20 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:16 AM, Roberto Fichera wrote: On 08/14/2013 10:19 AM, Daniel-Constantin Mierla wrote: Hi, Hello, as you can see in the REGISTER, the phone give a public IP where it can be contacted and kamailio tries to deliver to that address sip:528@94.94.X.X:1274;transport=TCP REGISTER comes from another port, but that is allowed in SIP. Yep! That's the problem You should disable stun in the client and let the server care of nat traversal. As already said all client doesn't use any stun- then how they discover the public IP address if they are behind NAT? Or did I misunderstand that they are behind NAT? Yes! They are behind NAT! Shouldn't kamailio detect such behaviour so it will change the contact header and the other fields accordingly using the nat_fix_ functions? detection of whether a device is behind nat is done based on comparing source IP of the packet with the IP addresses in the SIP message. It is no other way from application point of view. If you look at the trace, the REGISTER has only public IP addresses, no private address. Also, the Via header is perfectly matching the the source IP and port of the packet. Mhhh!!! That's true! Therefore, if the device is behind a nat in a private network, how does it discover the public IP or the NAT router? Is the nat router running a SIP ALG? Can you get the SIP trace on the device itself? Good question! It's a cisco 877 but the conf doesn't have any kind of SIP related configuration. Does it handle transparently the SIP traffic? Cisco IOS Software, C870 Software (C870-ADVIPSERVICESK9-M), Version 12.4(15)T5, RELEASE SOFTWARE (fc4) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2008 by Cisco Systems, Inc. Compiled Thu 01-May-08 02:31 by prod_rel_team Cheers, Daniel ___ 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/14/2013 11:51 AM, Roberto Fichera wrote: On 08/14/2013 11:31 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:26 AM, Roberto Fichera wrote: On 08/14/2013 11:20 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:16 AM, Roberto Fichera wrote: On 08/14/2013 10:19 AM, Daniel-Constantin Mierla wrote: Hi, Hello, as you can see in the REGISTER, the phone give a public IP where it can be contacted and kamailio tries to deliver to that address sip:528@94.94.X.X:1274;transport=TCP REGISTER comes from another port, but that is allowed in SIP. Yep! That's the problem You should disable stun in the client and let the server care of nat traversal. As already said all client doesn't use any stun- then how they discover the public IP address if they are behind NAT? Or did I misunderstand that they are behind NAT? Yes! They are behind NAT! Shouldn't kamailio detect such behaviour so it will change the contact header and the other fields accordingly using the nat_fix_ functions? detection of whether a device is behind nat is done based on comparing source IP of the packet with the IP addresses in the SIP message. It is no other way from application point of view. If you look at the trace, the REGISTER has only public IP addresses, no private address. Also, the Via header is perfectly matching the the source IP and port of the packet. Mhhh!!! That's true! Therefore, if the device is behind a nat in a private network, how does it discover the public IP or the NAT router? Is the nat router running a SIP ALG? Can you get the SIP trace on the device itself? Good question! It's a cisco 877 but the conf doesn't have any kind of SIP related configuration. Does it handle transparently the SIP traffic? Cisco IOS Software, C870 Software (C870-ADVIPSERVICESK9-M), Version 12.4(15)T5, RELEASE SOFTWARE (fc4) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2008 by Cisco Systems, Inc. Compiled Thu 01-May-08 02:31 by prod_rel_team Ok! There are two commands to disable it, since it's enabled by default!!! no ip nat service sip tcp port 5060 no ip nat service sip udp port 5060 I'll test it right now! Cheers, Daniel ___ 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 ___ 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/14/2013 04:36 PM, Vitaliy Aleksandrov wrote: If you won't be able to disable SIP ALG on your router you can fill $avp(received) manually before calling save(): $avp(received) = sip: + $si + : + $sp + ;transport= + $proto; In this case all user location records will have the received attribut even if a UA isn't behind NAT, but I don't see any problems with that. This one looks working, but the callee doesn't answer correctly because the TCP isn't correct: Contact:: sip:528@94.94.X.X:1380;transport=TCP;ob;q=;expires=294;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;received=sip:94.94.X.X:37030;transport=tcp;user_agent=PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17;reg-id=0 The contact uses a port which isn't translated inside by the router, the received field shows the right one. Should I change the Contact header instead? In case, how can I do that? Cheers, Roberto Fichera. On 08/14/2013 11:51 AM, Roberto Fichera wrote: On 08/14/2013 11:31 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:26 AM, Roberto Fichera wrote: On 08/14/2013 11:20 AM, Daniel-Constantin Mierla wrote: Hi, Hello, On 8/14/13 11:16 AM, Roberto Fichera wrote: On 08/14/2013 10:19 AM, Daniel-Constantin Mierla wrote: Hi, Hello, as you can see in the REGISTER, the phone give a public IP where it can be contacted and kamailio tries to deliver to that address sip:528@94.94.X.X:1274;transport=TCP REGISTER comes from another port, but that is allowed in SIP. Yep! That's the problem You should disable stun in the client and let the server care of nat traversal. As already said all client doesn't use any stun- then how they discover the public IP address if they are behind NAT? Or did I misunderstand that they are behind NAT? Yes! They are behind NAT! Shouldn't kamailio detect such behaviour so it will change the contact header and the other fields accordingly using the nat_fix_ functions? detection of whether a device is behind nat is done based on comparing source IP of the packet with the IP addresses in the SIP message. It is no other way from application point of view. If you look at the trace, the REGISTER has only public IP addresses, no private address. Also, the Via header is perfectly matching the the source IP and port of the packet. Mhhh!!! That's true! Therefore, if the device is behind a nat in a private network, how does it discover the public IP or the NAT router? Is the nat router running a SIP ALG? Can you get the SIP trace on the device itself? Good question! It's a cisco 877 but the conf doesn't have any kind of SIP related configuration. Does it handle transparently the SIP traffic? Cisco IOS Software, C870 Software (C870-ADVIPSERVICESK9-M), Version 12.4(15)T5, RELEASE SOFTWARE (fc4) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2008 by Cisco Systems, Inc. Compiled Thu 01-May-08 02:31 by prod_rel_team Ok! There are two commands to disable it, since it's enabled by default!!! no ip nat service sip tcp port 5060 no ip nat service sip udp port 5060 I'll test it right now! Cheers, Daniel ___ 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 ___ 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 ___ 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 ___ 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/13/2013 12:03 PM, Daniel-Constantin Mierla wrote: Hello, you should grab the ngrep for such call to understand better what happens. Also, dumping the location records will be useful (kamctl ul show). Also, be sure that tcp connection lifetime is long enough to survive re-registration. To avoid trying to open connections behind nat, use set_forward_no_connect() for calls involving nat traversal. I'm using the default conf coming from fedora rpm. So, mainly the problem seems related to kamailio which doesn't reuse the TCP port used by NATed clients. I've also notice that the received field isn't set at all, so this means that the contact will not get aliased at all. I would really like to have a look to a working cfg file for TCP NATed clients that reuse the TCP port. Even better if the configuration is based on the fedora default rpm. Cheers, Roberto Fichera. Cheers, Daniel On 7/30/13 6:44 PM, Roberto Fichera wrote: Hi All, Sorry for cross-posting this email to PJLIB, but maybe there are some things related. Anyhow! I'm having problems on kamailio v4.0.2 under Fedora 18 64bit and TCP client like iPhone using PJSIP as SIP library. Basically once the iPhone side in close the call (TCP-UDP) I'm getting the error below. Kamailio is running under a VPS without NATed network so it uses a real public address. Furthermore, note that tcp_main is answering to a 192.168.2.98 ip address which is the iPhone client. This looks really strange to me since it should answer directly to the public/port used for the registration and not to a such kind of reserved address. The kamilio configuration is basically the default with a very few changes like NAT, rtpproxy and postgresql backend. This problems doesn't happen at all when using UDP-UDP calls. But I cannot use it because as you certain know UDP connection under iPhone will not work when the application run in background mode. Can someone suggest how to solve this issue or maybe suggest a TCP working solution for iPhone? Thanks in advance. Roberto Fichera. Jul 30 16:21:53 proxy /usr/sbin/kamailio[9502]: ERROR: core [tcp_main.c:4432]: tcpconn_main_timeout(): connect 192.168.2.98:5060 failed (timeout) Jul 30 16:21:55 proxy rtpproxy[2262]: DBUG:get_command: received command 9483_9 D 12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060 as74e0c388 GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:handle_delete: forcefully deleting session 1 on ports 15604/17354 Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: RTP stats: 354 in from callee, 603 in from caller, 957 relayed, 0 dropped Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: RTCP stats: 5 in from callee, 2 in from caller, 7 relayed, 0 dropped Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: session on ports 15604/17354 is cleaned up Jul 30 16:21:55 proxy rtpproxy[2262]: DBUG:doreply: sending reply 9483_9 0 Jul 30 16:21:55 proxy rtpproxy[2262]: Jul 30 16:22:04 proxy /usr/sbin/kamailio[9502]: ERROR: core [tcp_main.c:4432]: tcpconn_main_timeout(): connect 192.168.2.98:5060 failed (timeout) Jul 30 16:22:14 proxy rtpproxy[2262]: DBUG:get_command: received command 9496_16 D 12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060 GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj as74e0c388 Jul 30 16:22:14 proxy rtpproxy[2262]: INFO:handle_command: delete request failed: session 12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060, tags GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj/as74e0c388 not found Jul 30 16:22:14 proxy rtpproxy[2262]: DBUG:doreply: sending reply 9496_16 E8 Jul 30 16:22:14 proxy rtpproxy[2262]: ___ 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 ___ 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
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/13/2013 03:15 PM, Roberto Fichera wrote: On 08/13/2013 02:33 PM, Daniel-Constantin Mierla wrote: Hello, On 8/13/13 1:10 PM, Roberto Fichera wrote: On 08/13/2013 12:03 PM, Daniel-Constantin Mierla wrote: Hello, you should grab the ngrep for such call to understand better what happens. Also, dumping the location records will be useful (kamctl ul show). Also, be sure that tcp connection lifetime is long enough to survive re-registration. To avoid trying to open connections behind nat, use set_forward_no_connect() for calls involving nat traversal. I'm using the default conf coming from fedora rpm. So, mainly the problem seems related to kamailio which doesn't reuse the TCP port used by NATed clients. I've also notice that the received field isn't set at all, so this means that the contact will not get aliased at all. I would really like to have a look to a working cfg file for TCP NATed clients that reuse the TCP port. Even better if the configuration is based on the fedora default rpm. if received is not set, then means the register was not detected as coming from behind nat. Is the phone using stun? I'm testing with a normal rtpproxy configuration. BTW udp - udp work perfectly. Again, put here the ngrep for registration and a call to see if something is wrong with signaling. There is no help that we can provide otherwise. The default config works fine for tcp and natted clients, I use it everywhere for this case without issues. I tried the default cfg enabling both NAT and RTPproxy, but seems that kamailio doesn't reuse TCP ports. Anyway, this is a call from UDP (512) - TCP (526) both behind the same NAT, from kamailio point of view I forgot to say that the received field is now present because I've changed the route[NATDETECT] in the default configuration as route[NATDETECT] { #!ifdef WITH_NAT force_rport(); --if (nat_uac_test(19) || proto != UDP) { if (is_method(REGISTER)) { fix_nated_register(); } else { fix_nated_contact(); } setflag(FLT_NATS); } #!endif return; } [root@proxy ~]# kamctl ul show 526 Contact:: sip:526@94.94.X.X:1238;transport=TCP;ob;q=;expires=537;flags=0x0;cflags=0x40;state=0;socket=tcp:178.79.x.x:5060;methods=0x1FDF;received=sip:94.94.X.X:61922;transport=TCP;user_agent=DICE Smartphone 1.0/iPhone;reg-id=0 [root@proxy ~]# kamctl ul show 512 Contact:: sip:512@94.94.X.X:5060;q=;expires=32;flags=0x0;cflags=0x40;state=0;socket=udp:178.79.x.x:5060;methods=0x;received=sip:94.94.X.X:1025;user_agent=DICE 1.8.20.1;reg-id=0 [root@proxy ~]# U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:526@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 13:04:30 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer. Content-Type: application/sdp. Content-Length: 264. . v=0. o=root 1263161426 1263161426 IN IP4 94.94.X.X. s=Asterisk PBX 11.3.0. c=IN IP4 94.94.X.X. t=0 0. m=audio 10782 RTP/AVP 0 110 101. a=rtpmap:0 PCMU/8000. a=rtpmap:110 speex/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. # U 178.79.x.x:5060 - 94.94.X.X:1025 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport=1025. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060;tag=333a0370df4a40d5d5a0c21bb156e2a6.4a00. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. Proxy-Authenticate: Digest realm=test.domain, nonce=UgowYFIKLzQXDSUWUpy4xlhdXZ7WNjPt. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . # U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:526@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 13:04:30 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer. Content-Type: application/sdp. Content-Length: 264. . v=0. o=root 1263161426 1263161426 IN IP4 94.94.X.X. s=Asterisk PBX 11.3.0. c=IN IP4 94.94.X.X. t=0 0. m=audio 10782 RTP/AVP 0 110 101. a=rtpmap:0 PCMU/8000. a=rtpmap:110 speex/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. # U 178.79.x.x:5060 - 94.94.X.X:1025 SIP/2.0 407
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/13/2013 03:22 PM, Daniel-Constantin Mierla wrote: The sip trace is incomplete, I don't see invite with credentials and then I see an ACK sent via tcp on the right connection. That means a negative response was received over tcp from the callee. I think I'll restart from the default configuration so I'll removing all testing code I wrote ;-) ! Daniel On 8/13/13 3:15 PM, Roberto Fichera wrote: On 08/13/2013 02:33 PM, Daniel-Constantin Mierla wrote: Hello, On 8/13/13 1:10 PM, Roberto Fichera wrote: On 08/13/2013 12:03 PM, Daniel-Constantin Mierla wrote: Hello, you should grab the ngrep for such call to understand better what happens. Also, dumping the location records will be useful (kamctl ul show). Also, be sure that tcp connection lifetime is long enough to survive re-registration. To avoid trying to open connections behind nat, use set_forward_no_connect() for calls involving nat traversal. I'm using the default conf coming from fedora rpm. So, mainly the problem seems related to kamailio which doesn't reuse the TCP port used by NATed clients. I've also notice that the received field isn't set at all, so this means that the contact will not get aliased at all. I would really like to have a look to a working cfg file for TCP NATed clients that reuse the TCP port. Even better if the configuration is based on the fedora default rpm. if received is not set, then means the register was not detected as coming from behind nat. Is the phone using stun? I'm testing with a normal rtpproxy configuration. BTW udp - udp work perfectly. Again, put here the ngrep for registration and a call to see if something is wrong with signaling. There is no help that we can provide otherwise. The default config works fine for tcp and natted clients, I use it everywhere for this case without issues. I tried the default cfg enabling both NAT and RTPproxy, but seems that kamailio doesn't reuse TCP ports. Anyway, this is a call from UDP (512) - TCP (526) both behind the same NAT, from kamailio point of view [root@proxy ~]# kamctl ul show 526 Contact:: sip:526@94.94.X.X:1238;transport=TCP;ob;q=;expires=537;flags=0x0;cflags=0x40;state=0;socket=tcp:178.79.x.x:5060;methods=0x1FDF;received=sip:94.94.X.X:61922;transport=TCP;user_agent=DICE Smartphone 1.0/iPhone;reg-id=0 [root@proxy ~]# kamctl ul show 512 Contact:: sip:512@94.94.X.X:5060;q=;expires=32;flags=0x0;cflags=0x40;state=0;socket=udp:178.79.x.x:5060;methods=0x;received=sip:94.94.X.X:1025;user_agent=DICE 1.8.20.1;reg-id=0 [root@proxy ~]# U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:526@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 13:04:30 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer. Content-Type: application/sdp. Content-Length: 264. . v=0. o=root 1263161426 1263161426 IN IP4 94.94.X.X. s=Asterisk PBX 11.3.0. c=IN IP4 94.94.X.X. t=0 0. m=audio 10782 RTP/AVP 0 110 101. a=rtpmap:0 PCMU/8000. a=rtpmap:110 speex/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. # U 178.79.x.x:5060 - 94.94.X.X:1025 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport=1025. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060;tag=333a0370df4a40d5d5a0c21bb156e2a6.4a00. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. Proxy-Authenticate: Digest realm=test.domain, nonce=UgowYFIKLzQXDSUWUpy4xlhdXZ7WNjPt. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . # U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:526@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 13:04:30 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer. Content-Type: application/sdp. Content-Length: 264. . v=0. o=root 1263161426 1263161426 IN IP4 94.94.X.X. s=Asterisk PBX 11.3.0. c=IN IP4 94.94.X.X. t=0 0. m=audio 10782 RTP/AVP 0 110 101. a=rtpmap:0 PCMU/8000. a=rtpmap:110 speex/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. # U 178.79.x.x:5060 - 94.94.X.X:1025 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport=1025. From: asterisk sip
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/13/2013 03:25 PM, Daniel-Constantin Mierla wrote: Can you get a ngrep trace for a registration as well (for the phone using tcp)? Ok! I'll use pjsua from my local machine connecting in the same way as the TCP client was doing. The TCP client it's an iPhone using the same pjlib library. Daniel On 8/13/13 3:23 PM, Roberto Fichera wrote: On 08/13/2013 03:15 PM, Roberto Fichera wrote: On 08/13/2013 02:33 PM, Daniel-Constantin Mierla wrote: Hello, On 8/13/13 1:10 PM, Roberto Fichera wrote: On 08/13/2013 12:03 PM, Daniel-Constantin Mierla wrote: Hello, you should grab the ngrep for such call to understand better what happens. Also, dumping the location records will be useful (kamctl ul show). Also, be sure that tcp connection lifetime is long enough to survive re-registration. To avoid trying to open connections behind nat, use set_forward_no_connect() for calls involving nat traversal. I'm using the default conf coming from fedora rpm. So, mainly the problem seems related to kamailio which doesn't reuse the TCP port used by NATed clients. I've also notice that the received field isn't set at all, so this means that the contact will not get aliased at all. I would really like to have a look to a working cfg file for TCP NATed clients that reuse the TCP port. Even better if the configuration is based on the fedora default rpm. if received is not set, then means the register was not detected as coming from behind nat. Is the phone using stun? I'm testing with a normal rtpproxy configuration. BTW udp - udp work perfectly. Again, put here the ngrep for registration and a call to see if something is wrong with signaling. There is no help that we can provide otherwise. The default config works fine for tcp and natted clients, I use it everywhere for this case without issues. I tried the default cfg enabling both NAT and RTPproxy, but seems that kamailio doesn't reuse TCP ports. Anyway, this is a call from UDP (512) - TCP (526) both behind the same NAT, from kamailio point of view I forgot to say that the received field is now present because I've changed the route[NATDETECT] in the default configuration as route[NATDETECT] { #!ifdef WITH_NAT force_rport(); --if (nat_uac_test(19) || proto != UDP) { if (is_method(REGISTER)) { fix_nated_register(); } else { fix_nated_contact(); } setflag(FLT_NATS); } #!endif return; } [root@proxy ~]# kamctl ul show 526 Contact:: sip:526@94.94.X.X:1238;transport=TCP;ob;q=;expires=537;flags=0x0;cflags=0x40;state=0;socket=tcp:178.79.x.x:5060;methods=0x1FDF;received=sip:94.94.X.X:61922;transport=TCP;user_agent=DICE Smartphone 1.0/iPhone;reg-id=0 [root@proxy ~]# kamctl ul show 512 Contact:: sip:512@94.94.X.X:5060;q=;expires=32;flags=0x0;cflags=0x40;state=0;socket=udp:178.79.x.x:5060;methods=0x;received=sip:94.94.X.X:1025;user_agent=DICE 1.8.20.1;reg-id=0 [root@proxy ~]# U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:526@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 13:04:30 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer. Content-Type: application/sdp. Content-Length: 264. . v=0. o=root 1263161426 1263161426 IN IP4 94.94.X.X. s=Asterisk PBX 11.3.0. c=IN IP4 94.94.X.X. t=0 0. m=audio 10782 RTP/AVP 0 110 101. a=rtpmap:0 PCMU/8000. a=rtpmap:110 speex/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. # U 178.79.x.x:5060 - 94.94.X.X:1025 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport=1025. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060;tag=333a0370df4a40d5d5a0c21bb156e2a6.4a00. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. Proxy-Authenticate: Digest realm=test.domain, nonce=UgowYFIKLzQXDSUWUpy4xlhdXZ7WNjPt. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . # U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:526@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK4a420cee;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as76007db0. To: sip:526@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 068a5a23639785a7583d952d6f9bca84@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 13:04:30 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer
Re: [SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
On 08/13/2013 03:32 PM, Roberto Fichera wrote: On 08/13/2013 03:25 PM, Daniel-Constantin Mierla wrote: Can you get a ngrep trace for a registration as well (for the phone using tcp)? Ok! I'll use pjsua from my local machine connecting in the same way as the TCP client was doing. The TCP client it's an iPhone using the same pjlib library. I can confirm that the default cfg for TCP client doesn't work for me. My cfg file is attached. The TCP client doesn't receive any package at INVITE. Finally in /var/log/message I get this log below: Aug 13 14:05:37 proxy /usr/sbin/kamailio[8401]: ERROR: core [tcp_main.c:4247]: handle_tcpconn_ev(): connect 94.94.X.X:1274 failed Contact:: sip:528@94.94.X.X:1274;transport=TCP;ob;q=;expires=38;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;user_agent=PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17;reg-id=0 [root@proxy ~]# kamctl ul show 512 Contact:: sip:512@94.94.X.X:5060;q=;expires=61;flags=0x0;cflags=0x40;state=0;socket=udp:178.79.X.X:5060;methods=0x;received=sip:94.94.X.X:1025 user_agent=DICE 1.8.20.1;reg-id=0 [root@proxy ~]# ngrep -W byline -d eth0 port 5060 interface: eth0 (178.79.X.X/255.255.255.0) filter: (ip or ip6) and ( port 5060 ) # T 94.94.X.X:49519 - 178.79.x.x:5060 [AP] REGISTER sip:test.domain;transport=tcp;hide SIP/2.0. Via: SIP/2.0/TCP 94.94.X.X:49519;rport;branch=z9hG4bKPje03c11fd-d742-4502-98d8-69ca456ddd56;alias. Max-Forwards: 70. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30034 REGISTER. User-Agent: PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob. Expires: 300. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Content-Length: 0. . # T 178.79.x.x:5060 - 94.94.X.X:49519 [AP] SIP/2.0 401 Unauthorized. Via: SIP/2.0/TCP 94.94.X.X:49519;rport=49519;branch=z9hG4bKPje03c11fd-d742-4502-98d8-69ca456ddd56;alias. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.9167. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30034 REGISTER. WWW-Authenticate: Digest realm=test.domain, nonce=Ugo+VFIKPSgVy8fh9fSy9SDLvT0wO4QV. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . # U 178.79.x.x:5060 - 94.94.X.X:1025 ## T 94.94.X.X:49519 - 178.79.x.x:5060 [AP] REGISTER sip:test.domain;transport=tcp;hide SIP/2.0. Via: SIP/2.0/TCP 94.94.X.X:49519;rport;branch=z9hG4bKPj68a9c487-ae8c-428a-8c50-dd195a46a6bf;alias. Max-Forwards: 70. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30035 REGISTER. User-Agent: PJSUA v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob. Expires: 300. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Authorization: Digest username=528, realm=test.domain, nonce=Ugo+VFIKPSgVy8fh9fSy9SDLvT0wO4QV, uri=sip:test.domain;transport=tcp;hide, response=ac1c7311ccb887fc8fb494d8ebf1bd36. Content-Length: 0. . # T 178.79.x.x:5060 - 94.94.X.X:49519 [AP] SIP/2.0 200 OK. Via: SIP/2.0/TCP 94.94.X.X:49519;rport=49519;branch=z9hG4bKPj68a9c487-ae8c-428a-8c50-dd195a46a6bf;alias. From: sip:528@test.domain;hide;tag=64c9e9b9-cb23-4a79-bb0d-2497135e449b. To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.5440. Call-ID: 3ebadaeb-e6d6-42e3-9362-5ca4b5ddd8e1. CSeq: 30035 REGISTER. Contact: sip:528@94.94.X.X:1274;transport=TCP;ob;expires=300. Server: kamailio (4.0.2 (x86_64/linux)). Content-Length: 0. . ## U 94.94.X.X:1025 - 178.79.x.x:5060 INVITE sip:528@test.domain:5060 SIP/2.0. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK69275d13;rport. Max-Forwards: 70. From: asterisk sip:512@test.domain;tag=as4531a4ee. To: sip:528@test.domain:5060. Contact: sip:512@94.94.X.X:5060. Call-ID: 2ea7e0f3173949d40b69385b62b79d6a@test.domain. CSeq: 102 INVITE. User-Agent: DICE 1.8.20.1. Date: Tue, 13 Aug 2013 14:04:11 GMT. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH. Supported: replaces, timer. Content-Type: application/sdp. Content-Length: 262. . v=0. o=root 883039875 883039875 IN IP4 94.94.X.X. s=Asterisk PBX 11.3.0. c=IN IP4 94.94.X.X. t=0 0. m=audio 18120 RTP/AVP 0 110 101. a=rtpmap:0 PCMU/8000. a=rtpmap:110 speex/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. # U 178.79.x.x:5060 - 94.94.X.X:1025 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 94.94.X.X:5060;branch=z9hG4bK69275d13;rport=1025. From: asterisk sip:512@test.domain;tag=as4531a4ee. To: sip:528@test.domain:5060;tag=333a0370df4a40d5d5a0c21bb156e2a6.038f. Call-ID: 2ea7e0f3173949d40b69385b62b79d6a@test.domain. CSeq: 102 INVITE. Proxy-Authenticate: Digest realm=test.domain
[SR-Users] Trouble when bridging call between UDP and TCP clients behind NAT
Via: SIP/2.0/TCP 192.168.2.90:56120;rport=56120;branch=z9hG4bKPja2e404d0-9812-4b7b-b86b-3f3b1a27d204;alias From: sip:528@test.domain;hide;tag=93cc1d8e-9ccc-4d36-8587-923ff44daf89 To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.d863 Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50697 REGISTER Contact: sip:528@192.168.2.90:5060;transport=TCP;ob;expires=300;+sip.instance=urn:uuid:----be3c954f;reg-id=1 Server: kamailio (4.0.2 (x86_64/linux)) Content-Length: 0 --end msg-- REGISTER sip:test.domain;transport=tcp;hide SIP/2.0 Via: SIP/2.0/TCP 192.168.2.90:56120;rport;branch=z9hG4bKPj3f8c138b-df5e-40a1-8482-fa792c362291;alias Max-Forwards: 70 From: sip:528@test.domain;hide;tag=2256e1a1-bad1-4f02-a9ff-45ff349f2c52 To: sip:528@test.domain;hide Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50698 REGISTER User-Agent: PJSUA v2.1-svn Linux-3.10.5.44/x86_64/glibc-2.17 Supported: outbound, path Contact: sip:528@192.168.2.90:5060;transport=TCP;ob;reg-id=1;+sip.instance=urn:uuid:----be3c954f Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- SIP/2.0 401 Unauthorized Via: SIP/2.0/TCP 192.168.2.90:56120;rport=56120;branch=z9hG4bKPj3f8c138b-df5e-40a1-8482-fa792c362291;alias From: sip:528@test.domain;hide;tag=2256e1a1-bad1-4f02-a9ff-45ff349f2c52 To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.15dd Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50698 REGISTER WWW-Authenticate: Digest realm=test.domain, nonce=UgOdTVIDnCHViWa5LC/JUVsF0HRn4wA5 Server: kamailio (4.0.2 (x86_64/linux)) Content-Length: 0 --end msg-- REGISTER sip:test.domain;transport=tcp;hide SIP/2.0 Via: SIP/2.0/TCP 192.168.2.90:56120;rport;branch=z9hG4bKPj9539d611-09a9-4cac-bd29-bfe68132c058;alias Max-Forwards: 70 From: sip:528@test.domain;hide;tag=2256e1a1-bad1-4f02-a9ff-45ff349f2c52 To: sip:528@test.domain;hide Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50699 REGISTER User-Agent: PJSUA v2.1-svn Linux-3.10.5.44/x86_64/glibc-2.17 Supported: outbound, path Contact: sip:528@192.168.2.90:5060;transport=TCP;ob;reg-id=1;+sip.instance=urn:uuid:----be3c954f Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username=528@test.domain, realm=test.domain, nonce=UgOdTVIDnCHViWa5LC/JUVsF0HRn4wA5, uri=sip:test.domain;transport=tcp;hide, response=3d2ed2fc1da090f592424cfa5804943e Content-Length: 0 --end msg-- SIP/2.0 200 OK Via: SIP/2.0/TCP 192.168.2.90:56120;rport=56120;branch=z9hG4bKPj9539d611-09a9-4cac-bd29-bfe68132c058;alias From: sip:528@test.domain;hide;tag=2256e1a1-bad1-4f02-a9ff-45ff349f2c52 To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.cf79 Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50699 REGISTER Contact: sip:528@192.168.2.90:5060;transport=TCP;ob;expires=300;+sip.instance=urn:uuid:----be3c954f;reg-id=1 Server: kamailio (4.0.2 (x86_64/linux)) Content-Length: 0 Does anyone can show me how solve this problem? Thanks in advance, Roberto Fichera. ___ 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
Re: [SR-Users] Trouble when bridging call between UDP and TCP clients behind NAT
On 08/09/2013 01:34 PM, Klaus Darilion wrote: It seems that there is a NAT-ALG between the client and the proxy which rewrites the VIa header and Contact header. These ALGs are quite often buggy and should be avoided. Further, as the ALG rewrites the IP addresses, it may be that your configuration does not detect the client as NATed and thus does not NAT traversal. I forgot to say that I'm using a slightly modified default v4.0.x cfg file. So WITH_NAT and backend on postgresql. That's it. You can try: a) comment all nat_uac_test() functions in your config and force NAT traversal always. This may help against the broken ALG b) move to a different port, e.g. port 4567. Many ALGs trigger the rewrite if they see messages to/from port 5060. c) use TLS, then the ALG can not rewrite the message I'll try all the above regards Klaus On 09.08.2013 13:22, Roberto Fichera wrote: Hi All, I'm try to setup kamilio v4.0.2 under a Fedora18 64bits having a public address in order to bridge calls between UDP and TCP clients. Everything works pretty fine between UDP clients even if behind NAT. But as soon as one TCP client is being called I'm getting this below on kamailio side. Note that the port is wrong and the TCP client doesn't get aliased nor tcp port remappend or received field is set: Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50696 REGISTER User-Agent: PJSUA v2.1-svn Linux-3.10.5.44/x86_64/glibc-2.17 Supported: outbound, path Contact: sip:528@94.94.X.X:1117;transport=TCP;ob;reg-id=1;+sip.instance=urn:uuid:----be3c954f Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 SIP/2.0 401 Unauthorized Via: SIP/2.0/TCP 94.94.X.X:56120;rport=56120;branch=z9hG4bKPj75004c2a-7ba3-4807-805c-a3ac8016e5b7;alias From: sip:528@test.domain;hide;tag=93cc1d8e-9ccc-4d36-8587-923ff44daf89 To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.aab2 Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50696 REGISTER WWW-Authenticate: Digest realm=test.domain, nonce=UgOcJlIDmvotaQR8dxYacL2fFlyotlC2 Server: kamailio (4.0.2 (x86_64/linux)) Content-Length: 0 REGISTER sip:test.domain;transport=tcp;hide SIP/2.0 Via: SIP/2.0/TCP 94.94.X.X:56120;rport;branch=z9hG4bKPja2e404d0-9812-4b7b-b86b-3f3b1a27d204;alias Max-Forwards: 70 From: sip:528@test.domain;hide;tag=93cc1d8e-9ccc-4d36-8587-923ff44daf89 To: sip:528@test.domain;hide Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50697 REGISTER User-Agent: PJSUA v2.1-svn Linux-3.10.5.44/x86_64/glibc-2.17 Supported: outbound, path Contact: sip:528@94.94.X.X:1117;transport=TCP;ob;reg-id=1;+sip.instance=urn:uuid:----be3c954f Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username=528@test.domain, realm=test.domain, nonce=UgOcJlIDmvotaQR8dxYacL2fFlyotlC2, uri=sip:test.domain;transport=tcp;hide, response=d6e93d582744a3cf12cc48989f66872e Content-Length: 0 SIP/2.0 200 OK Via: SIP/2.0/TCP 94.94.X.X:56120;rport=56120;branch=z9hG4bKPja2e404d0-9812-4b7b-b86b-3f3b1a27d204;alias From: sip:528@test.domain;hide;tag=93cc1d8e-9ccc-4d36-8587-923ff44daf89 To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.d863 Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50697 REGISTER Contact: sip:528@94.94.X.X:1117;transport=TCP;ob;expires=300;+sip.instance=urn:uuid:----be3c954f;reg-id=1 Server: kamailio (4.0.2 (x86_64/linux)) Content-Length: 0 Thus, kamailio trigger this error: Aug 9 09:20:47 proxy /usr/sbin/kamailio[3553]: ERROR: core [tcp_main.c:4247]: handle_tcpconn_ev(): connect 94.94.X.X:1117 failed From the client side (pjsua client) the log looks: REGISTER sip:test.domain;transport=tcp;hide SIP/2.0 Via: SIP/2.0/TCP 192.168.2.90:56120;rport;branch=z9hG4bKPj75004c2a-7ba3-4807-805c-a3ac8016e5b7;alias Max-Forwards: 70 From: sip:528@test.domain;hide;tag=93cc1d8e-9ccc-4d36-8587-923ff44daf89 To: sip:528@test.domain;hide Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50696 REGISTER User-Agent: PJSUA v2.1-svn Linux-3.10.5.44/x86_64/glibc-2.17 Supported: outbound, path Contact: sip:528@192.168.2.90:5060;transport=TCP;ob;reg-id=1;+sip.instance=urn:uuid:----be3c954f Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- SIP/2.0 401 Unauthorized Via: SIP/2.0/TCP 192.168.2.90:56120;rport=56120;branch=z9hG4bKPj75004c2a-7ba3-4807-805c-a3ac8016e5b7;alias From: sip:528@test.domain;hide;tag=93cc1d8e-9ccc-4d36-8587-923ff44daf89 To: sip:528@test.domain;hide;tag=333a0370df4a40d5d5a0c21bb156e2a6.aab2 Call-ID: 23306738-94b3-49b5-b7e8-dc1b8a8061db CSeq: 50696 REGISTER WWW-Authenticate: Digest realm=test.domain
[SR-Users] Kamailio v4.0.2, iPhone, TCP connection and PJLIB
Hi All, Sorry for cross-posting this email to PJLIB, but maybe there are some things related. Anyhow! I'm having problems on kamailio v4.0.2 under Fedora 18 64bit and TCP client like iPhone using PJSIP as SIP library. Basically once the iPhone side in close the call (TCP-UDP) I'm getting the error below. Kamailio is running under a VPS without NATed network so it uses a real public address. Furthermore, note that tcp_main is answering to a 192.168.2.98 ip address which is the iPhone client. This looks really strange to me since it should answer directly to the public/port used for the registration and not to a such kind of reserved address. The kamilio configuration is basically the default with a very few changes like NAT, rtpproxy and postgresql backend. This problems doesn't happen at all when using UDP-UDP calls. But I cannot use it because as you certain know UDP connection under iPhone will not work when the application run in background mode. Can someone suggest how to solve this issue or maybe suggest a TCP working solution for iPhone? Thanks in advance. Roberto Fichera. Jul 30 16:21:53 proxy /usr/sbin/kamailio[9502]: ERROR: core [tcp_main.c:4432]: tcpconn_main_timeout(): connect 192.168.2.98:5060 failed (timeout) Jul 30 16:21:55 proxy rtpproxy[2262]: DBUG:get_command: received command 9483_9 D 12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060 as74e0c388 GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:handle_delete: forcefully deleting session 1 on ports 15604/17354 Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: RTP stats: 354 in from callee, 603 in from caller, 957 relayed, 0 dropped Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: RTCP stats: 5 in from callee, 2 in from caller, 7 relayed, 0 dropped Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: session on ports 15604/17354 is cleaned up Jul 30 16:21:55 proxy rtpproxy[2262]: DBUG:doreply: sending reply 9483_9 0 Jul 30 16:21:55 proxy rtpproxy[2262]: Jul 30 16:22:04 proxy /usr/sbin/kamailio[9502]: ERROR: core [tcp_main.c:4432]: tcpconn_main_timeout(): connect 192.168.2.98:5060 failed (timeout) Jul 30 16:22:14 proxy rtpproxy[2262]: DBUG:get_command: received command 9496_16 D 12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060 GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj as74e0c388 Jul 30 16:22:14 proxy rtpproxy[2262]: INFO:handle_command: delete request failed: session 12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060, tags GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj/as74e0c388 not found Jul 30 16:22:14 proxy rtpproxy[2262]: DBUG:doreply: sending reply 9496_16 E8 Jul 30 16:22:14 proxy rtpproxy[2262]: ___ 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
[SR-Users] Kamailio, Asterisk with TLS+SRTP
Hi All, I would setup a configuration where Kamailio authenticate asterisk SIP trunk using TLS and SRTP. At moment I was able to configure everything, including RTTProxy since most of the asterisks v1.8.19.1 are behind NAT. So far so good it works pretty good using standard authentication and the call goes straight between asterisks. But as soon as I move my configuration for both kamailio asterisk to TLS+SRTP I'm not able to authenticate asterisk SIP trunks. Especially asterisk seems insisting to use the port 5060 even if I requested the TLS on 5061. kamailio v3.3.3 tls.cfg is configured as: [server:default] method = TLSv1 verify_certificate = no require_certificate = no private_key = /etc/pki/tls/private/server.key certificate = /etc/pki/tls/certs/server.pem ca_list = /etc/pki/tls/certs/ca-bundle.crt #crl = //etc/kamailio/crl.pem # This is the default client domain, settings # in this domain will be used for all outgoing # TLS connections that do not match any other # client domain in this configuration file. # We require that servers present valid certificate. # [client:default] verify_certificate = no require_certificate = no So my asterisk conf is the following: [general] tlsenable=yes tlsbindaddr=0.0.0.0 tlscertfile=/etc/asterisk/5002.pem tlscafile=/etc/asterisk/ca-bundle.crt tlscipher=ALL tlsclientmethod=tlsv1 tlsdontverifyserver=yes transport=tls,udp . and the SIP trunk is configured as [kamailio] type=peer insecure=invite,port nat=yes disallow=all allow=ulaw host=kamailio_ip outboundproxy=tls://kamailio_ip port=5061 defaultuser=5002 fromuser = 5002 fromdomain =mydomain secret=5002 qualify=yes dtmfmode=rfc2833 context=default callbackextension=5002 directmedia=nonat sendrpid=yes transport=tls encryption=yes register = tls://5002:5002@kamailio_ip:5061/5002 I still get error like: Jan 14 10:45:12] ERROR[5244]: chan_sip.c:5600 create_addr_from_peer: 'UDP' is not a valid transport for 'dicenet'. we only use 'TLS'! ending call. [Jan 14 10:45:12] WARNING[5244]: chan_sip.c:13722 transmit_register: Probably a DNS error for registration to 5002@kamailio_ip, trying REGISTER again (after 20 seconds) [Jan 14 10:45:32] ERROR[5244]: chan_sip.c:5600 create_addr_from_peer: 'UDP' is not a valid transport for 'dicenet'. we only use 'TLS'! ending call. [Jan 14 10:45:32] WARNING[5244]: chan_sip.c:13722 transmit_register: Probably a DNS error for registration to 5002@kamailio_ip, trying REGISTER again (after 20 seconds) [Jan 14 10:45:52] ERROR[5244]: chan_sip.c:5600 create_addr_from_peer: 'UDP' is not a valid transport for 'dicenet'. we only use 'TLS'! ending call. [Jan 14 10:45:52] WARNING[5244]: chan_sip.c:13722 transmit_register: Probably a DNS error for registration to 5002@kamailio_ip, trying REGISTER again (after 20 seconds) [Jan 14 10:46:07] ERROR[7041]: tcptls.c:444 ast_tcptls_client_start: Unable to connect SIP socket to kamailio_ip:5060: Connection timed out Does anyone can suggest me something to read, try, check? Best regards. Roberto Fichera. ___ 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
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/21/2011 08:21 AM, Daniel-Constantin Mierla wrote: Hello, indeed there was some inconsistency. I just committed a patch to store empty string if the sender parameter is not set. That for the fact that later (about line 450) there is a query and the sender value is taken from db and strlen used. All over, these checks are used for SLA/BLA case. Could you please send me the diff so that I can apply it to my local v3.1.4 for rebuilding the rpms? Cheers, Daniel On 7/20/11 7:00 PM, Bucur Marius wrote: Hi, It think there is something wrong with the sql scripts, hence the code obviously accepts a null sender. presentity.c:357 if( presentity-sender) { query_cols[n_query_cols] = str_sender_col; query_vals[n_query_cols].type = DB1_STR; query_vals[n_query_cols].nul = 0; query_vals[n_query_cols].val.str_val.s = presentity-sender-s; query_vals[n_query_cols].val.str_val.len = presentity-sender-len; n_query_cols++; } From a logical point of view, I believe the sender should not be mandatory hence it could be generated by a machine - whose identity/location is not needed. Regards, Marius *From:* Daniel-Constantine Mierla mico...@gmail.com *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List sr-users@lists.sip-router.org *Cc:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List sr-users@lists.sip-router.org *Sent:* Wednesday, July 20, 2011 6:53 PM *Subject:* Re: [SR-Users] Kamailio presence server problem with PostgreSQL Hello, Thanks for troubleshooting further. What intrigues me is that the error message from syslog is printed from store result function, which is used after doing a select query. So something else might have to be reviewed as well. Anyhow, missing sender value should be checked, since it is a constraint for non-null. Interesting it was not risen with mysql. Cheers, Daniel On Jul 20, 2011, at 5:46 PM, Roberto Fichera ker...@tekno-soft.it mailto:ker...@tekno-soft.it wrote: On 07/20/2011 05:34 PM, Roberto Fichera wrote: On 07/20/2011 05:18 PM, Klaus Darilion wrote: Am 20.07.2011 17:00, schrieb Roberto Fichera: ERROR: null value in column sender violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,expires,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3619rpid:activities//dm:persontuple id=t9285statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311173624) Seems like the statement does not insert the sender although it is mandatory. If sender is really mandatory, then it seems the statement is buggy. how does look the corresponding presentity mysql table, does it has the same constraint or not? Anyway I can confirm that removing the constraint the problem of presence backed by postgresql seems solved. regards Klaus ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ 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 -- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/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
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/21/2011 01:55 PM, Klaus Darilion wrote: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b39747e213e350609761d14583db3e689ad6fefc http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=403ba772771545f4410ba4a5cf396125be353b12 http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=460fc8bf6ad5108ff3779c85ff150e4f5145b189 I've applied all the listed patches than regenerated and installed the rpms and set back to not null the sender constraint in the db. After restarting kamailio I'm still getting the problem as before. Am 21.07.2011 13:13, schrieb Roberto Fichera: On 07/21/2011 08:21 AM, Daniel-Constantin Mierla wrote: Hello, indeed there was some inconsistency. I just committed a patch to store empty string if the sender parameter is not set. That for the fact that later (about line 450) there is a query and the sender value is taken from db and strlen used. All over, these checks are used for SLA/BLA case. Could you please send me the diff so that I can apply it to my local v3.1.4 for rebuilding the rpms? Cheers, Daniel On 7/20/11 7:00 PM, Bucur Marius wrote: Hi, It think there is something wrong with the sql scripts, hence the code obviously accepts a null sender. presentity.c:357 if( presentity-sender) { query_cols[n_query_cols] = str_sender_col; query_vals[n_query_cols].type = DB1_STR; query_vals[n_query_cols].nul = 0; query_vals[n_query_cols].val.str_val.s = presentity-sender-s; query_vals[n_query_cols].val.str_val.len = presentity-sender-len; n_query_cols++; } From a logical point of view, I believe the sender should not be mandatory hence it could be generated by a machine - whose identity/location is not needed. Regards, Marius *From:* Daniel-Constantine Mierla mico...@gmail.com *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List sr-users@lists.sip-router.org *Cc:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List sr-users@lists.sip-router.org *Sent:* Wednesday, July 20, 2011 6:53 PM *Subject:* Re: [SR-Users] Kamailio presence server problem with PostgreSQL Hello, Thanks for troubleshooting further. What intrigues me is that the error message from syslog is printed from store result function, which is used after doing a select query. So something else might have to be reviewed as well. Anyhow, missing sender value should be checked, since it is a constraint for non-null. Interesting it was not risen with mysql. Cheers, Daniel On Jul 20, 2011, at 5:46 PM, Roberto Fichera ker...@tekno-soft.it mailto:ker...@tekno-soft.it wrote: On 07/20/2011 05:34 PM, Roberto Fichera wrote: On 07/20/2011 05:18 PM, Klaus Darilion wrote: Am 20.07.2011 17:00, schrieb Roberto Fichera: ERROR: null value in column sender violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,expires,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3619rpid:activities//dm:persontuple id=t9285statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311173624) Seems like the statement does not insert the sender although it is mandatory. If sender is really mandatory, then it seems the statement is buggy. how does look the corresponding presentity mysql table, does it has the same constraint or not? Anyway I can confirm that removing the constraint the problem of presence backed by postgresql seems solved. regards Klaus ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/21/2011 05:00 PM, Roberto Fichera wrote: On 07/21/2011 01:55 PM, Klaus Darilion wrote: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b39747e213e350609761d14583db3e689ad6fefc http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=403ba772771545f4410ba4a5cf396125be353b12 http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=460fc8bf6ad5108ff3779c85ff150e4f5145b189 I've applied all the listed patches than regenerated and installed the rpms and set back to not null the sender constraint in the db. After restarting kamailio I'm still getting the problem as before. Mmmhhh! The sender still null, but after removing the not null constraint again from the sender field, I just see another problem: Jul 21 17:02:37 roberto /usr/sbin/kamailio[24781]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 21 17:02:37 roberto /usr/sbin/kamailio[24781]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 21 17:02:37 roberto /usr/sbin/kamailio[24780]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted *Jul 21 17:02:37 roberto /usr/sbin/kamailio[24780]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column expires violates not-null constraint#012* so since the expires isn't present in the same query than the db trigger the not null problem. New query is below: ERROR: null value in column expires violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,sender,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311260173.24780.4.0','','?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3387rpid:activities//dm:persontuple id=t8698statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311260557) Am 21.07.2011 13:13, schrieb Roberto Fichera: On 07/21/2011 08:21 AM, Daniel-Constantin Mierla wrote: Hello, indeed there was some inconsistency. I just committed a patch to store empty string if the sender parameter is not set. That for the fact that later (about line 450) there is a query and the sender value is taken from db and strlen used. All over, these checks are used for SLA/BLA case. Could you please send me the diff so that I can apply it to my local v3.1.4 for rebuilding the rpms? Cheers, Daniel On 7/20/11 7:00 PM, Bucur Marius wrote: Hi, It think there is something wrong with the sql scripts, hence the code obviously accepts a null sender. presentity.c:357 if( presentity-sender) { query_cols[n_query_cols] = str_sender_col; query_vals[n_query_cols].type = DB1_STR; query_vals[n_query_cols].nul = 0; query_vals[n_query_cols].val.str_val.s = presentity-sender-s; query_vals[n_query_cols].val.str_val.len = presentity-sender-len; n_query_cols++; } From a logical point of view, I believe the sender should not be mandatory hence it could be generated by a machine - whose identity/location is not needed. Regards, Marius *From:* Daniel-Constantine Mierla mico...@gmail.com *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List sr-users@lists.sip-router.org *Cc:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List sr-users@lists.sip-router.org *Sent:* Wednesday, July 20, 2011 6:53 PM *Subject:* Re: [SR-Users] Kamailio presence server problem with PostgreSQL Hello, Thanks for troubleshooting further. What intrigues me is that the error message from syslog is printed from store result function, which is used after doing a select query. So something else might have to be reviewed as well. Anyhow, missing sender value should be checked, since it is a constraint for non-null. Interesting it was not risen with mysql. Cheers, Daniel On Jul 20, 2011, at 5:46 PM, Roberto Fichera ker...@tekno-soft.it mailto:ker...@tekno-soft.it wrote: On 07/20/2011 05:34 PM, Roberto Fichera wrote: On 07/20/2011 05:18 PM, Klaus Darilion wrote: Am 20.07.2011 17:00, schrieb Roberto Fichera: ERROR: null value in column sender violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,expires,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3619rpid:activities//dm:persontuple id=t9285statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311173624
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/21/2011 05:30 PM, Roberto Fichera wrote: On 07/21/2011 05:10 PM, Roberto Fichera wrote: On 07/21/2011 05:00 PM, Roberto Fichera wrote: On 07/21/2011 01:55 PM, Klaus Darilion wrote: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b39747e213e350609761d14583db3e689ad6fefc http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=403ba772771545f4410ba4a5cf396125be353b12 http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=460fc8bf6ad5108ff3779c85ff150e4f5145b189 I've applied all the listed patches than regenerated and installed the rpms and set back to not null the sender constraint in the db. After restarting kamailio I'm still getting the problem as before. Mmmhhh! The sender still null, but after removing the not null constraint again from the sender field, I just see another problem: Jul 21 17:02:37 roberto /usr/sbin/kamailio[24781]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 21 17:02:37 roberto /usr/sbin/kamailio[24781]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 21 17:02:37 roberto /usr/sbin/kamailio[24780]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted *Jul 21 17:02:37 roberto /usr/sbin/kamailio[24780]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column expires violates not-null constraint#012* so since the expires isn't present in the same query than the db trigger the not null problem. New query is below: ERROR: null value in column expires violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,sender,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311260173.24780.4.0','','?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3387rpid:activities//dm:persontuple id=t8698statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311260557) My fault, I've used cutted the n_query_cols++; before the column expires in the source code. Going to rebuild and testing again! Ok! Now everything works fine! Thanks! ___ 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
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/19/2011 11:10 PM, Daniel-Constantin Mierla wrote: Hello, can you set the debug=5 in the config file, restart, do the same scenario and send all the log messages. The error is printed by db store result function, which is kind of strange considering that the error message is related to a null constraint. Mmmhhh! debug=5 doesn't show anything as log messages, the log still the same. Anyway if found the problem looking under PostgreSQL logs. As I can see, the problem is under the query which basically doesn't uses the sender field, see below: ERROR: null value in column sender violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,expires,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3619rpid:activities//dm:persontuple id=t9285statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311173624) Cheers, Daniel On 7/19/11 11:44 AM, Roberto Fichera wrote: On 07/19/2011 11:36 AM, Daniel-Constantin Mierla wrote: Hello, On 7/19/11 10:41 AM, Roberto Fichera wrote: Hi all, I've setup for testing purpose an xcap server with Kamailio v3.1.4 backed with a postgresql v8.4.8 all in 64bits versions. On that configuration, I'm getting the errors below and consequently the presence doesn't correctly reports the status. Does anyone has the same problem? Best regards, Roberto Fichera. Jul 19 10:31:52 roberto /usr/sbin/kamailio[2005]: INFO: pua_usrloc [ul_publish.c:211]: should not send ul publish Jul 19 10:31:52 roberto /usr/sbin/kamailio[2015]: ERROR: script: = xhttp: xcap-caps : null Jul 19 10:31:52 roberto /usr/sbin/kamailio[2017]: ERROR: script: = xhttp: resource-lists : sip:roberto@192.168.2.92 Jul 19 10:31:52 roberto /usr/sbin/kamailio[2017]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/resource-lists/users/sip:roberto@192.168.2.92/index Jul 19 10:31:52 roberto /usr/sbin/kamailio[2021]: ERROR: script: = xhttp: pres-rules : sip:roberto@192.168.2.92 Jul 19 10:31:52 roberto /usr/sbin/kamailio[2021]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/pres-rules/users/sip:roberto@192.168.2.92/presrules Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 19 10:31:52 roberto /usr/sbin/kamailio[2004]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 19 10:31:52 roberto /usr/sbin/kamailio[2005]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:mattia@192.168.2.92 for event presence *Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012* *Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned* are there any other errors/warnings in syslog after this line related to same message? It should show where in presence modules the query was executed. No! Actually I don't see anything else. I just started Kamailio and than afterwards Jitsi, that's it! Please tell me if I've to do something in order to discover where the problem is. Cheers, Daniel -- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/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 -- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/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
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/20/2011 05:18 PM, Klaus Darilion wrote: Am 20.07.2011 17:00, schrieb Roberto Fichera: ERROR: null value in column sender violates not-null constraint STATEMENT: insert into presentity (domain,username,event,etag,expires,body,received_time ) values ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'?xml version=1.0 encoding=UTF-8 standalone=no?presence xmlns=urn:ietf:params:xml:ns:pidf xmlns:dm=urn:ietf:params:xml:ns:pidf:data-model xmlns:rpid=urn:ietf:params:xml:ns:pidf:rpid entity=sip:roberto@192.168.2.92dm:person id=p3619rpid:activities//dm:persontuple id=t9285statusbasicopen/basic/statuscontactsip:roberto@192.168.2.92/contactnoteOnline/note/tuple/presence',1311173624) Seems like the statement does not insert the sender although it is mandatory. If sender is really mandatory, then it seems the statement is buggy. how does look the corresponding presentity mysql table, does it has the same constraint or not? regards Klaus ___ 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 ___ 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
[SR-Users] Kamailio presence server problem with PostgreSQL
Hi all, I've setup for testing purpose an xcap server with Kamailio v3.1.4 backed with a postgresql v8.4.8 all in 64bits versions. On that configuration, I'm getting the errors below and consequently the presence doesn't correctly reports the status. Does anyone has the same problem? Best regards, Roberto Fichera. Jul 19 10:31:52 roberto /usr/sbin/kamailio[2005]: INFO: pua_usrloc [ul_publish.c:211]: should not send ul publish Jul 19 10:31:52 roberto /usr/sbin/kamailio[2015]: ERROR: script: = xhttp: xcap-caps : null Jul 19 10:31:52 roberto /usr/sbin/kamailio[2017]: ERROR: script: = xhttp: resource-lists : sip:roberto@192.168.2.92 Jul 19 10:31:52 roberto /usr/sbin/kamailio[2017]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/resource-lists/users/sip:roberto@192.168.2.92/index Jul 19 10:31:52 roberto /usr/sbin/kamailio[2021]: ERROR: script: = xhttp: pres-rules : sip:roberto@192.168.2.92 Jul 19 10:31:52 roberto /usr/sbin/kamailio[2021]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/pres-rules/users/sip:roberto@192.168.2.92/presrules Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 19 10:31:52 roberto /usr/sbin/kamailio[2004]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 19 10:31:52 roberto /usr/sbin/kamailio[2005]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:mattia@192.168.2.92 for event presence *Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012* *Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned* ___ 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
Re: [SR-Users] Kamailio presence server problem with PostgreSQL
On 07/19/2011 11:36 AM, Daniel-Constantin Mierla wrote: Hello, On 7/19/11 10:41 AM, Roberto Fichera wrote: Hi all, I've setup for testing purpose an xcap server with Kamailio v3.1.4 backed with a postgresql v8.4.8 all in 64bits versions. On that configuration, I'm getting the errors below and consequently the presence doesn't correctly reports the status. Does anyone has the same problem? Best regards, Roberto Fichera. Jul 19 10:31:52 roberto /usr/sbin/kamailio[2005]: INFO: pua_usrloc [ul_publish.c:211]: should not send ul publish Jul 19 10:31:52 roberto /usr/sbin/kamailio[2015]: ERROR: script: = xhttp: xcap-caps : null Jul 19 10:31:52 roberto /usr/sbin/kamailio[2017]: ERROR: script: = xhttp: resource-lists : sip:roberto@192.168.2.92 Jul 19 10:31:52 roberto /usr/sbin/kamailio[2017]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/resource-lists/users/sip:roberto@192.168.2.92/index Jul 19 10:31:52 roberto /usr/sbin/kamailio[2021]: ERROR: script: = xhttp: pres-rules : sip:roberto@192.168.2.92 Jul 19 10:31:52 roberto /usr/sbin/kamailio[2021]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/pres-rules/users/sip:roberto@192.168.2.92/presrules Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 19 10:31:52 roberto /usr/sbin/kamailio[2004]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 19 10:31:52 roberto /usr/sbin/kamailio[2005]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:mattia@192.168.2.92 for event presence *Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012* *Jul 19 10:31:52 roberto /usr/sbin/kamailio[1999]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned* are there any other errors/warnings in syslog after this line related to same message? It should show where in presence modules the query was executed. No! Actually I don't see anything else. I just started Kamailio and than afterwards Jitsi, that's it! Please tell me if I've to do something in order to discover where the problem is. Cheers, Daniel -- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/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
Re: [SR-Users] Playing with dlg_bridge()
On 07/07/2011 11:05 AM, Henning Westerholt wrote: On Wednesday 06 July 2011, Roberto Fichera wrote: you're probably missing the quotes for the first two function arguments. You are totally right Now it works fine! Hi Roberto, good. Do you know what does means the warning below? [..] 68.2.50 Jul 6 11:54:17 roberto /usr/sbin/kamailio[20457]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] This means that the module can't find an existing (stored) dialog for the routed message in question, in this case a NOTIFY. Does this depends by the fact of own the dlg_bridge() works? And in case, how can I solve that problem? Best regards, Henning ___ 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
Re: [SR-Users] Playing with dlg_bridge()
On 07/07/2011 02:51 PM, Henning Westerholt wrote: On Thursday 07 July 2011, Roberto Fichera wrote: Do you know what does means the warning below? [..] 68.2.50 Jul 6 11:54:17 roberto /usr/sbin/kamailio[20457]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] This means that the module can't find an existing (stored) dialog for the routed message in question, in this case a NOTIFY. Does this depends by the fact of own the dlg_bridge() works? And in case, how can I solve that problem? Hi Roberto, Hi Henning, I'm not 100% sure, I'm not the expert for dlg_bridge.. To be more specific (after discussion with Timo..) - the warning is emmited if the module can't find the dialog with the ID added as a route parameter to the respective message. One particiular reason is (if you don't store the dialogs in a database) a simple kamailio restart, then all existing dialog information is lost. actually I've the following setup: #!define DBURL postgres://openser:openserrw@localhost/openser modparam(dialog, dlg_flag, 2) modparam(dialog, bridge_controller, sip:controller@192.168.2.92) modparam(dialog, db_url, DBURL ) Actually, my thought is that problem is more strictly related to the dlg_bridge() which might not track the bridged dialog. Anyway, I'm playing with dlg_bridge() because I want to realize the logic so that two peers, and if possible more, can talk together only if authorized. The authorization might be a unique tag or transaction id, stored in a database, and valid only for the give conversation {tag, caller, callee} once started, than the tag become invalid and can't be used again. I really like to have some suggestions about how to realize such logic, so which might be the best way to approach such problem since I'm actually a novice to Kamailio or in general with OpenSer logic. I'm actually more confident with Asterisk logic. Best regards, Henning ___ 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
Re: [SR-Users] Playing with dlg_bridge()
On 07/06/2011 11:42 AM, Henning Westerholt wrote: On Tuesday 05 July 2011, Roberto Fichera wrote: I want to implement a click and dial feature using the xhttp interface but also keeping working the XCAP functionality. Than I added some code about the dialog module (it's my first time I try it) so that the URL look like http://localhost:5060/sip-bridge/from/to [..] dlg_bridge( $var(from), $var(to), sip:192.168.2.92:5060 ); Hi Roberto, you're probably missing the quotes for the first two function arguments. You are totally right Now it works fine! Do you know what does means the warning below? Jul 6 11:54:10 roberto /usr/sbin/kamailio[20457]: NOTICE: acc [acc.c:275]: ACC: transaction answered: timestamp=1309946050;method=INVITE;from_tag=533cb9e91f4b999cf76861cbb9ed54ed-1c03;to_tag=c20ede08;call_id=200dfc5a340d6ccc-20467@127.0.0.1;code=200;reason=OK;src_user=provision;src_domain=192.168.2.92;dst_ouser=roberto;dst_user=roberto;dst_domain=192.168.2.92 Jul 6 11:54:10 roberto /usr/sbin/kamailio[20457]: NOTICE: acc [acc.c:275]: ACC: transaction answered: timestamp=1309946050;method=BYE;from_tag=533cb9e91f4b999cf76861cbb9ed54ed-1c03;to_tag=c20ede08;call_id=200dfc5a340d6ccc-20467@127.0.0.1;code=500;reason=Request out of order;src_user=provision;src_domain=192.168.2.92;dst_ouser=roberto;dst_user=roberto;dst_domain=192.168.2.92 Jul 6 11:54:13 roberto /usr/sbin/kamailio[20457]: NOTICE: acc [acc.c:275]: ACC: transaction answered: timestamp=1309946053;method=INVITE;from_tag=ceec053a;to_tag=22243f6c;call_id=208a062d8ad33987373260a6bafe06a6@0.0.0.0;code=200;reason=OK;src_user=roberto;src_domain=192.168.2.92;dst_ouser=mattia;dst_user=mattia;dst_domain=192.168.2.50 Jul 6 11:54:16 roberto /usr/sbin/kamailio[20461]: NOTICE: acc [acc.c:275]: ACC: transaction answered: timestamp=1309946056;method=BYE;from_tag=ceec053a;to_tag=22243f6c;call_id=208a062d8ad33987373260a6bafe06a6@0.0.0.0;code=200;reason=OK;src_user=roberto;src_domain=192.168.2.92;dst_ouser=mattia;dst_user=mattia;dst_domain=192.168.2.50 Jul 6 11:54:17 roberto /usr/sbin/kamailio[20457]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:17 roberto /usr/sbin/kamailio[20462]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:21 roberto /usr/sbin/kamailio[20459]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:21 roberto /usr/sbin/kamailio[20461]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:25 roberto /usr/sbin/kamailio[20459]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:25 roberto /usr/sbin/kamailio[20461]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:29 roberto /usr/sbin/kamailio[20457]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:29 roberto /usr/sbin/kamailio[20462]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:33 roberto /usr/sbin/kamailio[20459]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:33 roberto /usr/sbin/kamailio[20461]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:37 roberto /usr/sbin/kamailio[20457]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:37 roberto /usr/sbin/kamailio[20462]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Jul 6 11:54:41 roberto /usr/sbin/kamailio[20459]: WARNING: dialog [dlg_handlers.c:884]: unable to find dialog for NOTIFY with route param '7d2.14447fc4' [727:1291273281] Best regards, Henning ___ 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
Re: [SR-Users] Session authorization just before initiate it
On 07/04/2011 01:55 PM, Klaus Darilion wrote: Am 04.07.2011 12:38, schrieb Roberto Fichera: On 07/01/2011 11:32 PM, Klaus Darilion wrote: Hi Roberto! Hi Klaus, The best location of applying such a policy function depends on several things: First, you need to have all the data you are requiring. E.g. if you want to check if a certain user is allowed to call a certain phone number you usually need to do first: - authenticate the user - normalize destination (e.g. bring phone number into E164 format or apply alias lookups). Basically any user should authenticate as usual, than before two user can talk together, kamailio must authorize the conversation through a SQL lookup Then, before proceeding any further, you might check the policy using a SQL query. Be sure to SQL escape the date you provide for the SQL lookup to prevent SQL injection (see transfomations). In above case, the SQL query should be before calling lookup(). So, digging in the code you mean something like: # USER location service route[LOCATION] { SQL lookup code goes here #!ifdef WITH_ALIASDB # search in DB-based aliases alias_db_lookup(dbaliases); #!endif if (!lookup(location)) { switch ($rc) { case -1: case -3: t_newtran(); t_reply(404, Not Found); exit; case -2: sl_send_reply(405, Method Not Allowed); exit; } } # when routing via usrloc, log the missed calls also if (is_method(INVITE)) { setflag(FLT_ACCMISSED); } } No. Ok! I'll try it! # USER location service route[LOCATION] { #!ifdef WITH_ALIASDB # search in DB-based aliases alias_db_lookup(dbaliases); #!endif SQL lookup code goes here if (!lookup(location)) { switch ($rc) { case -1: case -3: t_newtran(); t_reply(404, Not Found); exit; case -2: sl_send_reply(405, Method Not Allowed); exit; } } # when routing via usrloc, log the missed calls also if (is_method(INVITE)) { setflag(FLT_ACCMISSED); } } ___ 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 ___ 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
[SR-Users] Playing with XCAP_SERVER and Postgresql
Hi all in the List, I'm playing with the xcap_server using the jitsi client. Kamailio is v3.1.4 and postgresql is v8.4.8 under Fedora 14 64bit. Basically I'm getting the error below. Jul 5 10:36:36 roberto /usr/sbin/kamailio[8529]: ERROR: script: = xhttp: xcap-caps : null Jul 5 10:36:36 roberto /usr/sbin/kamailio[8530]: ERROR: script: = xhttp: resource-lists : sip:roberto@192.168.2.92 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8530]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/resource-lists/users/sip:roberto@192.168.2.92/index Jul 5 10:36:36 roberto /usr/sbin/kamailio[8531]: ERROR: script: = xhttp: pres-rules : sip:roberto@192.168.2.92 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8531]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/pres-rules/users/sip:roberto@192.168.2.92/presrules Jul 5 10:36:36 roberto /usr/sbin/kamailio[8521]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:mattia@192.168.2.92 for event presence Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 5 10:36:36 roberto /usr/sbin/kamailio[8522]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo *Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned* Any idea? Best regards, Roberto Fichera. ___ 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
Re: [SR-Users] Playing with XCAP_SERVER and Postgresql
On 07/05/2011 11:23 AM, Daniel-Constantin Mierla wrote: Hello, On 7/5/11 10:45 AM, Roberto Fichera wrote: Hi all in the List, I'm playing with the xcap_server using the jitsi client. Kamailio is v3.1.4 and postgresql is v8.4.8 under Fedora 14 64bit. Basically I'm getting the error below. Jul 5 10:36:36 roberto /usr/sbin/kamailio[8529]: ERROR: script: = xhttp: xcap-caps : null Jul 5 10:36:36 roberto /usr/sbin/kamailio[8530]: ERROR: script: = xhttp: resource-lists : sip:roberto@192.168.2.92 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8530]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/resource-lists/users/sip:roberto@192.168.2.92/index Jul 5 10:36:36 roberto /usr/sbin/kamailio[8531]: ERROR: script: = xhttp: pres-rules : sip:roberto@192.168.2.92 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8531]: ERROR: script: = xhttp: get sip:roberto@192.168.2.92 = /xcap-root/pres-rules/users/sip:roberto@192.168.2.92/presrules Jul 5 10:36:36 roberto /usr/sbin/kamailio[8521]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:mattia@192.168.2.92 for event presence Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 5 10:36:36 roberto /usr/sbin/kamailio[8522]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo *Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned* Any idea? are there any other log messages printed by pid 8520? Are these errors printed when doing some xcap operations or is related to sip presence requests? Yes! I think they are related to sip presence. See below: Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: presence [subscribe.c:711]: Missing or unsupported event header field value Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: presence [subscribe.c:714]: #011event= message-summary Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012 Jul 5 10:36:36 roberto /usr/sbin/kamailio[8520]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned Jul 5 10:48:25 roberto /usr/sbin/kamailio[8520]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 5 10:48:25 roberto /usr/sbin/kamailio[8520]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 5 10:48:25 roberto /usr/sbin/kamailio[8520]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 5 10:48:25 roberto /usr/sbin/kamailio[8520]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence.winfo Jul 5 10:48:25 roberto /usr/sbin/kamailio[8520]: INFO: presence [notify.c:1588]: NOTIFY sip:mattia@192.168.2.92 via sip:mattia@192.168.2.50:5060;transport=udp;registering_acc=192_168_2_92 on behalf of sip:roberto@192.168.2.92 for event presence Jul 5 10:59:13 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:427]: invalid query, execution aborted Jul 5 10:59:13 roberto /usr/sbin/kamailio[8520]: ERROR: db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR, ERROR: null value in column sender violates not-null constraint#012 Jul 5 10:59:13 roberto /usr/sbin/kamailio[8520]: WARNING: db_postgres [km_dbase.c:473]: unexpected result returned Jul 5 10:59:13 roberto /usr/sbin/kamailio[8520]: INFO: presence [notify.c:1588]: NOTIFY sip:roberto@192.168.2.92 via sip:roberto@192.168.2.92:5090;transport=udp;registering_acc=192_168_2_92
[SR-Users] Playing with dlg_bridge()
Hi All in the list, I want to implement a click and dial feature using the xhttp interface but also keeping working the XCAP functionality. Than I added some code about the dialog module (it's my first time I try it) so that the URL look like http://localhost:5060/sip-bridge/from/to #!ifdef WITH_XCAPSRV #!define WITH_XHTTPAUTH event_route[xhttp:request] { xdbg(= xhttp: request [$rv] $rm = $hu\n); if($hu=~^/xcap-root/) { #!ifdef WITH_XHTTPAUTH if (!www_authorize(xcap, subscriber)) { www_challenge(xcap, 0); exit; } #!endif set_reply_close(); set_reply_no_connect(); # xcap ops $xcapuri(u=data) = $hu; if($xcapuri(u=xuid)=~^sip:.+@.+) $var(uri) = $xcapuri(u=xuid); else if($xcapuri(u=xuid)=~.+@.+) $var(uri) = sip: + $xcapuri(u=xuid); else $var(uri) = sip:+ $xcapuri(u=xuid) + @ + $Ri; xlog(= xhttp: $xcapuri(u=auid) : $xcapuri(u=xuid)\n); if($xcapuri(u=auid)==xcap-caps) { $var(xbody) = ?xml version='1.0' encoding='UTF-8'? xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps' auids auidrls-services/auid auidpidf-manipulation/auid auidxcap-caps/auid auidresource-lists/auid auidpres-rules/auid auidorg.openmobilealliance.pres-rules/auid /auids extensions /extensions namespaces namespaceurn:ietf:params:xml:ns:rls-services/namespace namespaceurn:ietf:params:xml:ns:pidf/namespace namespaceurn:ietf:params:xml:ns:xcap-caps/namespace namespaceurn:ietf:params:xml:ns:resource-lists/namespace namespaceurn:ietf:params:xml:ns:pres-rules/namespace /namespaces /xcap-caps; xhttp_reply(200, ok, application/xcap-caps+xml, $var(xbody)); exit; } #!ifdef WITH_XHTTPAUTH # be sure auth user access only its documents if ($au!=$(var(uri){uri.user})) { xhttp_reply(403, Forbidden, text/html, htmlbody$si:$sp/body/html); exit; } #!endif switch($rm) { case PUT: xcaps_put($var(uri), $hu, $rb); if($xcapuri(u=auid)=~pres-rules) { xlog(= xhttp put: refreshing watchers for $var(uri)\n); pres_update_watchers($var(uri), presence); pres_refresh_watchers($var(uri), presence, 1); } exit; break; case GET: xlog(= xhttp: get $var(uri) = $hu\n); xcaps_get($var(uri), $hu); exit; break; case DELETE: xcaps_del($var(uri), $hu); if($xcapuri(u=auid)=~pres-rules) { xlog(= xhttp del: refreshing watchers for $var(uri)\n); pres_update_watchers($var(uri), presence); pres_refresh_watchers($var(uri), presence, 1); } exit; break; } } else if($hu=~^/sip-bridge/) { if ( ! ( src_ip == 127.0.0.1 ) ) { xhttp_reply( 403, Forbidden, text/html, htmlbodyInvalid Access/body/html ); exit; } $var(uri) = $hu; $var(from) = $(var(uri){s.select,2,/}); $var(to) = $(var(uri){s.select,3,/}); xdbg( === GOT sip-bridge between $var(caller) = $var(callee) === ); *dlg_bridge( $var(from), $var(to), sip:192.168.2.92:5060 );* } # http ops xhttp_reply(200, ok, text/html, htmlbodyOK: $si:$sp/body/html); exit; } #!endif but I got the error below: Not starting : invalid configuration file! 0(22256) : core [cfg.y:3409]: parse error in config file //etc/kamailio/kamailio.cfg, line 986, column 17-26: function dlg_bridge: parameter 1 is not constant 0(22256) : core [cfg.y:3412]: parse error in config file //etc/kamailio/kamailio.cfg, line 986, column 63: bad command ERROR: bad config file (2 errors) so my question is how can I call the dlg_bridge() passing some parameters coming from the http request? Thanks in advance. Roberto Fichera. ___ 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
Re: [SR-Users] Session authorization just before initiate it
On 07/01/2011 11:32 PM, Klaus Darilion wrote: Hi Roberto! Hi Klaus, The best location of applying such a policy function depends on several things: First, you need to have all the data you are requiring. E.g. if you want to check if a certain user is allowed to call a certain phone number you usually need to do first: - authenticate the user - normalize destination (e.g. bring phone number into E164 format or apply alias lookups). Basically any user should authenticate as usual, than before two user can talk together, kamailio must authorize the conversation through a SQL lookup Then, before proceeding any further, you might check the policy using a SQL query. Be sure to SQL escape the date you provide for the SQL lookup to prevent SQL injection (see transfomations). In above case, the SQL query should be before calling lookup(). So, digging in the code you mean something like: # USER location service route[LOCATION] { SQL lookup code goes here #!ifdef WITH_ALIASDB # search in DB-based aliases alias_db_lookup(dbaliases); #!endif if (!lookup(location)) { switch ($rc) { case -1: case -3: t_newtran(); t_reply(404, Not Found); exit; case -2: sl_send_reply(405, Method Not Allowed); exit; } } # when routing via usrloc, log the missed calls also if (is_method(INVITE)) { setflag(FLT_ACCMISSED); } } Furthermore, I'm also evaluating the possibility to have a ClickDial web page so that both parties might be bridged together. In case of presence functions you should apply policies before handling the presence requests. I wouldn't apply any policy rule for the presence requests, I need policy rules only for establishing any conversation. P.S. Do you have any suggestion about a good voip client supporting also video chat and presence for android devices? regards klaus Am 01.07.2011 19:23, schrieb Roberto Fichera: Hi All in the list, I'm new to Kamailio but I'm actually able to quickly setup a server, including also the SIP presence, looking at the example I found at http://kb.asipto.com/kamailio:presence:k31-made-simple which explain very well how to do it. I also made some changes in the final setup and everything seems working well, I can have audio/video/chat session including the presence status of any user. Now I would like to improve my testing setup so that for each call request Kamailio receive, I would like to perform some SQL lookup for deciding if the conversation might be established or not. About the SQL lookup I read about the SQLOPS module, it seems really easy to use, but I don't know where to put such check before the INVITE. Could someone give me some hints? P.S: Indeed, I need to read some good documentation about how to code a Kamailio config file. Any URL to suggest? Thanks in advance, Roberto Fichera. ___ 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 ___ 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 ___ 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
[SR-Users] Session authorization just before initiate it
Hi All in the list, I'm new to Kamailio but I'm actually able to quickly setup a server, including also the SIP presence, looking at the example I found at http://kb.asipto.com/kamailio:presence:k31-made-simple which explain very well how to do it. I also made some changes in the final setup and everything seems working well, I can have audio/video/chat session including the presence status of any user. Now I would like to improve my testing setup so that for each call request Kamailio receive, I would like to perform some SQL lookup for deciding if the conversation might be established or not. About the SQL lookup I read about the SQLOPS module, it seems really easy to use, but I don't know where to put such check before the INVITE. Could someone give me some hints? P.S: Indeed, I need to read some good documentation about how to code a Kamailio config file. Any URL to suggest? Thanks in advance, Roberto Fichera. ___ 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