Re: [SR-Users] tcp_max_connection to 4096

2015-01-27 Thread Vitaliy Aleksandrov
You shouldn't feel any performance issues after increasing tcp_max_conn 
to 4096. Connections hash table size is pretty high (1024) so it's not a 
problem at all. Of course if you want to handle twice bigger number of 
simultaneous clients you need to check if you current hardware can 
handle it (RAM, CPU).



Hi Team,

We are seeing some errors in our kamilio for TCP max conn (ERROR) : 
2048 (the default).


We are thinking to double the TCP connection for our kamailio 
registrar server.


tcp_max_connections=4096
Is there any performance issue if we double the tcp_max_connections ?.


Currently we are setting these parameters for TCP.

tcp_connection_lifetime=3605
tcp_accept_no_cl=yes
tcp_rd_buf_size=16384

Do we need to tune any other variable if we are setting max tcp 
connections to 4096 for better performance  ?


Thanks for looking into this.

Regards

Varghese Paul


___
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] Wrong dialog selected in on_reply/failure route in case of spirals.

2015-01-27 Thread Julia Boudniatsky
Hello Daniel,

Today I installed kamailio from GIT last devel 4.3.0-dev3.
*The problem is solved!*

Thank you so much for your help !
Julia


On Mon, Jan 26, 2015 at 8:38 PM, Julia Boudniatsky juli...@gmail.com
wrote:

 Yes it /usr/local/sbin/kamailio,
 I haven't internet in the test server.
 I get git from another server and copy received directory kamailio to test
 server, then make cfg/all/install.

 BR,
 Julia

 On Mon, Jan 26, 2015 at 8:10 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

  I did the same right now and I get:

 version: kamailio 4.3.0-dev3 (x86_64/darwin) 1b334f

 Can you check if you have another instance installed on a different path
 that takes precendence?

 Do:

 which kamailio

 When installed from sources, it should be:

 /usr/local/sbin/kamailio

 Cheers,
 Daniel



 On 26/01/15 18:55, Julia Boudniatsky wrote:

 I used from your link   * http://www.kamailio.org/wiki/#installation


- Install Kamailio Devel Version From GIT
http://www.kamailio.org/wiki/install/devel/git

  #mkdir -p /usr/local/src/kamailio-devel
 #cd /usr/local/src/kamailio-devel
 #git clone --depth 1 --no-single-branch git://git.kamailio.org/kamailio
 kamailio
 #cd kamailio

  BR,

  Julia

 On Mon, Jan 26, 2015 at 7:04 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

  Hello,

 that is not the last devel version, it should be with -dev3. How did you
 get the sources?

 I get:

 version: kamailio 4.3.0-dev3 (x86_64/darwin) 1b334f

 And yes, if you still get the error, send the logs with the description.

 Cheers,
 Daniel


 On 26/01/15 17:16, Julia Boudniatsky wrote:

 Hello Daniel,
 In devel installed, I received the same problem.

  kamailio -V
 version: kamailio 4.3.0-dev2 (x86_64/linux) ecd5c5
 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: ecd5c5
 compiled on 18:02:05 Jan 26 2015 with gcc 4.4.6

  Do you want a log files?

  Thank you,

  Julia

 On Mon, Jan 26, 2015 at 12:47 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

  Hello,

 none of existing releases are good because the patches are only in git
 branches, added after the last relesea (I added it iver this weekend). You
 must install from git, as pointed by one of the tutorials at:

   * http://www.kamailio.org/wiki/#installation

 You must use devel (master), 4.2 (v4.2.x) or 4.1 (v4.1.x) branches.

 We will have new releases in the near future, like 1-2 weeks from now,
 but by then I hope to get this bug sorted out.

 Cheers,
 Daniel


 On 26/01/15 11:42, Julia Boudniatsky wrote:

 Hello Daniel,
 I installed last 4.2

  version: kamailio 4.2.1 (x86_64/linux) d80dfc
 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: d80dfc
 compiled on 10:06:01 Jan 26 2015 with gcc 4.4.6


  *Problem in call with Call-ID : 5-5028@10.25.153.150
 5-5028@10.25.153.150 *

  *Short log*

  *dialog [3748:5628]*

  *100 trying*

  Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]:
 DEBUG: core [parser/msg_parser.c:633]: parse_msg(): SIP Reply  (status):
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/msg_parser.c:635]: parse_msg():  version: SIP/2.0
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/msg_parser.c:637]: parse_msg():  status:  100
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/msg_parser.c:639]: parse_msg():  reason:  Trying
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param:
 tag=9313591363960470767
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/parse_addr_spec.c:898]: parse_addr_spec(): end of header
 reached, state=29
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field:
 To [71]; uri=[sip:039951004@10.25.153.149:5060;user=phone]
 Jan 26 10:20:49 vm-KAMnet-dev01 /usr/local/sbin/kamailio[20649]: DEBUG:
 core [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [
 sip:039951004@10.25.153.149:5060;user=phone]
 Jan 26 10:20:49 

[SR-Users] Dispatcher weight dont work

2015-01-27 Thread Yuriy Gorlichenko
Hello I use dipatcher  algorithm 8 that works with weight. I added  2
Asterisks and try to call its with my kam.We use 4.3 version.

Tthis config select needed dst from database with my scenario.

if(!ds_select_dst($var(setid), 8))

$var(setid)- is variable for setting setid that i get from database with my
own scenario. IT does not matter.

When running asterisk with weight 90 - all calls goes through it. When I
starting asterisk with weight 10 -calls going through asterisk 90. When I
shut down asterisk with weight 90 -calls goes through asterisk 10? but when
i start asterisk weight 90 all calls goes through sterisk 10 until I shut
down it.

root@Kamailio:~# kamailio -v
version: kamailio 4.3.0-dev3 (x86_64/linux) 8cdbe7
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: 8cdbe7
compiled on 01:17:56 Jan 21 2015 with gcc 4.8.2


id setid   destination  flags priority attrs
1   2   sip:34.25.123.45:506000  0 weight=10



2   2   sip:10.0.1.6:506000  0weight=90

modparam(dispatcher, db_url,DBURL)
modparam(dispatcher, table_name, dispatcher)
modparam(dispatcher, setid_col, setid)
modparam(dispatcher, destination_col, destination)
modparam(dispatcher, force_dst, 1)
modparam(dispatcher, flags, 3)
modparam(dispatcher, dst_avp, $avp(i:271))
modparam(dispatcher, grp_avp, $avp(i:272))
modparam(dispatcher, cnt_avp, $avp(i:273))
modparam(dispatcher, ds_ping_from, sip:proxy@10.0.1.1)
modparam(dispatcher, ds_ping_interval,15)
modparam(dispatcher, ds_probing_mode, 1)
modparam(dispatcher, ds_ping_reply_codes,
class=2;code=403;code=404;code=484;class=3)
modparam(tm, reparse_on_dns_failover, 0)


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] GeoIP Module and IPv6 seems not to match

