Re: [SR-Users] NatHelper - Received adding on Contact header

2016-10-03 Thread ycaner

  

  
  
Hello; 
    Our goal is 100k
subscriber and i know that Asterisk cannot handle 3k subscriber
that sending options to keep open ports. So this situation is afraid
of me. Yeah ,You re right, dont trust endpoints. I think UAc
keep-alive mechanism can solve this. This is UAC's problem  :) 
I will just warn UAC production. 

  
Thanks for reply. 
Have a nice day.Cheers. 


3.10.2016 16:19 tarihinde Daniel
  Tryba-2 [via SIP Router] yazdı: 

 On Mon, Oct 03, 2016 at 03:35:59AM -0700, ycaner
  wrote:
  
   it is simple way to solve this and it is softphone product
  problem. If i did
  
   configuration as you said , it consumes so much socket , CPU
  and etc. in
  
   future.
  
  
  I can't imagine this will be a significant amount of cpu/traffic.
  I can
  
  only speak for my users, but near 100% is behind NAT or a
  statefull
  
  firewall. Treating the users as always NATed avoids a lot of
  headaches
  
  so far.
  
   
  
   I wonder that is there a something about it  on ietf or
  protocol flows. I
  
   think it is wrong. 
   
   What do you think about it.
  
  
  I can't find any info about this learning process via the Contact
  
  header. But I have seen this kind of behavior with Patton
  SmartNode
  
  equipment, in these appliances this learning is related to the
  UACs
  
  keep-alive mechanism. This further supported my idea to never
  trust any
  
  endpoint device :)
  
  
  
  ___
  
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list
  
  [hidden email] 
  
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 
  
  
  
  
If you reply to this email, your
  message will be added to the discussion below: 

http://sip-router.1086192.n5.nabble.com/NatHelper-Received-adding-on-Contact-header-tp152245p152249.html
 
  
  
To unsubscribe from NatHelper - Received adding on Contact
header, click
  here . 
NAML  


-- 
  
  
  

  

  

  

  



yasin-imza-2016.jpg (23K) 





--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/NatHelper-Received-adding-on-Contact-header-tp152245p152257.html
Sent from the Users mailing list archive at Nabble.com.___
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] Migrating from OpenSER config file question.

2016-10-03 Thread Daniel-Constantin Mierla
Hello,

hmm, the format $avp(s:callfwd) should still work fine. I will look
deeper at it when I get a chance after returning to the office in few
days. Anyhow, try to use $avp(callfwd), it is the same as $avp(callfwd)
if you haven't defined an overlapping avp-alias.

On the other hand, I think avp_write(...) is no longer available. Now
you can use direct assignment, like:

$avp(callfwd) = $ruri;

One very useful additions (in newer versions than 1.0, otherwise being
quite old by now) is the sqlops module that allows to do all kind of sql
operations from configuration file, in many cases saving from the
complexity of using avpops db functions. See:

https://www.kamailio.org/docs/modules/stable/modules/sqlops.html#idp44901364

So you can do INSERT/UPDATE/REPLACE/... as you need from config file,
building the sql query with the variables you want.

Cheers,
Daniel

On 30/09/16 18:29, Brian McCrary wrote:
> Hello group,
>
> I know this may be hard to believe but I'm in the process of upgrading 
> an old, but stable, OpenSER 1.0 group of servers to Kamilio.  I'm 
> basically going to sort of start from scratch with the database and 
> export my old MySQL database and write some scripts to reimport the data 
> using kamctl scripts since the database structure has changed 
> substantially since then it looks like.
>
> I've mostly migrated the config file over fairly easily, except for 
> AVPops.  I've got a section of config file that writes into the 
> usr_preferences database for call forwarding, but I seem to get the same 
> error anywhere I try to write to the database using AVPops.  Here's the 
> output I get when checking the config:
>
>  0(1378) DEBUG:  [pvapi.c:268]: pv_cache_add(): PV cache not 
> initialized, doing it now
>  0(1378) ERROR:  [pvapi.c:828]: pv_parse_spec2(): error searching pvar 
> "avp"
>  0(1378) ERROR:  [pvapi.c:1032]: pv_parse_spec2(): wrong char [s/115] 
> in [$avp(s:callfwd)] at [5 (5)]
>  0(1378) :  [cfg.y:3368]: yyerror_at(): parse error in config file 
> /usr/local/etc/kamailio/kamailio.cfg, line 145, column 4-18: Can't get from 
> cache: $avp(s:callfwd)
> ERROR: bad config file (1 errors)
>
> Here's what I think are the revelant portions of the config file:
>
> modparam("avpops", "db_url", "mysql://user:pass@localhost/kamailio")
> modparam("avpops", "avp_table", "usr_preferences")
> modparam("avpops", "uuid_column", "uuid")
> modparam("avpops", "username_column", "username")
> modparam("avpops", "domain_column", "domain")
> modparam("avpops", "attribute_column", "attribute")
> modparam("avpops", "value_column", "value")
> modparam("avpops", "type_column", "type")
> 
> if (avp_db_load("$from/username", "$avp(s:callfwd)"))
> {
> if(!avp_db_delete("$from/username", 
> "$avp(s:callfwd)/usr_preferences"))
> {
> sl_send_reply("500", "Server DB 
> error");}
> }
>
> #   avp_write("$ruri","$avp(s:callfwd)"); # Old OpenSER 
> 1.0 syntax...
> $avp(s:callfwd) = $ruri; # New Kamailio syntax ??
> 
> avp_db_store("$from/username","$avp(s:callfwd)/usr_preferences");
> t_relay();
> return;
>
> Basically I just want to write the ruri into the usr_preferences 
> database with an attribute of callfwd but not sure what I'm missing.  I 
> see the error "Can't get from cache" but not sure how that pertains to 
> what I'm trying to do.  Anyone have any ideas?
>
> Thanks,
>
> Brian
>
> ___
> 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
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com


___
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] Sip Proxy server_kamailio Features

2016-10-03 Thread Daniel-Constantin Mierla
Hello,


On 30/09/16 10:47, Surender Singh wrote:
>
> Hello,
>
>  
>
> Thanks to all to develop the such type  Sip Proxy server.
>
>  
>
> Please suggest whether  SIP proxy server is open source ,If yes than
> it can fulfil the my below requirement .
>
>  
>
> 1)  I having some sip clients which are registered on IMS .Can I
> use the kamailio Sip proxy sever between sip client and IMS.
>
>  
>
> Sip client --Kamailio Sip Proxy ---IMS
>

