dot

packages and services management
Log | Files | Refs | README

commit af7975f79fdc6770401c3d223f80a373f1b984b3
parent 532437baf529bda3a21b422fbefaf7018f70fccd
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 15 Dec 2018 16:57:03 +0100

converted config file into a config tree

Diffstat:
Mbin/service-build | 2+-
Dbin/service-save | 9---------
Ds6/baresip/x/data/contacts | 11-----------
Ms6/cherrymusic/x/run | 1-
Ds6/host/glaphyrae/contents | 8--------
Ds6/host/t470s/contents | 12------------
Ds6/host/x/type | 1-
Ms6/kamailio/x/conf/define/DBURL | 2+-
As6/kamailio/x/conf/define/FLB_NATB | 1+
As6/kamailio/x/conf/define/FLB_NATSIPPING | 1+
As6/kamailio/x/conf/define/FLT_ACC | 1+
As6/kamailio/x/conf/define/FLT_ACCFAILED | 1+
As6/kamailio/x/conf/define/FLT_ACCMISSED | 1+
As6/kamailio/x/conf/define/FLT_NATS | 1+
As6/kamailio/x/conf/define/MULTIDOMAIN | 1+
As6/kamailio/x/conf/modparam/acc/db_extra | 1+
As6/kamailio/x/conf/modparam/acc/db_flag | 1+
As6/kamailio/x/conf/modparam/acc/db_missed_flag | 1+
As6/kamailio/x/conf/modparam/acc/db_url | 1+
As6/kamailio/x/conf/modparam/acc/detect_direction | 1+
As6/kamailio/x/conf/modparam/acc/early_media | 1+
As6/kamailio/x/conf/modparam/acc/failed_transaction_flag | 1+
As6/kamailio/x/conf/modparam/acc/log_extra | 1+
As6/kamailio/x/conf/modparam/acc/log_flag | 1+
As6/kamailio/x/conf/modparam/acc/log_missed_flag | 1+
As6/kamailio/x/conf/modparam/acc/report_ack | 1+
As6/kamailio/x/conf/modparam/acc/report_cancels | 1+
As6/kamailio/x/conf/modparam/alias_db/db_url | 1+
As6/kamailio/x/conf/modparam/alias_db/use_domain | 1+
As6/kamailio/x/conf/modparam/auth_db/calculate_ha1 | 1+
As6/kamailio/x/conf/modparam/auth_db/db_url | 1+
As6/kamailio/x/conf/modparam/auth_db/load_credentials | 1+
As6/kamailio/x/conf/modparam/auth_db/password_column | 1+
As6/kamailio/x/conf/modparam/auth_db/use_domain | 1+
As6/kamailio/x/conf/modparam/ctl/binrpc | 1+
As6/kamailio/x/conf/modparam/debugger/cfgtrace | 1+
As6/kamailio/x/conf/modparam/debugger/log_level_name | 1+
As6/kamailio/x/conf/modparam/domain/db_url | 1+
As6/kamailio/x/conf/modparam/domain/register_myself | 1+
As6/kamailio/x/conf/modparam/htable/htable | 1+
As6/kamailio/x/conf/modparam/jsonrpcs/dgram_socket | 1+
As6/kamailio/x/conf/modparam/jsonrpcs/fifo_name | 1+
As6/kamailio/x/conf/modparam/jsonrpcs/pretty_format | 1+
As6/kamailio/x/conf/modparam/nathelper/natping_interval | 1+
As6/kamailio/x/conf/modparam/nathelper/ping_nated_only | 1+
As6/kamailio/x/conf/modparam/nathelper/sipping_bflag | 1+
As6/kamailio/x/conf/modparam/nathelper/sipping_from | 1+
As6/kamailio/x/conf/modparam/nathelper|registrar/received_avp | 1+
As6/kamailio/x/conf/modparam/permissions/db_mode | 1+
As6/kamailio/x/conf/modparam/permissions/db_url | 1+
Rs6/kamailio/x/conf/var/debug -> s6/kamailio/x/conf/modparam/pike/remove_latency | 0
As6/kamailio/x/conf/modparam/pike/reqs_density_per_unit | 1+
As6/kamailio/x/conf/modparam/pike/sampling_time_unit | 1+
As6/kamailio/x/conf/modparam/presence/db_url | 1+
As6/kamailio/x/conf/modparam/presence_xml/db_url | 1+
As6/kamailio/x/conf/modparam/presence_xml/force_active | 1+
As6/kamailio/x/conf/modparam/registrar/append_branches | 1+
As6/kamailio/x/conf/modparam/registrar/gruu_enabled | 1+
As6/kamailio/x/conf/modparam/registrar/max_contacts | 1+
As6/kamailio/x/conf/modparam/registrar/max_expires | 1+
As6/kamailio/x/conf/modparam/registrar/method_filtering | 1+
As6/kamailio/x/conf/modparam/rr/append_fromtag | 1+
As6/kamailio/x/conf/modparam/rr/enable_full_lr | 1+
As6/kamailio/x/conf/modparam/rtpproxy/rtpproxy_sock | 1+
As6/kamailio/x/conf/modparam/speeddial/db_url | 1+
As6/kamailio/x/conf/modparam/speeddial/use_domain | 1+
As6/kamailio/x/conf/modparam/tls/config | 1+
As6/kamailio/x/conf/modparam/tm/failure_reply_mode | 1+
As6/kamailio/x/conf/modparam/tm/fr_inv_timer | 1+
As6/kamailio/x/conf/modparam/tm/fr_timer | 1+
As6/kamailio/x/conf/modparam/usrloc/db_mode | 1+
As6/kamailio/x/conf/modparam/usrloc/db_url | 1+
As6/kamailio/x/conf/modparam/usrloc/nat_bflag | 1+
As6/kamailio/x/conf/modparam/usrloc/use_domain | 1+
As6/kamailio/x/conf/modparam/xmlrpc/route | 1+
As6/kamailio/x/conf/modparam/xmlrpc/url_match | 1+
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/acc.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/alias_db.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/auth.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/auth_db.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/cfg_rpc.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/corex.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/counters.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/ctl.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/db_mysql.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/debugger.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/domain.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/htable.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/jsonrpcs.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/kex.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/maxfwd.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/nathelper.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/permissions.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/pike.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/presence.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/presence_xml.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/pv.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/registrar.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/rr.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/rtpproxy.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/sanity.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/siputils.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/sl.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/speeddial.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/textops.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/tls.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/tm.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/tmx.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/usrloc.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/xlog.so | 0
Rs6/kamailio/x/conf/code -> s6/kamailio/x/conf/module/xmlrpc.so | 0
As6/kamailio/x/conf/route/branch_route/MANAGE_BRANCH | 4++++
As6/kamailio/x/conf/route/failure_route/MANAGE_FAILURE | 32++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/onreply_route/MANAGE_REPLY | 6++++++
As6/kamailio/x/conf/route/route/0 | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/AUTH | 38++++++++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/DLGURI | 8++++++++
As6/kamailio/x/conf/route/route/LOCATION | 41+++++++++++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/NATDETECT | 16++++++++++++++++
As6/kamailio/x/conf/route/route/NATMANAGE | 33+++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/PRESENCE | 33+++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/PSTN | 39+++++++++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/REGISTRAR | 15+++++++++++++++
As6/kamailio/x/conf/route/route/RELAY | 18++++++++++++++++++
As6/kamailio/x/conf/route/route/REQINIT | 39+++++++++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/SIPOUT | 7+++++++
As6/kamailio/x/conf/route/route/TOVOICEMAIL | 26++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/WITHINDLG | 41+++++++++++++++++++++++++++++++++++++++++
As6/kamailio/x/conf/route/route/XMLRPC | 15+++++++++++++++
As6/kamailio/x/conf/variable/children | 1+
As6/kamailio/x/conf/variable/debug | 1+
As6/kamailio/x/conf/variable/enable_tls | 1+
As6/kamailio/x/conf/variable/log_facility | 1+
As6/kamailio/x/conf/variable/log_prefix | 1+
As6/kamailio/x/conf/variable/log_stderror | 1+
As6/kamailio/x/conf/variable/memdbg | 1+
As6/kamailio/x/conf/variable/memlog | 1+
As6/kamailio/x/conf/variable/mpath | 1+
As6/kamailio/x/conf/variable/pstn.gw_ip | 1+
As6/kamailio/x/conf/variable/pstn.gw_port | 1+
As6/kamailio/x/conf/variable/tcp_connection_lifetime | 1+
As6/kamailio/x/conf/variable/voicemail.srv_ip | 1+
As6/kamailio/x/conf/variable/voicemail.srv_port | 1+
143 files changed, 563 insertions(+), 44 deletions(-)