2015-01-27 Thread Daniel-Constantin Mierla
Hello,

the geoip module is using the old database format (API) that is not
supporting ipv6, there is a new module in the work that uses the new
geoip database format/API.

I already got some code and I asked the developer to make a github pull
request. It should show up soon.

Cheers,
Daniel

On 27/01/15 10:18, Jöran Vinzens wrote:
 Hi All,

 i'm trying to get GEO IP Location for an IPv6 Setup.
 We downloaded the GeoLiteCityv6.dat from maxmind and referred to it in
 modparams of geoip.

 If i now place a call from an V6 User and do something like:

 if(geoip_match($si, src)) {
 xlog(L_NOTICE, Call comes from IP '$si'
 ($gip(src=cc)) CID=$ci F=$fU URI=$ru\n);
 append_hf(X-GeoIP: $gip(src=cc)\r\n);
 }

 it will not match for any reason

 if i xlog the src IP it look like: Src IP = 2A01:abc:321:123:0:0:0:2
 so it should match to the GEO IP Database.

 In CSV version of geo IP database there is an entry for my IP Address.

 Since the Module is not that verbose, i cannot tell whether the entry
 exists or not. Just the result in my if is False.

 Has anybody experience with GEOIP and IPv6?

 thanks

 Best regards,
 Jöran


 ___
 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://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] Multiple OR into a if

2015-01-27 Thread Daniel-Constantin Mierla
Hello,

can you paste here the SIP message (or at least the To header and
request URI) for such case? I would like to reproduce.

Also, you can try removing components of the expression in the second IF
one by one to see where it breaks.

Cheers,
Daniel

On 27/01/15 09:45, Igor Potjevlesch wrote:

 Hello,

  

 I'm very disappointed because of the following behaviour:

  

  if ($tu=~^sip:0[1-9]{9}) {

 […]

 In that case, Kamailio returns TRUE because the
 instructions in the block are executed.

 }

  

  if ($rU=~^33 || $rU=~^0033 || $rU=~^0[1-9]{9} ||
 $rU=~^\+33 || $tu=~^sip:33 || $tu=~^sip:0033 ||
 $tu=~^sip:0[1-9]{9} || $tu=~^sip:\+33 ) {

 […]

 In that case, Kamailio should return FALSE because the instructions in
 the block are not executed.

 }

  

 Am I missed something regarding 'OR' ?

  

 Regards,

  

 Igor.



 ___
 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://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


[SR-Users] Multiple OR into a if

2015-01-27 Thread Igor Potjevlesch
Hello,

 

I'm very disappointed because of the following behaviour:

 

 if ($tu=~^sip:0[1-9]{9}) {

[.]

In that case, Kamailio returns TRUE because the instructions in
the block are executed.

}

 

 if ($rU=~^33 || $rU=~^0033 || $rU=~^0[1-9]{9} || $rU=~^\+33 ||
$tu=~^sip:33 || $tu=~^sip:0033 || $tu=~^sip:0[1-9]{9} ||
$tu=~^sip:\+33 ) {

[.]

In that case, Kamailio should return FALSE because the instructions in the
block are not executed.

}

 

Am I missed something regarding 'OR' ?

 

Regards,

 

Igor.

___
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] GeoIP Module and IPv6 seems not to match

2015-01-27 Thread Jöran Vinzens
Hi All,

i'm trying to get GEO IP Location for an IPv6 Setup.
We downloaded the GeoLiteCityv6.dat from maxmind and referred to it in
modparams of geoip.

If i now place a call from an V6 User and do something like:

if(geoip_match($si, src)) {
xlog(L_NOTICE, Call comes from IP '$si' ($gip(src=cc))
CID=$ci F=$fU URI=$ru\n);
append_hf(X-GeoIP: $gip(src=cc)\r\n);
}

it will not match for any reason

if i xlog the src IP it look like: Src IP = 2A01:abc:321:123:0:0:0:2 so
it should match to the GEO IP Database.

In CSV version of geo IP database there is an entry for my IP Address.

Since the Module is not that verbose, i cannot tell whether the entry
exists or not. Just the result in my if is False.

Has anybody experience with GEOIP and IPv6?

thanks

Best regards,
Jöran
___
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] Fosdem 2015

2015-01-27 Thread Alexandr Dubovikov
yep, Emil is waiting for us :-)

Regards,
Alexandr

2015-01-26 14:53 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com:

  Very likely I will be around at Fosdem as well this year and going for
 the event in the evening, if it takes place. Have you discussed with Jitsi
 guys?

 Cheers,
 Daniel


 On 17/01/15 16:47, Alexandr Dubovikov wrote:

 so, same event like last year at Beer Mania. Enjoy!

 2015-01-16 21:12 GMT+01:00 Alexandr Dubovikov aduv...@googlemail.com:

  ok, Torsten Schweizer, Heino Klier and I will be at Fosdem. We can make
 same beer event like last year, together with Emil and Jitsi Co.




 2015-01-15 12:47 GMT+01:00 DanB danb.li...@gmail.com:

 I will be there this year also, if someone prepares an event.

 DanB.


 ___
 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 
 listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 --
 Daniel-Constantin Mierlahttp://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] Need help on WebRTC with Kamailio as proxy

2015-01-27 Thread Rahul MathuR
Hello Richard,

Now, after upgrading to - OpenSSL 1.0.1j 15 Oct 2014
Errors like -
Failed to set up SRTP after DTLS negotiation: no SRTP protection profile
negotiated are not seen but still the call is not getting through.

Please let me know how to proceed..

Thanks in advance


On Tue, Jan 27, 2015 at 2:14 AM, Rahul MathuR rahul.ultim...@gmail.com
wrote:

 Hi Richard,

 Thanks for spending some cycles on it.

 It is OpenSSL 1.0.1e-fips 11 Feb 2013

 On Tue, Jan 27, 2015 at 2:04 AM, Richard Fuchs rfu...@sipwise.com wrote:

 On 26/01/15 02:21 PM, Rahul MathuR wrote:

 Hello,

 I am totally struck at a point while implementing Kamailio as proxy for
 WebRTC enabled UAC (Jssip). I am using Google's TURN server
 (rfc5766-turn-server for ICE/STUN). I am able to get to the point where
 the SIP server sends 183 session in progress to kamailio but after that
 I can only see -
 STUN: using this candidate
 Successful STUN binding request from ..
 SRTP output wanted, but no crypto suite was negotiated


 This is fairly strange:

  Jan 27 00:35:46 localhost rtpengine[5262]: [tsb1jrsqsadn33jjsi4f port
 30794] Failed to set up SRTP after DTLS negotiation: no SRTP protection
 profile negotiated
 Jan 27 00:35:46 localhost rtpengine[5262]: [tsb1jrsqsadn33jjsi4f port
 30794] Failed to set up SRTP after DTLS negotiation: no SRTP protection
 profile negotiated


 Are you running a very old OpenSSL version  by any chance?

 cheers


 ___
 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




 --
 Warm Regds.
 MathuRahul