Yes, but it may require IMS platform to support SIP Path extension.

>  
>
> 2)  Second things, can I use Kamailio Sip Proxy to interconnect
> two IMS nodes . Can I create the SIP trunk without registration mode
> (username and password) between IMS nodes using Kamailio. Because the
> my IMS node doesn’t support sip trunk in registration mode. Its
> support one normal trunk (SIP-T)
>
> My current IMS set up like below.
>
>  
>
> IMS-1 (IBCF)---IMS2(IBCF).
>
Proxying SIP/SIP-T/SIP-I should just work with Kamailio.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com

___
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] NatHelper - Received adding on Contact header

2016-10-03 Thread Daniel Tryba
On Mon, Oct 03, 2016 at 03:35:59AM -0700, ycaner wrote:
> it is simple way to solve this and it is softphone product problem. If i did
> configuration as you said , it consumes so much socket , CPU and etc. in
> future.

I can't imagine this will be a significant amount of cpu/traffic. I can
only speak for my users, but near 100% is behind NAT or a statefull
firewall. Treating the users as always NATed avoids a lot of headaches
so far.
 
> I wonder that is there a something about it  on ietf or protocol flows. I
> think it is wrong. 
> 
> What do you think about it.

I can't find any info about this learning process via the Contact
header. But I have seen this kind of behavior with Patton SmartNode
equipment, in these appliances this learning is related to the UACs
keep-alive mechanism. This further supported my idea to never trust any
endpoint device :)


___
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] NatHelper - Received adding on Contact header

2016-10-03 Thread ycaner
it is simple way to solve this and it is softphone product problem. If i did
configuration as you said , it consumes so much socket , CPU and etc. in
future.

I wonder that is there a something about it  on ietf or protocol flows. I
think it is wrong. 

What do you think about it.

Thanks for reply , Daniel.





--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/NatHelper-Received-adding-on-Contact-header-tp152245p152248.html
Sent from the Users mailing list archive at Nabble.com.

___
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] NatHelper - Received adding on Contact header

2016-10-03 Thread Daniel Tryba
On Mon, Oct 03, 2016 at 12:22:22PM +0300, Yasin CANER wrote:
>     When i have a look ietf3261 , i couldnt find any thing this flow. Do you
> have any idea about it?
>     
> I am looking forward to your suggestions.

It is simple, never trust the endpoint and always assume there is NAT or
a statefull firewall between the endpoint and your sip server. So always
send keepalives. 

___
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] NatHelper - Received adding on Contact header

2016-10-03 Thread Yasin CANER

  
  
Hello;
      
  When I was testing on NatHelper , i  realized that Some Kind of
  Softphones can use "received" param on Contact for re-register
request. 
      When re-registartion ,it uses received parameter IP on Contact
  so that Kamailio cannot understand that it is Natted. 
      Kamailio dont send Options request to keep open ports because
  of not natted. So after a little time , Modem or Firewall close
  opened ports and  then UAC is unreachable!
      When i have a look ietf3261 , i couldnt find any thing this
  flow. Do you have any idea about it?
      
  I am looking forward to your suggestions.
      
  Thanks.
      
      
      First Flow.
      ---
      UAC sends  Registration --->>
      
      Contact : 
      
      
      Kamailio answer for register <<---200 OK
      
      Contact :
  ;received=195.8.8.10
      
      Second Flow
      
      UAC sends re-registartion --->> (Oh God there is a
  received I must send registarion again!!)
      
      Contact : 
      
      Kamailio answer for register <<---200 OK (OK Bro! you
  aren't Natted. No problem. I dont send Options)
      
      Contact : 
-- 
  
  
  

  

  

  

  


___
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] Identical Kamailio setup on 2 hosts

