Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-31 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 9: Verified+1


--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 9
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Wed, 31 Oct 2018 13:14:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-31 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..

support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 3 deletions(-)

Approvals:
  osmith: Verified
  Neels Hofmeyr: Looks good to me, approved



diff --git a/net/config_2g3g b/net/config_2g3g
index c4545a4..622a4be 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -30,6 +30,7 @@
 HLR_IP="127.0.0.1"

 MSC_PC="0.23.1"
+MSC_MNCC_SOCKET="${NET_DIR}/msc_mncc_socket"

 AUTH=optional
 ENCR_A5=0
@@ -72,3 +73,9 @@
 SCRAMBLE2=258
 LAC2=2${UARFCN2}
 RAC2=22
+
+SIPCON_ENABLE="false"
+SIPCON_LOCAL="${PUBLIC_IP}"
+SIPCON_LOCAL_PORT="5069"
+SIPCON_REMOTE="${PUBLIC_IP}"
+SIPCON_REMOTE_PORT="5060"
diff --git a/net/tmpl_std/kamailio.cfg b/net/tmpl_std/kamailio.cfg
new file mode 100644
index 000..c5b0bf2
--- /dev/null
+++ b/net/tmpl_std/kamailio.cfg
@@ -0,0 +1,419 @@
+#!KAMAILIO
+
+#!define WITH_DEBUG
+#!define WITH_PSTN
+
+### Defined Values #
+
+# - flags
+#   FLT_ - per transaction (message) flags
+#   FLB_ - per branch flags
+#!define FLT_ACC 1
+#!define FLT_ACCMISSED 2
+#!define FLT_ACCFAILED 3
+#!define FLT_NATS 5
+#!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=2
+log_stderror=yes
+#!else
+debug=2
+log_stderror=no
+#!endif
+
+memdbg=5
+memlog=5
+
+log_facility=LOG_LOCAL0
+rundir="${NET_DIR}/kamailio_rundir"
+
+fork=yes
+children=4
+
+/* uncomment the next line to disable TCP (default on) */
+disable_tcp=yes
+
+/* uncomment the next line to disable the auto discovery of local aliases
+   based on reverse DNS on IPs (default on) */
+auto_aliases=no
+
+/* add local domain aliases */
+#alias="sip.mydomain.com"
+
+/* uncomment and configure the following line if you want Kamailio to
+   bind on a specific interface/port/proto (default bind on all available) */
+listen=${SIPCON_REMOTE}:${SIPCON_REMOTE_PORT}
+
+/* port to listen to
+ * - can be specified more than once if needed to listen on many ports */
+port=${SIPCON_REMOTE_PORT}
+
+# 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
+
+### Custom Parameters #
+
+# These parameters can be modified runtime via RPC interface
+# - see the documentation of 'cfg_rpc' module.
+#
+# Format: group.id = value 'desc' description
+# Access: $sel(cfg_get.group.id) or @cfg_get.group.id
+#
+
+#!ifdef WITH_PSTN
+# PSTN GW Routing
+#
+# - pstn.gw_ip: valid IP or hostname as string value, example:
+# pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
+#
+# - by default is empty to avoid misrouting
+pstn.gw_ip = "${SIPCON_LOCAL}:${SIPCON_LOCAL_PORT}" desc "osmo-sip-connector 
Address"
+#!endif
+
+
+### Modules Section 
+
+# set paths to location of modules (to sources or installation folders)
+#!ifdef WITH_SRCPATH
+mpath="modules"
+#!else
+mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
+#!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"
+
+#!ifdef WITH_NAT
+loadmodule "nathelper.so"
+loadmodule "rtpproxy.so"
+#!endif
+
+#!ifdef WITH_DEBUG
+loadmodule "debugger.so"
+#!endif
+
+# - setting module-specific parameters ---
+
+# - mi_fifo params -
+#modparam("mi_fifo", "fifo_name", "/var/run/kamailio/kamailio_fifo")
+
+# - ctl params -
+#modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")
+
+# - 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 -
+# add value to ;lr param to cope with most of the UAs
+modparam("rr", "enable_full_lr", 1)
+# do 

Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-31 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 8: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 8
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Wed, 31 Oct 2018 13:08:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-22 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 8:

> But even nicer would be to just place both socket and rundir in the same dir 
> where the run.sh sits by default. No need to configure.

Done. Both use ${NET_DIR} now which is introduced here:
https://gerrit.osmocom.org/#/c/osmo-dev/+/11426/


--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 8
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Mon, 22 Oct 2018 11:25:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-22 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/11144