-- 
Warm Regds.
MathuRahul
Jan 27 02:14:17 localhost kamailio[2246]: INFO: script: Starting of 
request_route - #012 port is [10080],#011 proto is [ws],#011 user is 
[919650926333]#012 Message [INVITE sip:919650926333@125.99.186.124 
SIP/2.0#015#012Route: sip:125.99.186.126:10080;transport=ws;lr#015#012Via: 
SIP/2.0/WS vf6huklcsg7i.invalid;branch=z9hG4bK8132976#015#012Max-Forwards: 
69#015#012To: sip:919650926333@125.99.186.124#015#012From: 114488 
sip:114488@125.99.186.124;tag=iiq2flnorq#015#012Call-ID: 
2mi1qf5cb3mg9vf0bp22#015#012CSeq: 2623 INVITE#015#012Contact: 
sip:emf13f83@vf6huklcsg7i.invalid;transport=ws;ob#015#012Content-Type: 
application/sdp#015#012Allow: 
INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS#015#012Supported: 
ice,outbound#015#012User-Agent: JsSIP 0.6.4#015#012Content-Length: 
3042#015#012#015#012v=0#015#012o=- 3479457386797450545 2 IN IP4 
127.0.0.1#015#012s=-#015#012t=0 0#015#012a=group:BUNDLE audio 
video#015#012a=msid-semantic: WMS 
5DKLhoDH63ksNQLPuJfODFZ0We62dvZHeypu#015#012m=audio 21455 RTP/SAVPF 111 103 104 
9 0 8 106 105 13 126#015#012c=IN IP4 59.178.53.133#015#012a=rtcp:21455 IN IP4 
59.178.53.133#015#012a=candidate:704553097 1 udp 2122260223 192.168.1.3 61780 
typ host generation 0#015#012a=candidate:704553097 2 udp 2122260223 192.168.1.3 
61780 typ host generation 0#015#012a=candidate:1736268921 1 tcp 1518280447 
192.168.1.3 0 typ host tcptype active generation 
0#015#012a=candidate:1736268921 2 tcp 1518280447 192.168.1.3 0 typ host tcptype 
active generation 0#015#012a=candidate:2158047068 1 udp 1686052607 
59.178.53.133 21455 typ srflx raddr 192.168.1.3 rport 61780 generation 
0#015#012a=candidate:2158047068 2 udp 1686052607 59.178.53.133 21455 typ srflx 
raddr 192.168.1.3 rport 61780 generation 
0#015#012a=ice-ufrag:u4MhDJ9rtq6tLJi+#015#012a=ice-pwd:hbArhf2sDAU/BfClFII2LHm8#015#012a=ice-options:google-ice#015#012a=fingerprint:sha-256
 
AA:79:7A:FA:6E:B8:38:A4:1B:5E:60:4A:27:67:96:76:2F:09:C8:E7:2F:5B:D6:0B:0B:DF:10:31:4A:B8:27:AA#015#012a=setup:actpass#015#012a=mid:audio#015#012a=extmap:1
 urn:ietf:params:rtp-hdrext:ssrc-a
Jan 27 02:14:17 localhost kamailio[2246]: INFO: script: Calling REQINIT, per 
request initial checks#012
Jan 27 02:14:17 localhost kamailio[2246]: WARNING: script: Inside REQINIT - 
checking the hops
Jan 27 02:14:17 localhost kamailio[2246]: WARNING: script: Inside REQINIT - 
Sanity check 
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Calling NATDETECT#012
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Inside NATDETECT
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Inside NATDETECT - 
Non-REGISTER Method hence - callling add_contact_alias
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Exiting from 
NATDETECT
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: CAlling WITHINDLG - 
handle requests within SIP dialogs
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Inside WITHINDLG 
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Removing Route header
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: Removed Route header 
and adding new one..
Jan 27 02:14:17 localhost kamailio[2246]: ERROR: script: New message becomes 
- [INVITE sip:919650926333@125.99.186.124 SIP/2.0#015#012Route: 

[SR-Users] Rpc question

2015-01-27 Thread Pars3c
Hi,
I need to request to kamailio the list of all the active dialog (with some
dialog variable).
Now , i'm doing it with a program that call the proxy with the xmlrpc
module. The problem is that when it arrive to 350-400 calls, the reply fail
because it has no memory free. Now ,i have setted the pkg memory to 12MB
but at peak it reply with error. Now i shoul increase it.

Is there another method to optimize the request of these data, to avoid
every time to increase the memory parameter?

Thanks to all
___
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] GeoIP Module and IPv6 seems not to match

2015-01-27 Thread Sergey Okhapkin
The pull request with the patch submitted.

On Tuesday 27 January 2015 07:59:04 Sergey Okhapkin wrote:
 Yes, geoip2 module will handle v4 and v6 addresses at the same time.
 
 I'm learning now how to use github and will issue pull request today.
 
 On Tuesday 27 January 2015 12:54:59 Jöran Vinzens wrote:
  Hi, thanks for that info.
  
  Will there be support to handle V4 and V6 at the same time? So far there
  is
  the possibility just for one database in the module to configure.
  
  BR
  Jöran
  
  On Tue, Jan 27, 2015 at 10:26 AM, Daniel-Constantin Mierla 
  
  mico...@gmail.com wrote:
Hello,
   
   the geoip module is using the old database format (API) that is not
   supporting ipv6, there is a new module in the work that uses the new
   geoip
   database format/API.
   
   I already got some code and I asked the developer to make a github pull
   request. It should show up soon.
   
   Cheers,
   Daniel
   
   
   On 27/01/15 10:18, Jöran Vinzens wrote:
   
   Hi All,
   
i'm trying to get GEO IP Location for an IPv6 Setup.
   
   We downloaded the GeoLiteCityv6.dat from maxmind and referred to it in
   modparams of geoip.
   
If i now place a call from an V6 User and do something like:

if(geoip_match($si, src)) {

   xlog(L_NOTICE, Call comes from IP '$si'
   ($gip(src=cc))
   
   CID=$ci F=$fU URI=$ru\n);
   
   append_hf(X-GeoIP: $gip(src=cc)\r\n);
   
   }
   