2016-10-03 Thread Daniel Tryba
On Fri, Sep 30, 2016 at 10:29:16PM +0530, Infinicalls Infinicalls wrote:
> Hi Daniel,
>  This seems to be ideal setup for my requirement. Would you mind
> sharing the kamailio.cfg file with me (with all the important data
> masked) ?

Not much important stuff to censor.
LBIPADDR is the ipadress of the machine itself.
REGISTRARNET/30 is the net of the backend machines.
The dispatcher.list contains the backend registrars

The backend is essentially the default config (with an always on
rtpengine) with the following additions:
You need to enable path.so and set 
modparam("path", "use_received", 1)

Tell the registrar module to use path (path_mode 1 fixes you 420
problem):
modparam("registrar", "use_path", 1)
modparam("registrar", "path_mode", 1)
modparam("registrar", "path_use_received", 1)

If you want to send keepalives from the registrar to the enduser:
modparam("nathelper", "ping_nated_only", 0)
modparam("nathelper", "udpping_from_path", 1)
the loadbalancer config has a little blurb about relaying the sipping
from the backend manually using the path header. But I'd advice to ping
from the an external process to have better control (eg sipsak)
#!KAMAILIO
#
# vim: ai

### Defined Values #
#!define FLB_NATB 6
#!define FLB_NATSIPPING 7

### Global Parameters #

### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
#!ifdef WITH_DEBUG
debug=4
log_stderror=yes
#!else
debug=2
log_stderror=no
#!endif

memdbg=5
memlog=5

log_facility=LOG_LOCAL0

fork=yes
children=4

dns_srv_lb=yes
dns_try_ipv6=no
dns_use_search_list=no
use_dns_failover=yes
dns_retr_time=1
dns_retr_no=1
dns_try_naptr=no
use_dns_cache=on
dns=no
rev_dns=no
check_via=no

/* uncomment the next line to disable TCP (default on) */
#disable_tcp=yes

/* add local domain aliases */
listen=udp:LBIPADDR:5060
listen=tcp:LBIPADDR:5060
listen=tls:LBIPADDR:5061

enable_tls=yes

# life time of TCP connection when there is no traffic
# - a bit higher than registration expires to cope with UA behind NAT
tcp_connection_lifetime=3605
force_rport=yes

mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"

loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "mi_fifo.so"
loadmodule "kex.so"
loadmodule "corex.so"
loadmodule "tmx.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 "ipops.so"

loadmodule "nathelper.so"

loadmodule "tls.so"

loadmodule "htable.so"
loadmodule "pike.so"

#!ifdef WITH_DEBUG
loadmodule "debugger.so"
#!endif

loadmodule "path.so"
loadmodule "dispatcher.so"
loadmodule "gzcompress.so"

modparam("path", "use_received", 1)

# - dispatcher -
modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
modparam("dispatcher", "ds_ping_method", "OPTIONS");
modparam("dispatcher", "ds_ping_interval", 1);
modparam("dispatcher", "ds_probing_mode", 1);
modparam("dispatcher", "ds_ping_from", "sip:loadbalancer@LBIPADDR");


# - mi_fifo params -
modparam("mi_fifo", "fifo_name", "/var/run/kamailio/kamailio_fifo")


# - tm params -
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 3)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 12)


# - rr params -
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 0)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)

# - nathelper params -
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 0)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "sip:pin...@kamailio.org")

# params needed for NAT traversal in other modules
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)

# - tls params -
modparam("tls", "config", "/etc/kamailio/tls.cfg")

# - pike params -
modparam("pike", "sampling_time_unit", 2)
modparam("pike", "reqs_density_per_unit", 32)
modparam("pike", "remove_latency", 4)

# - htable params -
# ip ban htable with autoexpire after 5 minutes
modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")


#!ifdef WITH_DEBUG
# - debugger params -
modparam("debugger", "cfgtrace", 1)
modparam("debugger", "log_level_name", "exec")
#!endif

### Routing Logic 

# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
# - note: this is the same as route { ... }

Re: [SR-Users] Kamailio number of concurrent calls

2016-10-03 Thread Dragos Oancea
Hi,

Sipp might be able to handle 1000 simultaneous calls with media but with
a lot of packet loss , especially if you use its RTP echo feature
(-rtp_echo) .
The issue seems independent of kernel params or network card params.
I ran into this issue on a CentOS and Freeswitch offered much more
performance on the same machine.
Otherwise, sipp is a good tool for SIP testing, but not media testing.

Cheers,
Dragos


On 02/10/2016 12:25, Alex Balashov wrote:
> Are you truly talking about 1000 call setups per second, or are you talking 
> about 1000 concurrent calls total? 
> 
> If the latter, SIPp can handle that, with media. 
> 
> If the former, you're going to need a lot of endpoints. 
> 
> -- Alex
> 
> --
> Principal, Evariste Systems LLC (www.evaristesys.com)
> 
> Sent from my Google Nexus.
> 
> 
> ___
> 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