diff --git a/bin/service-build b/bin/service-build @@ -41,8 +41,8 @@ if { { s6-hiercopy /etc/s6/${sv}/log ${sv},log } { s6-hiercopy /etc/s6/.s6-rc/service-log ${sv},log } if { redirfd -a 1 ${sv},x/producer-for echo ${sv},log } - if { redirfd -w 1 ${sv},log/consumer-for echo ${sv},x } if { redirfd -w 1 ${sv},log/env/SERVICE echo ${sv} } + if { redirfd -w 1 ${sv},log/consumer-for echo ${sv},x } } # run the setup script diff --git a/bin/service-save b/bin/service-save @@ -1,9 +0,0 @@ -#!/usr/bin/env execlineb - -backtick -n x { uname -n } -importas hostname x - -if { mkdir -p /etc/s6/host/${hostname} } -redirfd -w 1 /etc/s6/host/${hostname}/contents -pipeline { s6-ls /var/s6/ } -sed -n "s/,x// p" diff --git a/s6/baresip/x/data/contacts b/s6/baresip/x/data/contacts @@ -1,11 +0,0 @@ -# -# SIP contacts -# -# Displayname <sip:user@domain>;addr-params -# -# addr-params: -# ;presence={none,p2p} -# - -"Echo Server" <sip:echo@creytiv.com> - diff --git a/s6/cherrymusic/x/run b/s6/cherrymusic/x/run @@ -1,7 +1,6 @@ #!/usr/bin/env execlineb fdmove -c 2 1 - python3.6 /pack/src/cherrymusic/cherrymusic --setup diff --git a/s6/host/glaphyrae/contents b/s6/host/glaphyrae/contents @@ -1,8 +0,0 @@ -ii,tcp,irc.freenode.net -tinydns,h-o.st -ii,tls,irc.cyberia.is -httpfile,tcp -httpfile,tls,h-o.st -ii,tls,irc.freenode.net -tinysshd -git-daemon diff --git a/s6/host/t470s/contents b/s6/host/t470s/contents @@ -1,12 +0,0 @@ -baresip,iptel.org -dirmngr,josuah -dirmngr,root -gpg-agent,josuah -gpg-agent,root -pjsua,iptel.org -qmail-send -ssh-agent,josuah -ssh-agent,root -tinydns,h-o.st -tor -transmission diff --git a/s6/host/x/type b/s6/host/x/type @@ -1 +0,0 @@ -bundle diff --git a/s6/kamailio/x/conf/define/DBURL b/s6/kamailio/x/conf/define/DBURL @@ -1 +1 @@ -"text://CONF_DIR/dbtext" +"mysql://kamailio:kamailiorw@localhost/kamailio" diff --git a/s6/kamailio/x/conf/define/FLB_NATB b/s6/kamailio/x/conf/define/FLB_NATB @@ -0,0 +1 @@ +6 diff --git a/s6/kamailio/x/conf/define/FLB_NATSIPPING b/s6/kamailio/x/conf/define/FLB_NATSIPPING @@ -0,0 +1 @@ +7 diff --git a/s6/kamailio/x/conf/define/FLT_ACC b/s6/kamailio/x/conf/define/FLT_ACC @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/define/FLT_ACCFAILED b/s6/kamailio/x/conf/define/FLT_ACCFAILED @@ -0,0 +1 @@ +3 diff --git a/s6/kamailio/x/conf/define/FLT_ACCMISSED b/s6/kamailio/x/conf/define/FLT_ACCMISSED @@ -0,0 +1 @@ +2 diff --git a/s6/kamailio/x/conf/define/FLT_NATS b/s6/kamailio/x/conf/define/FLT_NATS @@ -0,0 +1 @@ +5 diff --git a/s6/kamailio/x/conf/define/MULTIDOMAIN b/s6/kamailio/x/conf/define/MULTIDOMAIN @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/acc/db_extra b/s6/kamailio/x/conf/modparam/acc/db_extra @@ -0,0 +1 @@ +"src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd" diff --git a/s6/kamailio/x/conf/modparam/acc/db_flag b/s6/kamailio/x/conf/modparam/acc/db_flag @@ -0,0 +1 @@ +FLT_ACC diff --git a/s6/kamailio/x/conf/modparam/acc/db_missed_flag b/s6/kamailio/x/conf/modparam/acc/db_missed_flag @@ -0,0 +1 @@ +FLT_ACCMISSED diff --git a/s6/kamailio/x/conf/modparam/acc/db_url b/s6/kamailio/x/conf/modparam/acc/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/acc/detect_direction b/s6/kamailio/x/conf/modparam/acc/detect_direction @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/acc/early_media b/s6/kamailio/x/conf/modparam/acc/early_media @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/acc/failed_transaction_flag b/s6/kamailio/x/conf/modparam/acc/failed_transaction_flag @@ -0,0 +1 @@ +FLT_ACCFAILED diff --git a/s6/kamailio/x/conf/modparam/acc/log_extra b/s6/kamailio/x/conf/modparam/acc/log_extra @@ -0,0 +1 @@ +"src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd" diff --git a/s6/kamailio/x/conf/modparam/acc/log_flag b/s6/kamailio/x/conf/modparam/acc/log_flag @@ -0,0 +1 @@ +FLT_ACC diff --git a/s6/kamailio/x/conf/modparam/acc/log_missed_flag b/s6/kamailio/x/conf/modparam/acc/log_missed_flag @@ -0,0 +1 @@ +FLT_ACCMISSED diff --git a/s6/kamailio/x/conf/modparam/acc/report_ack b/s6/kamailio/x/conf/modparam/acc/report_ack @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/acc/report_cancels b/s6/kamailio/x/conf/modparam/acc/report_cancels @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/alias_db/db_url b/s6/kamailio/x/conf/modparam/alias_db/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/alias_db/use_domain b/s6/kamailio/x/conf/modparam/alias_db/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/s6/kamailio/x/conf/modparam/auth_db/calculate_ha1 b/s6/kamailio/x/conf/modparam/auth_db/calculate_ha1 @@ -0,0 +1 @@ +yes diff --git a/s6/kamailio/x/conf/modparam/auth_db/db_url b/s6/kamailio/x/conf/modparam/auth_db/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/auth_db/load_credentials b/s6/kamailio/x/conf/modparam/auth_db/load_credentials @@ -0,0 +1 @@ +"" diff --git a/s6/kamailio/x/conf/modparam/auth_db/password_column b/s6/kamailio/x/conf/modparam/auth_db/password_column @@ -0,0 +1 @@ +"password" diff --git a/s6/kamailio/x/conf/modparam/auth_db/use_domain b/s6/kamailio/x/conf/modparam/auth_db/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/s6/kamailio/x/conf/modparam/ctl/binrpc b/s6/kamailio/x/conf/modparam/ctl/binrpc @@ -0,0 +1 @@ +"unix:/var/run/kamailio/kamailio_ctl" diff --git a/s6/kamailio/x/conf/modparam/debugger/cfgtrace b/s6/kamailio/x/conf/modparam/debugger/cfgtrace @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/debugger/log_level_name b/s6/kamailio/x/conf/modparam/debugger/log_level_name @@ -0,0 +1 @@ +"exec" diff --git a/s6/kamailio/x/conf/modparam/domain/db_url b/s6/kamailio/x/conf/modparam/domain/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/domain/register_myself b/s6/kamailio/x/conf/modparam/domain/register_myself @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/htable/htable b/s6/kamailio/x/conf/modparam/htable/htable @@ -0,0 +1 @@ +"ipban=>size=8;autoexpire=300;" diff --git a/s6/kamailio/x/conf/modparam/jsonrpcs/dgram_socket b/s6/kamailio/x/conf/modparam/jsonrpcs/dgram_socket @@ -0,0 +1 @@ +"/var/run/kamailio/kamailio_rpc.sock" diff --git a/s6/kamailio/x/conf/modparam/jsonrpcs/fifo_name b/s6/kamailio/x/conf/modparam/jsonrpcs/fifo_name @@ -0,0 +1 @@ +"/var/run/kamailio/kamailio_rpc.fifo" diff --git a/s6/kamailio/x/conf/modparam/jsonrpcs/pretty_format b/s6/kamailio/x/conf/modparam/jsonrpcs/pretty_format @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/nathelper/natping_interval b/s6/kamailio/x/conf/modparam/nathelper/natping_interval @@ -0,0 +1 @@ +30 diff --git a/s6/kamailio/x/conf/modparam/nathelper/ping_nated_only b/s6/kamailio/x/conf/modparam/nathelper/ping_nated_only @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/nathelper/sipping_bflag b/s6/kamailio/x/conf/modparam/nathelper/sipping_bflag @@ -0,0 +1 @@ +FLB_NATSIPPING diff --git a/s6/kamailio/x/conf/modparam/nathelper/sipping_from b/s6/kamailio/x/conf/modparam/nathelper/sipping_from @@ -0,0 +1 @@ +"sip:pinger@kamailio.org" diff --git a/s6/kamailio/x/conf/modparam/nathelper|registrar/received_avp b/s6/kamailio/x/conf/modparam/nathelper|registrar/received_avp @@ -0,0 +1 @@ +"$avp(RECEIVED)" diff --git a/s6/kamailio/x/conf/modparam/permissions/db_mode b/s6/kamailio/x/conf/modparam/permissions/db_mode @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/permissions/db_url b/s6/kamailio/x/conf/modparam/permissions/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/var/debug b/s6/kamailio/x/conf/modparam/pike/remove_latency diff --git a/s6/kamailio/x/conf/modparam/pike/reqs_density_per_unit b/s6/kamailio/x/conf/modparam/pike/reqs_density_per_unit @@ -0,0 +1 @@ +16 diff --git a/s6/kamailio/x/conf/modparam/pike/sampling_time_unit b/s6/kamailio/x/conf/modparam/pike/sampling_time_unit @@ -0,0 +1 @@ +2 diff --git a/s6/kamailio/x/conf/modparam/presence/db_url b/s6/kamailio/x/conf/modparam/presence/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/presence_xml/db_url b/s6/kamailio/x/conf/modparam/presence_xml/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/presence_xml/force_active b/s6/kamailio/x/conf/modparam/presence_xml/force_active @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/registrar/append_branches b/s6/kamailio/x/conf/modparam/registrar/append_branches @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/registrar/gruu_enabled b/s6/kamailio/x/conf/modparam/registrar/gruu_enabled @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/registrar/max_contacts b/s6/kamailio/x/conf/modparam/registrar/max_contacts @@ -0,0 +1 @@ +10 diff --git a/s6/kamailio/x/conf/modparam/registrar/max_expires b/s6/kamailio/x/conf/modparam/registrar/max_expires @@ -0,0 +1 @@ +3600 diff --git a/s6/kamailio/x/conf/modparam/registrar/method_filtering b/s6/kamailio/x/conf/modparam/registrar/method_filtering @@ -0,0 +1 @@ +1 diff --git a/s6/kamailio/x/conf/modparam/rr/append_fromtag b/s6/kamailio/x/conf/modparam/rr/append_fromtag @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/rr/enable_full_lr b/s6/kamailio/x/conf/modparam/rr/enable_full_lr @@ -0,0 +1 @@ +0 diff --git a/s6/kamailio/x/conf/modparam/rtpproxy/rtpproxy_sock b/s6/kamailio/x/conf/modparam/rtpproxy/rtpproxy_sock @@ -0,0 +1 @@ +"udp:127.0.0.1:7722" diff --git a/s6/kamailio/x/conf/modparam/speeddial/db_url b/s6/kamailio/x/conf/modparam/speeddial/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/speeddial/use_domain b/s6/kamailio/x/conf/modparam/speeddial/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/s6/kamailio/x/conf/modparam/tls/config b/s6/kamailio/x/conf/modparam/tls/config @@ -0,0 +1 @@ +"/var/pack/pkg/kamailio/5.2.0/etc/kamailio/tls.cfg" diff --git a/s6/kamailio/x/conf/modparam/tm/failure_reply_mode b/s6/kamailio/x/conf/modparam/tm/failure_reply_mode @@ -0,0 +1 @@ +3 diff --git a/s6/kamailio/x/conf/modparam/tm/fr_inv_timer b/s6/kamailio/x/conf/modparam/tm/fr_inv_timer @@ -0,0 +1 @@ +120000 diff --git a/s6/kamailio/x/conf/modparam/tm/fr_timer b/s6/kamailio/x/conf/modparam/tm/fr_timer @@ -0,0 +1 @@ +30000 diff --git a/s6/kamailio/x/conf/modparam/usrloc/db_mode b/s6/kamailio/x/conf/modparam/usrloc/db_mode @@ -0,0 +1 @@ +2 diff --git a/s6/kamailio/x/conf/modparam/usrloc/db_url b/s6/kamailio/x/conf/modparam/usrloc/db_url @@ -0,0 +1 @@ +DBURL diff --git a/s6/kamailio/x/conf/modparam/usrloc/nat_bflag b/s6/kamailio/x/conf/modparam/usrloc/nat_bflag @@ -0,0 +1 @@ +FLB_NATB diff --git a/s6/kamailio/x/conf/modparam/usrloc/use_domain b/s6/kamailio/x/conf/modparam/usrloc/use_domain @@ -0,0 +1 @@ +MULTIDOMAIN diff --git a/s6/kamailio/x/conf/modparam/xmlrpc/route b/s6/kamailio/x/conf/modparam/xmlrpc/route @@ -0,0 +1 @@ +"XMLRPC" diff --git a/s6/kamailio/x/conf/modparam/xmlrpc/url_match b/s6/kamailio/x/conf/modparam/xmlrpc/url_match @@ -0,0 +1 @@ +"^/RPC" diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/acc.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/alias_db.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/auth.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/auth_db.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/cfg_rpc.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/corex.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/counters.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/ctl.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/db_mysql.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/debugger.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/domain.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/htable.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/jsonrpcs.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/kex.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/maxfwd.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/nathelper.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/permissions.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/pike.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/presence.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/presence_xml.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/pv.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/registrar.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/rr.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/rtpproxy.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/sanity.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/siputils.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/sl.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/speeddial.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/textops.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/tls.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/tm.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/tmx.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/usrloc.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/xlog.so diff --git a/s6/kamailio/x/conf/code b/s6/kamailio/x/conf/module/xmlrpc.so diff --git a/s6/kamailio/x/conf/route/branch_route/MANAGE_BRANCH b/s6/kamailio/x/conf/route/branch_route/MANAGE_BRANCH @@ -0,0 +1,4 @@ +# Manage outgoing branches + +xdbg("new branch [$T_branch_idx] to $ru\n"); +route(NATMANAGE); diff --git a/s6/kamailio/x/conf/route/failure_route/MANAGE_FAILURE b/s6/kamailio/x/conf/route/failure_route/MANAGE_FAILURE @@ -0,0 +1,32 @@ +# Manage failure routing cases + +route(NATMANAGE); + +if (t_is_canceled()) exit; + +#!ifdef WITH_BLOCK3XX +# block call redirect based on 3xx replies. +if (t_check_status("3[0-9][0-9]")) { + t_reply("404","Not found"); + exit; +} +#!endif + +#!ifdef WITH_BLOCK401407 +# block call redirect based on 401, 407 replies. +if (t_check_status("401|407")) { + t_reply("404","Not found"); + exit; +} +#!endif + +#!ifdef WITH_VOICEMAIL +# serial forking +# - route to voicemail on busy or no answer (timeout) +if (t_check_status("486|408")) { + $du = $null; + route(TOVOICEMAIL); + exit; +} +#!endif +} diff --git a/s6/kamailio/x/conf/route/onreply_route/MANAGE_REPLY b/s6/kamailio/x/conf/route/onreply_route/MANAGE_REPLY @@ -0,0 +1,6 @@ +# Manage incoming replies + +xdbg("incoming reply\n"); +if(status=~"[12][0-9][0-9]") { + route(NATMANAGE); +} diff --git a/s6/kamailio/x/conf/route/route/0 b/s6/kamailio/x/conf/route/route/0 @@ -0,0 +1,69 @@ +/* Main SIP request routing logic +* - processing of any incoming SIP request starts with this route +* - note: this is the same as route { ... } */ + +# per request initial checks +route(REQINIT); + +# NAT detection +route(NATDETECT); + +# CANCEL processing +if (is_method("CANCEL")) { + if (t_check_trans()) { + route(RELAY); + } + exit; +} + +# handle retransmissions +if (!is_method("ACK")) { + if(t_precheck_trans()) { + t_check_trans(); + exit; + } + t_check_trans(); +} + +# handle requests within SIP dialogs +route(WITHINDLG); + +### only initial requests (no To tag) + +# authentication +route(AUTH); + +# record routing for dialog forming requests (in case they are routed) +# - remove preloaded route headers +remove_hf("Route"); +if (is_method("INVITE|SUBSCRIBE")) { + record_route(); +} + +# account only INVITEs +if (is_method("INVITE")) { + setflag(FLT_ACC); # do accounting +} + +# dispatch requests to foreign domains +route(SIPOUT); + +### requests for my local domains + +# handle presence related requests +route(PRESENCE); + +# handle registrations +route(REGISTRAR); + +if ($rU==$null) { + # request with no Username in RURI + sl_send_reply("484","Address Incomplete"); + exit; +} + +# dispatch destinations to PSTN +route(PSTN); + +# user location service +route(LOCATION); diff --git a/s6/kamailio/x/conf/route/route/AUTH b/s6/kamailio/x/conf/route/route/AUTH @@ -0,0 +1,38 @@ +# IP authorization and user authentication + +#!ifdef WITH_AUTH + +#!ifdef WITH_IPAUTH +if((!is_method("REGISTER")) && allow_source_address()) { + # source IP allowed + return; +} +#!endif + +if (is_method("REGISTER") || from_uri==myself) { + # authenticate requests + if (!auth_check("$fd", "subscriber", "1")) { + auth_challenge("$fd", "0"); + exit; + } + # user authenticated - remove auth header + if(!is_method("REGISTER|PUBLISH")) + consume_credentials(); +} +# if caller is not local subscriber, then check if it calls +# a local destination, otherwise deny, not an open relay here +if (from_uri!=myself && uri!=myself) { + sl_send_reply("403","Not relaying"); + exit; +} + +#!else + +# authentication not enabled - do not relay at all to foreign networks +if(uri!=myself) { + sl_send_reply("403","Not relaying"); + exit; +} + +#!endif +return; diff --git a/s6/kamailio/x/conf/route/route/DLGURI b/s6/kamailio/x/conf/route/route/DLGURI @@ -0,0 +1,8 @@ +# URI update for dialog requests + +#!ifdef WITH_NAT +if(!isdsturiset()) { + handle_ruri_alias(); +} +#!endif +return; diff --git a/s6/kamailio/x/conf/route/route/LOCATION b/s6/kamailio/x/conf/route/route/LOCATION @@ -0,0 +1,41 @@ +# User location service + +#!ifdef WITH_SPEEDDIAL +# search for short dialing - 2-digit extension +if($rU=~"^[0-9][0-9]$") { + if(sd_lookup("speed_dial")) { + route(SIPOUT); + } +} +#!endif + +#!ifdef WITH_ALIASDB +# search in DB-based aliases +if(alias_db_lookup("dbaliases")) { + route(SIPOUT); +} +#!endif + +$avp(oexten) = $rU; +if (!lookup("location")) { + $var(rc) = $rc; + route(TOVOICEMAIL); + t_newtran(); + switch ($var(rc)) { + case -1: + case -3: + send_reply("404", "Not Found"); + exit; + case -2: + send_reply("405", "Method Not Allowed"); + exit; + } +} + +# when routing via usrloc, log the missed calls also +if (is_method("INVITE")) { + setflag(FLT_ACCMISSED); +} + +route(RELAY); +exit; diff --git a/s6/kamailio/x/conf/route/route/NATDETECT b/s6/kamailio/x/conf/route/route/NATDETECT @@ -0,0 +1,16 @@ +# Caller NAT detection + +#!ifdef WITH_NAT +force_rport(); +if (nat_uac_test("19")) { + if (is_method("REGISTER")) { + fix_nated_register(); + } else { + if(is_first_hop()) { + set_contact_alias(); + } + } + setflag(FLT_NATS); +} +#!endif +return; diff --git a/s6/kamailio/x/conf/route/route/NATMANAGE b/s6/kamailio/x/conf/route/route/NATMANAGE @@ -0,0 +1,33 @@ +# RTPProxy control and signaling updates for NAT traversal + +#!ifdef WITH_NAT +if (is_request()) { + if(has_totag()) { + if(check_route_param("nat=yes")) { + setbflag(FLB_NATB); + } + } +} +if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return; + +if(nat_uac_test("8")) { + rtpproxy_manage("co"); +} else { + rtpproxy_manage("cor"); +} + +if (is_request()) { + if (!has_totag()) { + if(t_is_branch_route()) { + add_rr_param(";nat=yes"); + } + } +} +if (is_reply()) { + if(isbflagset(FLB_NATB)) { + if(is_first_hop()) + set_contact_alias(); + } +} +#!endif +return; diff --git a/s6/kamailio/x/conf/route/route/PRESENCE b/s6/kamailio/x/conf/route/route/PRESENCE @@ -0,0 +1,33 @@ +# Presence server processing + +if(!is_method("PUBLISH|SUBSCRIBE")) return; + +if(is_method("SUBSCRIBE") && $hdr(Event)=="message-summary") { + route(TOVOICEMAIL); + # returns here if no voicemail server is configured + sl_send_reply("404", "No voicemail service"); + exit; +} + +#!ifdef WITH_PRESENCE +if (!t_newtran()) { + sl_reply_error(); + exit; +} + +if(is_method("PUBLISH")) { + handle_publish(); + t_release(); +} else if(is_method("SUBSCRIBE")) { + handle_subscribe(); + t_release(); +} +exit; +#!endif + +# if presence enabled, this part will not be executed +if (is_method("PUBLISH") || $rU==$null) { + sl_send_reply("404", "Not here"); + exit; +} +return; diff --git a/s6/kamailio/x/conf/route/route/PSTN b/s6/kamailio/x/conf/route/route/PSTN @@ -0,0 +1,39 @@ +# PSTN GW routing + +#!ifdef WITH_PSTN +# check if PSTN GW IP is defined +if (strempty($sel(cfg_get.pstn.gw_ip))) { + xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip not defined\n"); + return; +} + +# route to PSTN dialed numbers starting with "+" or "00" +# (international format) +# - update the condition to match your dialing rules for PSTN routing +if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$")) return; + +# only local users allowed to call +if(from_uri!=myself) { + sl_send_reply("403", "Not Allowed"); + exit; +} + +# normalize target number for pstn gateway +# - convert leading 00 to + +if (starts_with("$rU", "00")) { + strip(2); + prefix("+"); +} + +if (strempty($sel(cfg_get.pstn.gw_port))) { + $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip); +} else { + $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":" + + $sel(cfg_get.pstn.gw_port); +} + +route(RELAY); +exit; +#!endif + +return; diff --git a/s6/kamailio/x/conf/route/route/REGISTRAR b/s6/kamailio/x/conf/route/route/REGISTRAR @@ -0,0 +1,15 @@ +# Handle SIP registrations + +if (!is_method("REGISTER")) return; + +if(isflagset(FLT_NATS)) { + setbflag(FLB_NATB); +#!ifdef WITH_NATSIPPING + # do SIP NAT pinging + setbflag(FLB_NATSIPPING); +#!endif +} +if (!save("location")) { + sl_reply_error(); +} +exit; diff --git a/s6/kamailio/x/conf/route/route/RELAY b/s6/kamailio/x/conf/route/route/RELAY @@ -0,0 +1,18 @@ +# Wrapper for relaying requests + +# enable additional event routes for forwarded requests +# - serial forking, RTP relaying handling, a.s.o. +if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) { + if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH"); +} +if (is_method("INVITE|SUBSCRIBE|UPDATE")) { + if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY"); +} +if (is_method("INVITE")) { + if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE"); +} + +if (!t_relay()) { + sl_reply_error(); +} +exit; diff --git a/s6/kamailio/x/conf/route/route/REQINIT b/s6/kamailio/x/conf/route/route/REQINIT @@ -0,0 +1,39 @@ +# Per SIP request initial checks + +#!ifdef WITH_ANTIFLOOD +# flood detection from same IP and traffic ban for a while +# be sure you exclude checking trusted peers, such as pstn gateways +# - local host excluded (e.g., loop to self) +if(src_ip!=myself) { + if($sht(ipban=>$si)!=$null) { + # ip is already blocked + xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n"); + exit; + } + if (!pike_check_req()) { + xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n"); + $sht(ipban=>$si) = 1; + exit; + } +} +#!endif +if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") { + # silent drop for scanners - uncomment next line if want to reply + # sl_send_reply("200", "OK"); + exit; +} + +if (!mf_process_maxfwd_header("10")) { + sl_send_reply("483","Too Many Hops"); + exit; +} + +if(is_method("OPTIONS") && uri==myself && $rU==$null) { + sl_send_reply("200","Keepalive"); + exit; +} + +if(!sanity_check("17895", "7")) { + xlog("Malformed SIP message from $si:$sp\n"); + exit; +} diff --git a/s6/kamailio/x/conf/route/route/SIPOUT b/s6/kamailio/x/conf/route/route/SIPOUT @@ -0,0 +1,7 @@ +# Routing to foreign domains + +if (uri==myself) return; + +append_hf("P-hint: outbound\r\n"); +route(RELAY); +exit; diff --git a/s6/kamailio/x/conf/route/route/TOVOICEMAIL b/s6/kamailio/x/conf/route/route/TOVOICEMAIL @@ -0,0 +1,26 @@ +# Routing to voicemail server + +#!ifdef WITH_VOICEMAIL +if(!is_method("INVITE|SUBSCRIBE")) return; + +# check if VoiceMail server IP is defined +if (strempty($sel(cfg_get.voicemail.srv_ip))) { + xlog("SCRIPT: VoiceMail routing enabled but IP not defined\n"); + return; +} +if(is_method("INVITE")) { + if($avp(oexten)==$null) return; + + $ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip) + + ":" + $sel(cfg_get.voicemail.srv_port); +} else { + if($rU==$null) return; + + $ru = "sip:" + $rU + "@" + $sel(cfg_get.voicemail.srv_ip) + + ":" + $sel(cfg_get.voicemail.srv_port); +} +route(RELAY); +exit; +#!endif + +return; diff --git a/s6/kamailio/x/conf/route/route/WITHINDLG b/s6/kamailio/x/conf/route/route/WITHINDLG @@ -0,0 +1,41 @@ +# Handle requests within SIP dialogs + +if (!has_totag()) return; + +# sequential request withing a dialog should +# take the path determined by record-routing +if (loose_route()) { + route(DLGURI); + if (is_method("BYE")) { + setflag(FLT_ACC); # do accounting ... + setflag(FLT_ACCFAILED); # ... even if the transaction fails + } else if ( is_method("ACK") ) { + # ACK is forwarded statelessly + route(NATMANAGE); + } else if ( is_method("NOTIFY") ) { + # Add Record-Route for in-dialog NOTIFY as per RFC 6665. + record_route(); + } + route(RELAY); + exit; +} + +if (is_method("SUBSCRIBE") && uri == myself) { + # in-dialog subscribe requests + route(PRESENCE); + exit; +} +if ( is_method("ACK") ) { + if ( t_check_trans() ) { + # no loose-route, but stateful ACK; + # must be an ACK after a 487 + # or e.g. 404 from upstream server + route(RELAY); + exit; + } else { + # ACK without matching transaction ... ignore and discard + exit; + } +} +sl_send_reply("404","Not here"); +exit; diff --git a/s6/kamailio/x/conf/route/route/XMLRPC b/s6/kamailio/x/conf/route/route/XMLRPC @@ -0,0 +1,15 @@ +#!ifdef WITH_XMLRPC + +# allow XMLRPC from localhost +if ((method=="POST" || method=="GET") + && (src_ip==127.0.0.1)) { + # close connection only for xmlrpclib user agents (there is a bug in + # xmlrpclib: it waits for EOF before interpreting the response). + if ($hdr(User-Agent) =~ "xmlrpclib") + set_reply_close(); + set_reply_no_connect(); + dispatch_rpc(); + exit; +} +send_reply("403", "Forbidden"); +exit; diff --git a/s6/kamailio/x/conf/variable/children b/s6/kamailio/x/conf/variable/children @@ -0,0 +1 @@ +8 diff --git a/s6/kamailio/x/conf/variable/debug b/s6/kamailio/x/conf/variable/debug @@ -0,0 +1 @@ +2 diff --git a/s6/kamailio/x/conf/variable/enable_tls b/s6/kamailio/x/conf/variable/enable_tls @@ -0,0 +1 @@ +yes diff --git a/s6/kamailio/x/conf/variable/log_facility b/s6/kamailio/x/conf/variable/log_facility @@ -0,0 +1 @@ +LOG_LOCAL0 diff --git a/s6/kamailio/x/conf/variable/log_prefix b/s6/kamailio/x/conf/variable/log_prefix @@ -0,0 +1 @@ +"{$mt $hdr(CSeq) $ci} " diff --git a/s6/kamailio/x/conf/variable/log_stderror b/s6/kamailio/x/conf/variable/log_stderror @@ -0,0 +1 @@ +no diff --git a/s6/kamailio/x/conf/variable/memdbg b/s6/kamailio/x/conf/variable/memdbg @@ -0,0 +1 @@ +5 diff --git a/s6/kamailio/x/conf/variable/memlog b/s6/kamailio/x/conf/variable/memlog @@ -0,0 +1 @@ +5 diff --git a/s6/kamailio/x/conf/variable/mpath b/s6/kamailio/x/conf/variable/mpath @@ -0,0 +1 @@ +"/var/pack/pkg/kamailio/5.2.0/lib64/kamailio/modules/" diff --git a/s6/kamailio/x/conf/variable/pstn.gw_ip b/s6/kamailio/x/conf/variable/pstn.gw_ip @@ -0,0 +1 @@ + "" desc "PSTN GW Address" diff --git a/s6/kamailio/x/conf/variable/pstn.gw_port b/s6/kamailio/x/conf/variable/pstn.gw_port @@ -0,0 +1 @@ + "" desc "PSTN GW Port" diff --git a/s6/kamailio/x/conf/variable/tcp_connection_lifetime b/s6/kamailio/x/conf/variable/tcp_connection_lifetime @@ -0,0 +1 @@ +3605 diff --git a/s6/kamailio/x/conf/variable/voicemail.srv_ip b/s6/kamailio/x/conf/variable/voicemail.srv_ip @@ -0,0 +1 @@ + "" desc "VoiceMail IP Address" diff --git a/s6/kamailio/x/conf/variable/voicemail.srv_port b/s6/kamailio/x/conf/variable/voicemail.srv_port @@ -0,0 +1 @@ + "5060" desc "VoiceMail Port"