it will not match for any reason

if i xlog the src IP it look like: Src IP = 2A01:abc:321:123:0:0:0:2
   
   so it should match to the GEO IP Database.
   
In CSV version of geo IP database there is an entry for my IP Address.

Since the Module is not that verbose, i cannot tell whether the entry
   
   exists or not. Just the result in my if is False.
   
Has anybody experience with GEOIP and IPv6?

thanks

Best regards,
   
   Jöran
   
   
   ___
   SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
   listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mai
   l
   man/listinfo/sr-users
   
   
   --
   Daniel-Constantin Mierlahttp://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] Multiple OR into a if

2015-01-27 Thread Igor Potjevlesch
The To header looks like this (in compact form):

 

t: sip:0123456...@sip.domain.tld;tag=f15e211394273201512715012\r\n

 

Regards,

 

Igor.

 

De : Igor Potjevlesch [mailto:igor.potjevle...@gmail.com] 
Envoyé : mardi 27 janvier 2015 15:55
À : mico...@gmail.com; 'Kamailio (SER) - Users Mailing List'
Objet : RE: [SR-Users] Multiple OR into a if

 

Hello Daniel,

 

Just to let you, it's in MANAGE_REPLY. Is that make any difference?

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de
Daniel-Constantin Mierla
Envoyé : mardi 27 janvier 2015 10:32
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] Multiple OR into a if

 

Hello,

can you paste here the SIP message (or at least the To header and request
URI) for such case? I would like to reproduce.

Also, you can try removing components of the expression in the second IF one
by one to see where it breaks.

Cheers,
Daniel

On 27/01/15 09:45, Igor Potjevlesch wrote:

Hello,

 

I'm very disappointed because of the following behaviour:

 

 if ($tu=~^sip:0[1-9]{9}) {

[…]

In that case, Kamailio returns TRUE because the instructions in
the block are executed.

}

 

 if ($rU=~^33 || $rU=~^0033 || $rU=~^0[1-9]{9} || $rU=~^\+33 ||
$tu=~^sip:33 || $tu=~^sip:0033 || $tu=~^sip:0[1-9]{9} ||
$tu=~^sip:\+33 ) {

[…]

In that case, Kamailio should return FALSE because the instructions in the
block are not executed.

}

 

Am I missed something regarding 'OR' ?

 

Regards,

 

Igor.





___
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

 

-- 
Daniel-Constantin Mierla
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] Multiple OR into a if

2015-01-27 Thread Igor Potjevlesch
Hello Daniel,

 

Just to let you, it's in MANAGE_REPLY. Is that make any difference?

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de
Daniel-Constantin Mierla
Envoyé : mardi 27 janvier 2015 10:32
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] Multiple OR into a if

 

Hello,

can you paste here the SIP message (or at least the To header and request
URI) for such case? I would like to reproduce.

Also, you can try removing components of the expression in the second IF one
by one to see where it breaks.

Cheers,
Daniel

On 27/01/15 09:45, Igor Potjevlesch wrote:

Hello,

 

I'm very disappointed because of the following behaviour:

 

 if ($tu=~^sip:0[1-9]{9}) {

[…]

In that case, Kamailio returns TRUE because the instructions in
the block are executed.

}

 

 if ($rU=~^33 || $rU=~^0033 || $rU=~^0[1-9]{9} || $rU=~^\+33 ||
$tu=~^sip:33 || $tu=~^sip:0033 || $tu=~^sip:0[1-9]{9} ||
$tu=~^sip:\+33 ) {

[…]

In that case, Kamailio should return FALSE because the instructions in the
block are not executed.

}

 

Am I missed something regarding 'OR' ?

 

Regards,

 

Igor.






___
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





-- 
Daniel-Constantin Mierla
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] Need help on WebRTC with Kamailio as proxy

2015-01-27 Thread Tristan Mahé
Hi Rahul,

Don't take me wrong, but you still have some homework to do. Apache is
not a requirement for webrtc ( apart hosting the website ). The only
difference between using http and https is that by default on http, most
browsers will always ask for the user to confirm usage of the mic/cam.

WS and WSS works with Kamailio, it's only a question of configuration (
for which there are many examples, most are broken but easily fixed, for
example for https://github.com/caruizdiaz/kamailio-ws , it's only fixing
the record routes to get sip2ws signaling working ).