to look at the new patch set (#8).

Change subject: support osmo-sip-connector with kamailio
..

support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/8
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 8
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-17 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 7:

So far, all of the osmo-dev/net happens within that subdir, and I want to keep 
it that way if possible. I would also have commented similarly on the socket 
path, but that's a user config item. Maybe also make that rundir a user config 
item, then I can't really complain anymore.

But even nicer would be to just place both socket and rundir in the same dir 
where the run.sh sits by default. No need to configure.

If it's too much effort we can merge this now, but I guess it's simple enough?


--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 7
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Wed, 17 Oct 2018 13:17:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 6:

(2 comments)

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh
File net/tmpl_std/run.sh:

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@79
PS6, Line 79:   kamailio="$(sudo which kamailio)"
> oof, ok ... maybe instead we should include /sbin or something in the $PATH? 
> […]
Done


https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@88
PS6, Line 88:   sudo mkdir -p /var/run/kamailio
> can we instead keep the kamailio run dir as a local subdir? Is it not 
> configurable in kamailio.cfg? […]
Turns out, it is configurable as "rundir" in the config. I've set it to 
"/tmp/kamailio_rundir" now, and kamailio creates that folder and is happy with 
it.

It would of course be better to not use /tmp for this either (or to have random 
names and clean it up properly). But then again we would need to change that 
for the socket path too, so I think it is good enough for now.

Maybe at a later point we could add a well defined temporary directory to the 
script, which can be used with a variable in the configs.

Your thoughts on sudo sound good to me.



--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Fri, 12 Oct 2018 11:46:55 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/11144

to look at the new patch set (#7).

Change subject: support osmo-sip-connector with kamailio
..

support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/7
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 7
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11144 )

Change subject: support osmo-sip-connector with kamailio
..


Patch Set 6: Code-Review+1

(2 comments)

good except for the root fs / sudo things

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh
File net/tmpl_std/run.sh:

https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@79
PS6, Line 79:   kamailio="$(sudo which kamailio)"
oof, ok ... maybe instead we should include /sbin or something in the $PATH?

  $(PATH="$PATH:/usr/sbin;/sbin" which kamailio)


https://gerrit.osmocom.org/#/c/11144/6/net/tmpl_std/run.sh@88
PS6, Line 88:   sudo mkdir -p /var/run/kamailio
can we instead keep the kamailio run dir as a local subdir? Is it not 
configurable in kamailio.cfg?

Above sudo is intended only for configuring the network, all the remaining 
stuff should be userland and shouldn't modify the current root system.

Hmm, I think we should even remove sudo from the tcpdumps, possibly skip 
tcpdump if the user has no setuid on dumpcap; and maybe even separate all 
network config sudo stuff to a separate script... (what was I thinking!)



--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Fri, 12 Oct 2018 11:06:49 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/11144

to look at the new patch set (#6).

Change subject: support osmo-sip-connector with kamailio
..

support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 465 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/6
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-10-12 Thread osmith
Hello Pau Espin Pedrol, Neels Hofmeyr,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/11144

to look at the new patch set (#5).

Change subject: Support osmo-sip-connector with kamailio
..

Support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/5
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-10-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11144 )

Change subject: Support osmo-sip-connector with kamailio
..


Patch Set 4: Code-Review+2

(3 comments)

https://gerrit.osmocom.org/#/c/11144/4/net/tmpl_std/kamailio.cfg
File net/tmpl_std/kamailio.cfg:

https://gerrit.osmocom.org/#/c/11144/4/net/tmpl_std/kamailio.cfg@9
PS4, Line 9: #   FLT_ - per transaction (message) flags
(space indent above, tab below)


https://gerrit.osmocom.org/#/c/11144/4/net/tmpl_std/kamailio.cfg@47
PS4, Line 47: /* uncomment and configure the following line if you want 
Kamailio to
(whitespace)


https://gerrit.osmocom.org/#/c/11144/4/net/tmpl_std/kamailio.cfg@162
PS4, Line 162: modparam("acc", "log_extra",
(whitespace)



--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Thu, 11 Oct 2018 12:24:26 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-10-05 Thread osmith
Hello Pau Espin Pedrol,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/11144

to look at the new patch set (#4).

Change subject: Support osmo-sip-connector with kamailio
..

Support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/4
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-CC: daniel 


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-10-05 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11144 )

Change subject: Support osmo-sip-connector with kamailio
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11144/1/net/config_2g3g
File net/config_2g3g:

https://gerrit.osmocom.org/#/c/11144/1/net/config_2g3g@33
PS1, Line 33: MSC_MNCC_SOCKET="/tmp/bsc_mncc"
Minor nitpick: change to /tmp/msc_mncc

The old name is from the days where we had openbsc instead of osmo-msc so it's 
somewhat misleading now.



--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-CC: daniel 
Gerrit-Comment-Date: Fri, 05 Oct 2018 12:12:13 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-09-28 Thread osmith
Hello Pau Espin Pedrol,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/11144

to look at the new patch set (#3).

Change subject: Support osmo-sip-connector with kamailio
..

Support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/3
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-09-28 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11144 )

Change subject: Support osmo-sip-connector with kamailio
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/11144/1/net/tmpl_std/run.sh
File net/tmpl_std/run.sh:

https://gerrit.osmocom.org/#/c/11144/1/net/tmpl_std/run.sh@63
PS1, Line 63: if [ "${SIPCON_ENABLE}" == "true" ]; then
> I know the script uses /bin/bash, but you can easily keep it sh compatible by 
> using "=" instead of " […]
Good point, changed to "=".


https://gerrit.osmocom.org/#/c/11144/1/net/tmpl_std/run.sh@68
PS1, Line 68:   kamailio="$(sudo which kamailio)"
> is it in /sbin?
yes. I could also set PATH=... beforehand if that is more elegant.



--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 28 Sep 2018 10:31:32 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-09-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11144 )

Change subject: Support osmo-sip-connector with kamailio
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 28 Sep 2018 10:30:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-09-28 Thread osmith
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/11144 )

Change subject: Support osmo-sip-connector with kamailio
..

Support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/2
--
To view, visit https://gerrit.osmocom.org/11144
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
Gerrit-Change-Number: 11144
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-dev[master]: Support osmo-sip-connector with kamailio

2018-09-28 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11144


Change subject: Support osmo-sip-connector with kamailio
..

Support osmo-sip-connector with kamailio

Kamailio is a SIP server, that is relatively easy to configure, in
contrary to asterisk it only has one config file. The config file
here is based on the example config provided in the wiki:



To enable the osmo-sip-connector, build it, install kamailio and
then set SIPCON_ENABLE=true in your copy of config_2g_3g.

Change-Id: Ia5c4e9992eab390bc6d26ada7564223ff41a01b2
---
M net/config_2g3g
A net/tmpl_std/kamailio.cfg
A net/tmpl_std/osmo-sip-connector.cfg
M net/tmpl_std/run.sh
4 files changed, 462 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/11144/1

diff --git a/net/config_2g3g b/net/config_2g3g
index 266997f..05e82ea 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -30,6 +30,7 @@
 HLR_IP="127.0.0.1"

 MSC_PC="0.23.1"
+MSC_MNCC_SOCKET="/tmp/bsc_mncc"

 AUTH=optional
 ENCR_A5=0
@@ -71,3 +72,9 @@
 SCRAMBLE2=258
 LAC2=2${UARFCN2}
 RAC2=22
+
+SIPCON_ENABLE="false"
+SIPCON_LOCAL="${PUBLIC_IP}"
+SIPCON_LOCAL_PORT="5069"
+SIPCON_REMOTE="${PUBLIC_IP}"
+SIPCON_REMOTE_PORT="5060"
diff --git a/net/tmpl_std/kamailio.cfg b/net/tmpl_std/kamailio.cfg
new file mode 100644
index 000..070ca55
--- /dev/null
+++ b/net/tmpl_std/kamailio.cfg
@@ -0,0 +1,418 @@
+#!KAMAILIO
+
+#!define WITH_DEBUG
+#!define WITH_PSTN
+
+### Defined Values #
+
+# - flags
+#   FLT_ - per transaction (message) flags
+#  FLB_ - per branch flags
+#!define FLT_ACC 1
+#!define FLT_ACCMISSED 2
+#!define FLT_ACCFAILED 3
+#!define FLT_NATS 5
+#!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=2
+log_stderror=yes
+#!else
+debug=2
+log_stderror=no
+#!endif
+
+memdbg=5
+memlog=5
+
+log_facility=LOG_LOCAL0
+
+fork=yes
+children=4
+
+/* uncomment the next line to disable TCP (default on) */
+disable_tcp=yes
+
+/* uncomment the next line to disable the auto discovery of local aliases
+   based on reverse DNS on IPs (default on) */
+auto_aliases=no
+
+/* add local domain aliases */
+#alias="sip.mydomain.com"
+
+/* uncomment and configure the following line if you want Kamailio to
+   bind on a specific interface/port/proto (default bind on all available) */
+listen=${SIPCON_REMOTE}:${SIPCON_REMOTE_PORT}
+
+/* port to listen to
+ * - can be specified more than once if needed to listen on many ports */
+port=${SIPCON_REMOTE_PORT}
+
+# 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
+
+### Custom Parameters #
+
+# These parameters can be modified runtime via RPC interface
+# - see the documentation of 'cfg_rpc' module.
+#
+# Format: group.id = value 'desc' description
+# Access: $sel(cfg_get.group.id) or @cfg_get.group.id
+#
+
+#!ifdef WITH_PSTN
+# PSTN GW Routing
+#
+# - pstn.gw_ip: valid IP or hostname as string value, example:
+# pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
+#
+# - by default is empty to avoid misrouting
+pstn.gw_ip = "${SIPCON_LOCAL}:${SIPCON_LOCAL_PORT}" desc "osmo-sip-connector 
Address"
+#!endif
+
+
+### Modules Section 
+
+# set paths to location of modules (to sources or installation folders)
+#!ifdef WITH_SRCPATH
+mpath="modules"
+#!else
+mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
+#!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"
+
+#!ifdef WITH_NAT
+loadmodule "nathelper.so"
+loadmodule "rtpproxy.so"
+#!endif
+
+#!ifdef WITH_DEBUG
+loadmodule "debugger.so"
+#!endif
+
+# - setting module-specific parameters ---
+
+# - mi_fifo params -
+#modparam("mi_fifo", "fifo_name", "/var/run/kamailio/kamailio_fifo")
+
+# - ctl params -
+#modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")
+
+# - 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 -
+# add value to ;lr param to cope with most of the UAs
+modparam("rr", "enable_full_lr", 1)
+# do not append from tag to the RR (no need for this script)