Regarding rtp, you have to use rtpengine ( master from repo, not a
release, dtls broken in latest 3.7.1, fixed in 3.8 ) or something else
to be able to terminate ICE/DTLS when remote endpoints don't support
them ( most of SIP ua's today unfortunately ), again, read, experiment,
you'll eventually get it and the most important, know how your platform
works !

Start with basic browser to browser calls, without a rtp proxy, it
should work almost out of the box, then you can add some functionnality
to the basic scenario, and I'll be glad to point you to the right
direction !

Good luck !

Le 27/01/2015 03:21, Rahul MathuR a écrit :
 Any thoughts on this gents ?



 On Tue, Jan 27, 2015 at 8:09 AM, rahul.ultimate
 rahul.ultim...@gmail.com mailto:rahul.ultim...@gmail.com wrote:

 Kamailio is just acting as a proxy and protocol modifier so to
 say. It is workin with rtpengine from sipwise to handle media as
 evident from he logs.
 This architectue uses a TURN server  and the browser  is chrome
 with latest updates.

 The only thing whih I haven't done is enable TLS in kamailio and
 create certs. (which I'm not completely sure how to do)..
 Also, does it necessitates to have Apache ruuning https on 443 ?

 Thanks in advance 


 Sent from Samsung Mobile


  Original message 
 From: Gonzalo Gasca Meza
 Date:27/01/2015 4:07 AM (GMT+05:30)
 To: Kamailio (SER) - Users Mailing List
 Subject: Re: [SR-Users] Need help on WebRTC with Kamailio as proxy

 Are you terminating media in Kamailio or just handling WS
 communication? If yes which version of Kamailio and rtp-proxy ?
 Have you tried passing media directly between Browser and Kamailio
 with any TURN server?

 Are you using latest Chrome version or FF ?

 A working sample config using the following architecture:

 https://github.com/spicyramen/llamato/tree/LlamatoReg

 signalling: sipml5 -- ws/wss --  Ec2 Kamailio --sip udp-- FS
 --sip udp-- *
 media:  sipml5
 
 *




 On Mon, Jan 26, 2015 at 12:44 PM, Rahul MathuR
 rahul.ultim...@gmail.com mailto:rahul.ultim...@gmail.com wrote:

 Hi Richard,

 Thanks for spending some cycles on it.

 It is OpenSSL 1.0.1e-fips 11 Feb 2013

 On Tue, Jan 27, 2015 at 2:04 AM, Richard Fuchs
 rfu...@sipwise.com mailto:rfu...@sipwise.com wrote:

 On 26/01/15 02:21 PM, Rahul MathuR wrote:

 Hello,

 I am totally struck at a point while implementing
 Kamailio as proxy for
 WebRTC enabled UAC (Jssip). I am using Google's TURN
 server
 (rfc5766-turn-server for ICE/STUN). I am able to get
 to the point where
 the SIP server sends 183 session in progress to
 kamailio but after that
 I can only see -
 STUN: using this candidate
 Successful STUN binding request from ..
 SRTP output wanted, but no crypto suite was negotiated


 This is fairly strange:

 Jan 27 00:35:46 localhost rtpengine[5262]:
 [tsb1jrsqsadn33jjsi4f port 30794] Failed to set up
 SRTP after DTLS negotiation: no SRTP protection
 profile negotiated
 Jan 27 00:35:46 localhost rtpengine[5262]:
 [tsb1jrsqsadn33jjsi4f port 30794] Failed to set up
 SRTP after DTLS negotiation: no SRTP protection
 profile negotiated


 Are you running a very old OpenSSL version  by any chance?

 cheers


 ___
 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




 -- 
 Warm Regds.
 MathuRahul

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
 mailing list
 sr-users@lists.sip-router.org
 mailto:sr-users@lists.sip-router.org
 

Re: [SR-Users] Need help on WebRTC with Kamailio as proxy

2015-01-27 Thread Rahul MathuR
Any thoughts on this gents ?



On Tue, Jan 27, 2015 at 8:09 AM, rahul.ultimate rahul.ultim...@gmail.com
wrote:

 Kamailio is just acting as a proxy and protocol modifier so to say. It is
 workin with rtpengine from sipwise to handle media as evident from he logs.
 This architectue uses a TURN server  and the browser  is chrome with
 latest updates.

 The only thing whih I haven't done is enable TLS in kamailio and create
 certs. (which I'm not completely sure how to do)..
 Also, does it necessitates to have Apache ruuning https on 443 ?

 Thanks in advance


 Sent from Samsung Mobile


  Original message 
 From: Gonzalo Gasca Meza
 Date:27/01/2015 4:07 AM (GMT+05:30)
 To: Kamailio (SER) - Users Mailing List
 Subject: Re: [SR-Users] Need help on WebRTC with Kamailio as proxy

 Are you terminating media in Kamailio or just handling WS communication?
 If yes which version of Kamailio and rtp-proxy ?
 Have you tried passing media directly between Browser and Kamailio with
 any TURN server?

 Are you using latest Chrome version or FF ?

 A working sample config using the following architecture:

 https://github.com/spicyramen/llamato/tree/LlamatoReg

 signalling: sipml5 -- ws/wss --  Ec2 Kamailio --sip udp-- FS --sip
 udp-- *
 media:  sipml5
  *




 On Mon, Jan 26, 2015 at 12:44 PM, Rahul MathuR rahul.ultim...@gmail.com
 wrote:

 Hi Richard,

 Thanks for spending some cycles on it.

 It is OpenSSL 1.0.1e-fips 11 Feb 2013

 On Tue, Jan 27, 2015 at 2:04 AM, Richard Fuchs rfu...@sipwise.com
 wrote:

 On 26/01/15 02:21 PM, Rahul MathuR wrote:

 Hello,

 I am totally struck at a point while implementing Kamailio as proxy for
 WebRTC enabled UAC (Jssip). I am using Google's TURN server
 (rfc5766-turn-server for ICE/STUN). I am able to get to the point where
 the SIP server sends 183 session in progress to kamailio but after that
 I can only see -
 STUN: using this candidate
 Successful STUN binding request from ..
 SRTP output wanted, but no crypto suite was negotiated


 This is fairly strange:

  Jan 27 00:35:46 localhost rtpengine[5262]: [tsb1jrsqsadn33jjsi4f port
 30794] Failed to set up SRTP after DTLS negotiation: no SRTP protection
 profile negotiated
 Jan 27 00:35:46 localhost rtpengine[5262]: [tsb1jrsqsadn33jjsi4f port
 30794] Failed to set up SRTP after DTLS negotiation: no SRTP protection
 profile negotiated


 Are you running a very old OpenSSL version  by any chance?

 cheers


 ___
 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




 --
 Warm Regds.
 MathuRahul

 ___
 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





-- 
Warm Regds.
MathuRahul
___
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] How can change via header's ip to public ip when Kamailio locate behind a NAT network?

2015-01-27 Thread dongwf
Thanks, the public ip is not a real device ip, it is a NAT external public ip, 
so if I listen on that, server will not work. Anyway, I found my problem is 
caused by firewall, so even the via header is priviate ip, I still can get 
response, so please ignore this question, thanks for your help. 






At 2015-01-26 17:14:46, Olle E. Johansson o...@edvina.net wrote:


On 25 Jan 2015, at 14:48, dongwf dongw...@163.com wrote:


Hi Kamailio:
I use Kamailio with Amazon EC2 virtual machine, it has a private ip such as 
172.31.7.164, kamailio listened on this, I assigned a float public ip 54.X.X.X 
on it, and all the client send traffics to the public ip and it work 
well(REGISTER), but now I would relay kamailio's traffic to another real public 
server, the server found the INVITE's via header's ip address is 172.31.7.164, 
so it failed to response 100 trying and 200 OK to my kamalio, because it send 
to a private 172.31.7.164, so my question is can I change Kamailio's via 
header's ip value with my specified public ip? How can I do? Thanks a lot!


The core cookbok documents the advertise parameter to the listen config 
setting for this case.


http://www.kamailio.org/wiki/cookbooks/4.2.x/core#listen


Go ahead and try that one.


/O___
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] GeoIP Module and IPv6 seems not to match

2015-01-27 Thread Jöran Vinzens
Hi, thanks for that info.

Will there be support to handle V4 and V6 at the same time? So far there is
the possibility just for one database in the module to configure.

BR
Jöran

On Tue, Jan 27, 2015 at 10:26 AM, Daniel-Constantin Mierla 
mico...@gmail.com wrote:

  Hello,

 the geoip module is using the old database format (API) that is not
 supporting ipv6, there is a new module in the work that uses the new geoip
 database format/API.

 I already got some code and I asked the developer to make a github pull
 request. It should show up soon.

 Cheers,
 Daniel


 On 27/01/15 10:18, Jöran Vinzens wrote:

 Hi All,

  i'm trying to get GEO IP Location for an IPv6 Setup.
 We downloaded the GeoLiteCityv6.dat from maxmind and referred to it in
 modparams of geoip.

  If i now place a call from an V6 User and do something like:

  if(geoip_match($si, src)) {
 xlog(L_NOTICE, Call comes from IP '$si' ($gip(src=cc))
 CID=$ci F=$fU URI=$ru\n);
 append_hf(X-GeoIP: $gip(src=cc)\r\n);
 }

  it will not match for any reason

  if i xlog the src IP it look like: Src IP = 2A01:abc:321:123:0:0:0:2
 so it should match to the GEO IP Database.

  In CSV version of geo IP database there is an entry for my IP Address.

  Since the Module is not that verbose, i cannot tell whether the entry
 exists or not. Just the result in my if is False.

  Has anybody experience with GEOIP and IPv6?

  thanks

  Best regards,
 Jöran


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 --
 Daniel-Constantin Mierlahttp://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




-- 

Jöran Vinzens - vinz...@sipgate.de
Telefon: +49 211-63 55 56-21
Telefax: +49 211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de - www.sipgate.co.uk
___
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] topoh ACK Call-ID mismatch

2015-01-27 Thread Daniel Tryba
 Am I to naive to think that these ACKs to negatives always (callid masking
 and whether topoh is active or not) need to use the Call-ID from the
 negative (in this case 488) response? Call-ID has only to be rewritten in
 forwarding the negative response towards the endpoint that triggered it
 (which is done correctly in my call trace)

Attached is a diff to topoh_mod.c that implements above (with my limited 
knowledge). Locally generated ACKs don't get masked Call-IDs to downstream.
Works for my 488, will test some more to see if nothing else is broken. But 
maybe somebody more in touch with kamailio source code could take a look to 
see it this patch looks alright?

-- 

Telefoon: 088 0100 700
Sales: sa...@pocos.nl | Service: serviced...@pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 
17097024
--- topoh_mod.c.orig	2015-01-27 11:12:48.680160911 +0100
+++ topoh_mod.c	2015-01-27 10:51:23.162037065 +0100
@@ -397,11 +397,13 @@
 	LM_DBG(the COOKIE is [%.*s]\n, th_cookie_value.len, th_cookie_value.s);
 	if(th_cookie_value.s[0]!='x')
 		th_del_cookie(msg);
+
+	direction = (th_cookie_value.s[0]=='u')?1:0; /* upstream/downstram */
+	dialog = (get_to(msg)-tag_value.len0)?1:0;
+	local = (th_cookie_value.s[0]!='d'th_cookie_value.s[0]!='u')?1:0;
+
 	if(msg.first_line.type==SIP_REQUEST)
 	{
-		direction = (th_cookie_value.s[0]=='u')?1:0; /* upstream/downstram */
-		dialog = (get_to(msg)-tag_value.len0)?1:0;
-		local = (th_cookie_value.s[0]!='d'th_cookie_value.s[0]!='u')?1:0;
 		/* local generated requests */
 		if(local)
 		{
@@ -409,10 +411,10 @@
 			if(get_cseq(msg)-method_id==METHOD_ACK
 	|| get_cseq(msg)-method_id==METHOD_CANCEL)
 			{
-th_mask_callid(msg);
 goto ready;
 			} else {
 /* should be for upstream */
+th_unmask_callid(msg);
 goto done;
 			}
 		}
@@ -434,24 +436,30 @@
 		}
 	} else {
 		/* reply */
-		if(th_cookie_value.s[th_cookie_value.len-1]=='x')
-		{
-			/* ?!?! - we should have a cookie in any reply case */
-			goto done;
-		}
-		if(th_cookie_value.s[th_cookie_value.len-1]=='v')
+
+		if(local  direction  (get_cseq(msg)-method_id==METHOD_ACK))
 		{
-			/* reply generated locally - direction was set by request */
-			if(th_cookie_value.s[0]=='u')
+			th_unmask_callid(msg);
+		} else {
+			if(th_cookie_value.s[th_cookie_value.len-1]=='x')
 			{
-th_mask_callid(msg);
+/* ?!?! - we should have a cookie in any reply case */
+goto done;
 			}
-		} else {
-			th_flip_record_route(msg, 1);
-			th_mask_contact(msg);
-			if(th_cookie_value.s[0]=='d')
+			if(th_cookie_value.s[th_cookie_value.len-1]=='v')
 			{
-th_mask_callid(msg);
+/* reply generated locally - direction was set by request */
+if(th_cookie_value.s[0]=='u')
+{
+	th_mask_callid(msg);
+}
+			} else {
+th_flip_record_route(msg, 1);
+th_mask_contact(msg);
+if(th_cookie_value.s[0]=='d')
+{
+	th_mask_callid(msg);
+}
 			}
 		}
 	}
___
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] Async module taking down our server

2015-01-27 Thread Will Ferrer
Hello

I wanted to give an update on this.

My business partner that found the issue and has been monitoring the
problem has tracked down the issue. It turns out that the features we
implemented using the async module were leading to more calls going on con
currently (as they were intended to) and this was causing and issue with
voip monitor. So the issue was not with the Async module.

All the best.

Will Ferrer

Switchsoft

On Mon, Jan 19, 2015 at 8:43 PM, Will Ferrer will.fer...@switchsoft.com
wrote:

 Hi All

 We are trying to use the async module to to delay sending a bye on from
 one end of the call to the other.

 We are using async_route(routename, seconds) to delay the WITHINDLG route.
 The idea is that in the future we want to be able to have our billing min
 duration enforced (though currently we are having issues with the dialog
 module that we are discussing in another thread).

 After running this on our deploy servers, the delays before sending on the
 byes get longer and longer, and then kamailio goes down. Then the receive
 udp buffer fills up.

 We tried it with both 4 and 400 async workers, and it made no difference.

 I am including a screen capture of the servers stats when this happens
 taken from voip monitor.

 Here are the relevant parts of the config:

 ...
 loadmodule async.so
 ...
 modparam(async, workers, ASYNC_THREADS)
 ...
 request_route {
 ...
 route(DELAYED_BYE_STATIC);
 ...
 route[DELAYED_BYE_STATIC] {
 xlog(L_DEBUG,route DELAYED_BYE_STATIC);
 #!ifdef WITH_DELAYED_BYE_STATIC
 if (is_method(BYE)) {
 xlog(L_DEBUG,route DELAYED_BYE_STATIC, from self \n);
 #if (from_uri == myself) {
 if ((allow_trusted() || allow_source_address())  from_uri == myself) {
 xlog(L_DEBUG,route DELAYED_BYE_STATIC, Bye detected, from self \n);
 send_reply(200, OK);
 xlog(L_DEBUG,route DELAYED_BYE_STATIC, sent 200 about to sleep \n);
 setflag(FLT_ACC); # do accounting ...
 setflag(FLT_ACCFAILED); # ... even if the transaction fails
 if (has_totag()) {
 xlog(L_DEBUG,route DELAYED_BYE_STATIC, sleeping to WITHINDLG_DELAYED
 \n);
 async_route(WITHINDLG_DELAYED, MIN_DURATION);
 } else {
 xlog(L_DEBUG,route DELAYED_BYE_STATIC, sleeping to WITHINDLG \n);
 async_route(WITHINDLG, MIN_DURATION);
 }
 xlog(L_DEBUG,route DELAYED_BYE_STATIC, slept\n);
 exit;
 }
 }
 #!endif
 return;
 }
 ...
 route[WITHINDLG_DELAYED] {
 xlog(L_DEBUG, route WITHINDLG_DELAYED: triggered \n);
 $avp(was_delayed) = 1;
 route(WITHINDLG);
 }
 ...
 route[WITHINDLG] {
 xlog(L_DEBUG, route WITHINDLG: will -- DLG triggered, request method:
 $rm \n);
 #!ifdef WITH_DISPATCHER
 if(is_method(BYE|CANCEL)) {
 xlog(L_DEBUG,route WITHINDLG:  cancel or bye detected, request method:
 $rm \n);
 #!ifdef WITH_DISPATCHER_LOAD_AWARE
 xlog(L_DEBUG,route WITHINDLG: running ds_load_update, request method:
 $rm \n);
 ds_load_update();
 #dlg_get ($ci,$ft,$tt);
  #dlg_bye (all);
 #!endif
 }
 #!endif

 if (has_totag() || $avp(was_delayed) == 1) {
 xlog(L_DEBUG, route WITHINDLG: will -- DLG has totag or was_delayed:
 $avp(was_delayed)  \n);
 # sequential request withing a dialog should
 # take the path determined by record-routing
 if (loose_route()) {
 xlog(L_DEBUG, route WITHINDLG: will -- DLG has loose route \n);
 route(DLGURI);
 if (is_method(BYE)) {
 xlog(L_DEBUG,route WITHINDLG: BYE detected);
 setflag(FLT_ACC); # do accounting ...
 setflag(FLT_ACCFAILED); # ... even if the transaction fails
 xlog(L_DEBUG,route WITHINDLG: ACC flag set);
  }
 else if ( is_method(ACK) ) {
 # ACK is forwarded statelessy
 route(NATMANAGE);
 }
 else if ( is_method(NOTIFY) ) {
 # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
 record_route();
 }
 xlog(L_DEBUG, route WITHINDLG: will -- DLG RELAY 1\n);
 route(RELAY);
 } else {
 xlog(L_DEBUG, route WITHINDLG: will -- DLG else \n);
 if (is_method(SUBSCRIBE)  uri == myself) {
 # in-dialog subscribe requests
 route(PRESENCE);
 exit;
 }
 if ( is_method(ACK) ) {
 xlog(L_DEBUG, route WITHINDLG: will -- DLG is ack \n);
 if ( t_check_trans() ) {
 xlog(L_DEBUG, route WITHINDLG: will -- DLG t_check_trans \n);
 # no loose-route, but stateful ACK;
 # must be an ACK after a 487
 # or e.g. 404 from upstream server
 xlog(L_DEBUG, route WITHINDLG: will -- DLG RELAY 2\n);
 route(RELAY);
 exit;
 } else {
 # ACK without matching transaction ... ignore and discard
 exit;
 }
 }
 sl_send_reply(404,Not here);
 }
 exit;
 }
 }
 ...



 Does any one know if this is a bug or a leak with in the async module, or
 perhaps something I am doing in my config?

 Thanks in advance for an assistance you can offer me.

 All the best.

 Will Ferrer
 Switchsoft



___
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 getting start time / call duration from dialog module

2015-01-27 Thread Will Ferrer
Hi.

I wanted to update every one on this issue.

I found that while the dlg start time: $dlg(start_ts), DLG_lifetime:
$DLG_lifetime aren't populating I can still use the following to record the
start time of the call as a dialog variable:

$dlg_var(TVs) = $TV(s);

A strange problem with this however is that when I compare that start time
to the time when the bye occurs I see 10 extra seconds that never actually
happened.

In other words this:

$avp(elapsed) = ( $TV(s) -  $dlg_var(TVs));

sets my $avp(elapsed) to be 10 seconds longer than the call actually was.

I fixed it simply enough like so:

$var(dialog_duration_fix) = DIALOG_DURATION_FIX;
$avp(elapsed) = ( ($TV(s) - $var(dialog_duration_fix)) - $dlg_var(TVs));

I have worked around these issues for my own purposes but still seems like
there are some odd bugs here.

I hope this message finds every well.

All the best.

Will Ferrer

Switchsoft



On Thu, Jan 22, 2015 at 3:56 PM, Will Ferrer will.fer...@switchsoft.com
wrote:

 Hi Abdul

 I just wanted to check int. Did you have any ideas of things we could try
 or more information we could get you to assistance?

 Thanks again for your help, the input we have gotten from you and Daniel
 has always been invaluable.

 All the best.

 Will Ferrer
 Switchsoft

 On Fri, Jan 16, 2015 at 7:42 PM, Will Ferrer will.fer...@switchsoft.com
 wrote:

 Hi Abdul

 That's great. I look forward to the advice.

 Thanks again for the assistance and I hope you have a great weekend.

 All the best.

 Will

 On Fri, Jan 16, 2015 at 6:44 PM, Abdul Gafar abdul.gafar@gmail.com
 wrote:

 Hi Wiil

 I will be try help you

 //Gafar

 On Sat, Jan 17, 2015 at 4:43 AM, Will Ferrer will.fer...@switchsoft.com
  wrote:

 Hi Adbul

 Thanks, I am glad the information is useful.

 Do you have any thoughts on what I could I try next to get that 
 $dlg(start_ts)
 value populated in the dialog as it is still not working about adding the
 loose_route() function?

 I also tried looking at the logs for any reference to dialog -- tail -f
 /var/log/syslog | grep dialog

 The only thing that came up with rtpengine talking about dialogs so no
 clues there.

 Thanks to you guys for the help.

 All the best.

 Will

 On Fri, Jan 16, 2015 at 1:25 AM, Abdul Gafar abdul.gafar@gmail.com
  wrote:




 *Hi Will,Thanks for sharing very useful information.*


 *//Gafar*


 On Fri, Jan 16, 2015 at 12:48 PM, Will Ferrer 
 will.fer...@switchsoft.com wrote:

 Hi Daniel

 Thanks so much for the response and help as always.

 I tried changing my config to use loose route.

 It looks like this now:

 loadmodule dialog.so

 ...
 modparam(dialog, db_url, DBURL)
 modparam(dialog, db_mode, 1)
 modparam(dialog, dlg_flag, 4)
 modparam(dialog, dlg_match_mode, 1)

 ...

 request_route {
 if (is_method(INVITE)  (! has_totag() ) ) {
 dlg_manage();
 xlog (L_INFO, request_route DIALOG TEST: Dialog initiated);
 }
 if (is_method(BYE)) {
 #dlg_manage();
 loose_route();
 $var(elapsed) = ( $TV(s) - $dlg(start_ts) );
 xlog (L_INFO, request_route DIALOG TEST: Completed $dlg(from_uri)
 to $dlg(to_uri), elapsed: $var(elapsed), now seconds: $TV(s), dlg start
 time: $dlg(start_ts), DLG_lifetime: $DLG_lifetime);
 }
 

 I now get:

 INFO: script: request_route DIALOG TEST: Dialog initiate
 INFO: script: request_route DIALOG TEST: Completed
 sip:willf1976t...@develop-sbc.switchsoft.com to
 sip:+18054515...@develop-sbc.switchsoft.com, elapsed: 1421386898,
 now seconds: 1421386898, dlg start time: 0, DLG_lifetime: 1421386898


 So the $DLG_lifetime is being populated, but it has all the seconds
 since epoch time. You can also see that the $dlg(start_ts) is 0.

 I also tried using the dlg_manage() instead of the loose route in my
 test and got the same result.

 Any idea what might be missing?

 Thanks again for your help.

 All the best.

 Will






 On Thu, Jan 15, 2015 at 5:53 AM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:
 
  Hello,
 
  try to do dlg_manage() or lose_route() before accessing the dialog
 variables.
 
  Cheers,
  Daniel
 
 
  On 15/01/15 08:25, Will Ferrer wrote:
 
  An update on this.
 
  I tried setting my dialog module to the use the db. No db entry is
 ever made.
 
  My config looks like this now:
 
  loadmodule dialog.so
 
  ...
  modparam(dialog, db_url, DBURL)
  modparam(dialog, db_mode, 1)
  modparam(dialog, dlg_flag, 4)
  modparam(dialog, dlg_match_mode, 1)
 
  ...
 
  request_route {
  if (is_method(INVITE)  (! has_totag() ) ) {
  dlg_manage();
  }
  if (is_method(BYE)) {
  $var(elapsed) = ( $TV(s) - $dlg(start_ts) );
  xlog (L_INFO, request_route DIALOG TEST: Completed
 $dlg(from_uri) to $dlg(to_uri), elapsed: $var(elapsed), now seconds:
 $TV(s), dlg start time: $dlg(start_ts), DLG_lifetime: $DLG_lifetime);
  }
  
 
 
  I hope this message finds every one well.
 
  All the best.
 
  Will
 
  On Thu, Jan 15, 2015 at 12:03 AM, Will Ferrer 
 will.fer...@switchsoft.com wrote:
 
  Hi All
 
  I am 

Re: [SR-Users] GeoIP Module and IPv6 seems not to match

2015-01-27 Thread Sergey Okhapkin
Yes, geoip2 module will handle v4 and v6 addresses at the same time.

I'm learning now how to use github and will issue pull request today.

On Tuesday 27 January 2015 12:54:59 Jöran Vinzens wrote:
 Hi, thanks for that info.
 
 Will there be support to handle V4 and V6 at the same time? So far there is
 the possibility just for one database in the module to configure.
 
 BR
 Jöran
 
 On Tue, Jan 27, 2015 at 10:26 AM, Daniel-Constantin Mierla 
 
 mico...@gmail.com wrote:
   Hello,
  
  the geoip module is using the old database format (API) that is not
  supporting ipv6, there is a new module in the work that uses the new geoip
  database format/API.
  
  I already got some code and I asked the developer to make a github pull
  request. It should show up soon.
  
  Cheers,
  Daniel
  
  
  On 27/01/15 10:18, Jöran Vinzens wrote:
  
  Hi All,
  
   i'm trying to get GEO IP Location for an IPv6 Setup.
  
  We downloaded the GeoLiteCityv6.dat from maxmind and referred to it in
  modparams of geoip.
  
   If i now place a call from an V6 User and do something like:
   
   if(geoip_match($si, src)) {
   
  xlog(L_NOTICE, Call comes from IP '$si' ($gip(src=cc))
  
  CID=$ci F=$fU URI=$ru\n);
  
  append_hf(X-GeoIP: $gip(src=cc)\r\n);
  
  }
  
   it will not match for any reason
   
   if i xlog the src IP it look like: Src IP = 2A01:abc:321:123:0:0:0:2
  
  so it should match to the GEO IP Database.
  
   In CSV version of geo IP database there is an entry for my IP Address.
   
   Since the Module is not that verbose, i cannot tell whether the entry
  
  exists or not. Just the result in my if is False.
  
   Has anybody experience with GEOIP and IPv6?
   
   thanks
   
   Best regards,
  
  Jöran
  
  
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mail
  man/listinfo/sr-users
  
  
  --
  Daniel-Constantin Mierlahttp://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] topoh ACK Call-ID mismatch

2015-01-27 Thread Daniel Tryba
On Tuesday 27 January 2015 11:24:59 Daniel Tryba wrote:
 Works for my 488, will test some more to see if nothing else is broken.

I was a bit optimistic, patch breaks if the called endpoint responds with a 
4xx :(

-- 

Telefoon: 088 0100 700
Sales: sa...@pocos.nl | Service: serviced...@pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 
17097024

___
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] CDRs for failed calls

2015-01-27 Thread Will Ferrer
Hi Mickael

Have you tried looking at these examples in the ACC module to see if what
you are looking for can be accomplished at least as far creating ACC
records:

http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1626120
http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1628288
http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1632512
http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1644232

We also use a mysql routine to move ACC into CDRs in the database, so if we
wan't CDRs for failed calls I would modify our routine to make them.

While we do not use it our selves, there is this info here on having the
ACC module make CDRs:
http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp91080

I hope that helps.

All the best.

Will Ferrer

Switchsoft

On Mon, Jan 26, 2015 at 5:23 AM, Mickael Marrache mickaelmarra...@gmail.com
 wrote:

 Hi,



 Is there a way to write CDRs for failed calls?



 I tried calling the acc_db_request command from my script, but it inserts
 a transaction log not a CDR.



 Thanks,

 Mickael

 ___
 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