From a28575161d92d3bd10accc15e1389af7a5d2ccbb Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 29 Jun 2016 09:49:59 +0200 Subject: [PATCH] Imported Upstream version 4.4.2 --- ChangeLog | 1368 +++++++++++++++++ Makefile.defs | 262 ++-- autover.h | 4 +- docbook/entities.xml | 2 +- dprint.h | 112 +- lib/srdb1/db_ut.c | 5 +- lib/srutils/sha256.c | 6 +- mem/f_malloc.c | 85 +- mem/f_malloc.h | 8 +- mem/memapi.h | 14 +- mem/q_malloc.c | 83 +- mem/q_malloc.h | 8 +- mem/tlsf_malloc.c | 16 +- mem/tlsf_malloc.h | 2 +- modules/acc/README | 138 +- modules/acc/acc.c | 14 +- modules/acc_radius/README | 8 +- modules/acc_radius/acc_radius_mod.c | 2 +- modules/acc_radius/acc_radius_mod.h | 4 - modules/acc_radius/doc/acc_radius_admin.xml | 54 +- modules/alias_db/README | 22 +- modules/app_java/Makefile | 8 +- modules/app_java/README | 16 +- modules/app_java/java_msgobj.c | 2 +- modules/app_lua/README | 20 +- modules/app_mono/README | 8 +- modules/app_perl/README | 106 +- modules/app_python/README | 10 +- modules/async/README | 8 +- modules/async/doc/async.xml | 2 +- modules/auth/README | 22 +- modules/auth_db/README | 48 +- modules/auth_diameter/README | 20 +- modules/auth_identity/README | 177 ++- modules/auth_identity/auth_crypt.c | 1 + modules/auth_radius/README | 18 +- modules/auth_radius/authorize.c | 2 +- modules/auth_xkeys/README | 6 +- modules/avp/README | 2 +- modules/avpops/README | 46 +- modules/benchmark/README | 24 +- modules/blst/README | 89 +- modules/call_control/README | 16 +- modules/call_control/call_control.c | 2 +- modules/carrierroute/README | 112 +- modules/cdp/README | 63 +- modules/cdp/peermanager.c | 2 +- modules/cdp/peerstatemachine.c | 2 +- modules/cdp/peerstatemachine.h | 2 +- modules/cdp/session.c | 6 +- modules/cdp_avp/README | 38 +- modules/cfg_db/README | 2 +- modules/cfg_rpc/README | 4 +- modules/cfgutils/README | 12 +- modules/cfgutils/cfgutils.c | 31 +- modules/cfgutils/doc/cfgutils_admin.xml | 13 +- modules/cnxcc/cnxcc_mod.c | 74 +- modules/corex/README | 40 +- modules/counters/README | 61 +- modules/cpl-c/README | 32 +- modules/crypto/README | 6 +- modules/ctl/README | 2 +- modules/db2_ldap/README | 93 +- modules/db2_ldap/ld_fld.c | 1 + modules/db2_ops/README | 271 ++-- modules/db_berkeley/km_db_berkeley.c | 3 +- modules/db_cluster/README | 2 +- modules/db_flatstore/README | 2 +- modules/db_mongodb/README | 2 + modules/db_mongodb/doc/db_mongodb_admin.xml | 4 + modules/db_mysql/README | 34 +- modules/db_mysql/my_cmd.c | 1 + modules/db_postgres/pg_fld.c | 22 +- modules/db_sqlite/README | 6 +- modules/db_text/README | 14 +- modules/db_unixodbc/dbase.c | 4 +- modules/debugger/README | 211 ++- modules/dialog/README | 1130 +++++++------- modules/dialog/doc/dialog_admin.xml | 30 +- modules/dialplan/README | 44 +- modules/dispatcher/README | 353 ++--- modules/dispatcher/dispatch.c | 4 +- modules/diversion/README | 6 +- modules/dmq_usrloc/README | 2 +- modules/dmq_usrloc/usrloc_sync.c | 2 + modules/dnssec/README | 5 +- modules/domain/README | 26 +- modules/domainpolicy/README | 26 +- modules/drouting/README | 154 +- modules/enum/README | 26 +- modules/evapi/README | 14 +- modules/evapi/evapi_mod.c | 2 +- modules/exec/README | 22 +- modules/group/README | 34 +- modules/gzcompress/README | 2 +- modules/htable/README | 58 +- modules/http_async_client/async_http.c | 33 + modules/http_client/README | 28 +- modules/http_client/functions.c | 8 +- modules/http_client/http_client.c | 26 +- modules/imc/README | 4 +- modules/imc/imc_mng.c | 27 +- modules/ims_auth/README | 258 +++- modules/ims_charging/README | 4 +- modules/ims_dialog/README | 244 +-- modules/ims_dialog/dlg_hash.c | 2 +- modules/ims_icscf/README | 160 +- modules/ims_isc/README | 29 +- modules/ims_qos/README | 43 +- modules/ims_registrar_pcscf/service_routes.c | 15 + modules/ims_registrar_scscf/README | 36 +- modules/ims_usrloc_pcscf/README | 59 +- modules/ims_usrloc_scscf/impurecord.c | 4 + modules/ipops/README | 66 +- modules/iptrtpproxy/README | 373 +++-- modules/jansson/README | 73 +- modules/jansson/doc/jansson.xml | 5 + modules/jansson/doc/jansson_admin.xml | 26 +- modules/jansson/jansson_funcs.c | 2 +- modules/jansson/jansson_utils.c | 19 +- modules/janssonrpc-c/README | 10 +- modules/json/README | 4 +- modules/jsonrpc-c/README | 28 +- modules/jsonrpc-s/README | 8 +- modules/kazoo/README | 26 +- modules/kex/README | 277 +++- modules/kex/doc/kex_admin.xml | 7 +- modules/ldap/README | 30 +- modules/log_custom/README | 4 +- modules/log_custom/log_custom_mod.c | 7 +- modules/malloc_test/README | 62 +- modules/mangler/README | 12 +- modules/matrix/README | 20 +- modules/maxfwd/README | 34 +- modules/mediaproxy/mediaproxy.c | 2 +- modules/mi_datagram/README | 52 +- modules/mi_fifo/README | 10 +- modules/mi_rpc/README | 4 +- modules/mi_xmlrpc/README | 8 +- modules/misc_radius/README | 24 +- modules/misc_radius/functions.c | 2 +- modules/mohqueue/README | 4 +- modules/mqueue/README | 12 +- modules/msilo/README | 208 +-- modules/msrp/README | 28 +- modules/mtree/README | 40 +- modules/nat_traversal/README | 18 +- modules/nat_traversal/nat_traversal.c | 5 +- modules/nathelper/README | 130 +- modules/nathelper/sip_pinger.h | 16 +- modules/ndb_cassandra/README | 6 +- modules/ndb_mongodb/README | 16 +- modules/ndb_mongodb/doc/ndb_mongodb_admin.xml | 4 + modules/ndb_redis/README | 4 +- modules/nosip/README | 4 +- modules/p_usrloc/README | 78 +- modules/path/README | 2 +- modules/pdb/README | 12 +- modules/pdt/README | 44 +- modules/peering/verify.c | 2 +- modules/permissions/README | 130 +- modules/pike/README | 24 +- modules/pipelimit/README | 66 +- modules/prefix_route/README | 27 +- modules/presence/README | 19 +- modules/presence/notify.c | 2 +- modules/presence/presence.c | 2 + modules/presence/presence.h | 1 + modules/presence/presentity.c | 2 +- modules/presence_conference/pidf.c | 17 +- modules/presence_dialoginfo/README | 20 + modules/presence_dialoginfo/pidf.c | 1 + modules/presence_profile/README | 6 +- modules/presence_xml/README | 24 +- modules/presence_xml/pidf.c | 1 + modules/print/README | 13 +- modules/print_lib/README | 17 +- modules/pua/README | 67 +- modules/pua_dialoginfo/README | 46 +- modules/pua_dialoginfo/dialog_publish.c | 2 +- modules/pua_mi/README | 4 +- modules/pua_reginfo/README | 12 +- modules/pua_usrloc/README | 8 +- modules/pua_xmpp/README | 6 +- modules/pua_xmpp/xmpp2simple.c | 2 +- modules/purple/README | 5 +- modules/purple/doc/purple_admin.xml | 10 +- modules/pv/README | 26 +- modules/pv/pv_core.c | 8 +- modules/qos/README | 10 +- modules/ratelimit/README | 30 +- modules/regex/README | 37 +- modules/registrar/README | 148 +- modules/rls/README | 2 +- modules/rr/README | 98 +- modules/rr/loose.c | 9 +- modules/rr/record.c | 6 +- modules/rtimer/README | 2 +- modules/rtpengine/README | 578 +++++-- modules/rtpengine/rtpengine.c | 5 +- modules/rtpproxy/README | 506 +++--- modules/rtpproxy/doc/rtpproxy_admin.xml | 70 +- modules/sanity/README | 8 +- modules/sca/README | 58 +- modules/sca/doc/sca_admin.xml | 587 +++---- modules/sipcapture/sipcapture.c | 12 +- modules/siptrace/README | 42 +- modules/siputils/README | 98 +- modules/sl/README | 10 +- modules/sms/README | 149 +- modules/sms/libsms_modem.c | 4 +- modules/smsops/README | 2 +- modules/snmpstats/README | 20 +- modules/speeddial/README | 14 +- modules/sqlops/README | 36 +- modules/sqlops/doc/sqlops_admin.xml | 4 +- modules/sqlops/sqlops.c | 5 +- modules/sst/README | 26 +- modules/statistics/README | 2 +- modules/statsc/README | 10 +- modules/statsd/README | 21 +- modules/stun/README | 4 +- modules/tcpops/README | 12 +- modules/textops/README | 112 +- modules/textops/textops.c | 3 +- modules/textopsx/README | 37 +- modules/textopsx/doc/functions.xml | 8 +- modules/timer/README | 8 +- modules/tls/README | 4 +- modules/tls/tls_config.c | 8 +- modules/tls/tls_init.c | 6 +- modules/tm/README | 128 +- modules/tm/config.c | 24 +- modules/tm/config.h | 6 +- modules/tm/h_table.h | 14 +- modules/tm/t_cancel.c | 2 +- modules/tm/t_cancel.h | 9 +- modules/tm/t_fwd.c | 21 +- modules/tm/t_suspend.c | 53 +- modules/tm/t_suspend.h | 4 +- modules/tmrec/README | 92 +- modules/tmx/README | 69 +- modules/topoh/README | 2 +- modules/topos/README | 4 +- modules/uac/README | 6 +- modules/uac/doc/uac_admin.xml | 6 +- modules/uac/uac_reg.c | 28 +- modules/uac_redirect/README | 32 +- modules/uid_auth_db/README | 136 +- modules/uid_avp_db/README | 182 ++- modules/uid_domain/README | 399 +++-- modules/uid_domain/uid_domain_mod.c | 5 +- modules/uid_gflags/README | 2 +- modules/uid_uri_db/README | 23 +- modules/uri_db/README | 42 +- modules/userblacklist/README | 138 +- modules/userblacklist/userblacklist.c | 141 +- modules/usrloc/README | 160 +- modules/usrloc/ul_mod.c | 6 +- modules/utils/README | 24 +- modules/utils/functions.c | 2 +- modules/uuid/README | 2 +- modules/websocket/README | 16 +- modules/xcap_client/README | 2 +- modules/xcap_server/README | 2 +- modules/xhttp/README | 4 +- modules/xhttp_rpc/README | 6 +- modules/xmlops/README | 19 +- modules/xmlrpc/README | 10 +- modules/xmlrpc/xmlrpc.c | 8 +- modules/xmpp/README | 8 +- modules/xprint/README | 153 +- pkg/kamailio/centos/6/kamailio.spec | 2 +- pkg/kamailio/deb/debian/changelog | 6 + pkg/kamailio/deb/debian/control | 2 + pkg/kamailio/deb/debian/rules | 11 +- pkg/kamailio/deb/jessie/changelog | 6 + pkg/kamailio/deb/jessie/control | 2 + pkg/kamailio/deb/jessie/rules | 11 +- pkg/kamailio/deb/precise/changelog | 6 + pkg/kamailio/deb/precise/control | 2 + pkg/kamailio/deb/precise/rules | 11 +- pkg/kamailio/deb/sid/changelog | 6 + pkg/kamailio/deb/sid/control | 2 + pkg/kamailio/deb/sid/rules | 11 +- pkg/kamailio/deb/squeeze/changelog | 6 + pkg/kamailio/deb/squeeze/control | 2 + pkg/kamailio/deb/squeeze/rules | 11 +- pkg/kamailio/deb/stretch/changelog | 6 + pkg/kamailio/deb/stretch/control | 2 + pkg/kamailio/deb/stretch/rules | 11 +- pkg/kamailio/deb/trusty/changelog | 6 + pkg/kamailio/deb/trusty/control | 2 + pkg/kamailio/deb/trusty/rules | 11 +- pkg/kamailio/deb/wheezy/changelog | 6 + pkg/kamailio/deb/wheezy/control | 2 + pkg/kamailio/deb/wheezy/rules | 11 +- pkg/kamailio/fedora/17/kamailio.spec | 2 +- pkg/kamailio/freebsd/Makefile | 2 +- pkg/kamailio/netbsd/Makefile | 4 +- pkg/kamailio/openbsd/Makefile | 2 +- pkg/kamailio/oracle/el6/kamailio.spec | 2 +- pkg/kamailio/oracle/el7/kamailio.spec | 2 +- pkg/kamailio/rpm/kamailio.spec-4.1 | 2 +- pkg/kamailio/rpm/kamailio.spec.CenOS | 2 +- pkg/kamailio/rpm/kamailio.spec.SuSE | 2 +- tcp_main.c | 18 +- utils/kamctl/Makefile | 1 - utils/kamctl/kamctl.base | 2 - utils/kamctl/kamctl.ctlbase | 2 - utils/kamctl/kamctl.db_berkeley | 4 - utils/kamctl/kamctl.dbtext | 1 - utils/kamctl/kamctl.fifo | 1 - utils/kamctl/kamctl.mysql | 1 - utils/kamctl/kamctl.oracle | 2 - utils/kamctl/kamctl.pgsql | 1 - utils/kamctl/kamctl.ser | 1 - utils/kamctl/kamctl.ser_mi | 1 - utils/kamctl/kamctl.sqlbase | 1 - utils/kamctl/kamctl.sqlite | 1 - utils/kamctl/kamctl.unixsock | 1 - utils/kamctl/kamctlrc | 2 - utils/kamctl/kamdbctl.db_berkeley | 3 - utils/kamctl/kamdbctl.dbtext | 1 - utils/kamctl/kamdbctl.mysql | 1 - utils/kamctl/kamdbctl.oracle | 1 - utils/kamctl/kamdbctl.pgsql | 5 +- utils/kamctl/kamdbctl.sqlite | 1 - utils/kamctl/kamdbfunc.oracle | 1 - utils/misc/vim/syntax/kamailio.vim | 4 +- 330 files changed, 8667 insertions(+), 5723 deletions(-) diff --git a/ChangeLog b/ChangeLog index 89788e16b..12156e25b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1371 @@ +===================== 2016-06-28 Version 4.4.2 Released ===================== + +===================== Changes Since Version 4.4.1 =========================== + +commit 3e7ab9e84893b349bbc819027c963f5c72b922b5 +Author: Daniel-Constantin Mierla +Date: Tue Jun 28 15:08:44 2016 +0200 + + Makefile.defs: version set to 4.4.2 + +commit afad9210bd0f3b87ed18182572cc7f233bccd117 +Author: Daniel-Constantin Mierla +Date: Tue Jun 28 15:00:23 2016 +0200 + + pkg/kamailio: version updates in some spec files + +commit da1728b658cfb144713ebb9593ae742aeb5ca8fe +Author: Daniel-Constantin Mierla +Date: Tue Jun 28 14:55:59 2016 +0200 + + pkg/rpm: update spec files for v4.4.2 + +commit 8c3bf5423fc5d8be97a0a85c47ea4cdc9b59dc1f +Author: Daniel-Constantin Mierla +Date: Tue Jun 28 14:38:11 2016 +0200 + + userblacklist: user core fixup helpers for string parameters + + - it allows both static and dynamic string parameters + - should fix the issue of using static strings, the parameters were no + longer evaluated and empty values were used + + (cherry picked from commit 54562b873c2c3d0a04f0587e7706188a3eb19a74) + +commit bd9c32da743edacc8a2d6de48711c709ad1a7845 +Author: Victor Seva +Date: Tue Jun 28 14:22:36 2016 +0200 + + pkg/kamailio/deb: version set to 4.4.2 + +commit 5f2b1721d1df12c2c3c9f7787b980cfb4e79af52 +Author: Victor Seva +Date: Tue Jun 28 14:19:34 2016 +0200 + + pkg/kamailio/deb: mention that http_client is included at kamailio-utils-modules package + + (cherry picked from commit 90c90480c0de001c6c3010bae67a617b24b1ee4a) + +commit a5866ef926ff6770227931c755188eb6178be07e +Author: Daniel-Constantin Mierla +Date: Tue Jun 28 12:38:23 2016 +0200 + + acc: proper value for double representation of time for db accouting on 32b + + (cherry picked from commit 4fe259ab61212bed926cff8380239980b4fe6b19) + +commit e81e15068b9733c2ed1ec21eb1fb4b5972bde36b +Author: Daniel-Constantin Mierla +Date: Tue Jun 28 09:42:00 2016 +0200 + + http_client: removed unnecessary cloning of proxy parameter + + - the value is already zero terminated and this way avoid memory leak + - wrap returning code to cfg in order to avoid 0 values + - backported from master branch commit + be677c2f8930f967277438b7b661baeacd7a5a53 + +commit 0350b416a4d8f09312ecba44bcfd44be15f3545a +Author: Kamailio Dev +Date: Mon Jun 27 16:17:55 2016 +0200 + + modules: readme files regenerated - acc ... + +commit fcc8266555d8e0846d0330d010b14fd6e8245290 +Author: Victor Seva +Date: Mon Jun 27 13:44:00 2016 +0200 + + sca: sca_call_info_update() document missing parameter + + (cherry picked from commit 0d0d42fa4bda5f37618af4c383f40bbb9ba46067) + +commit 968afa0ba6a896cdba3a426fafb90607b2c96b12 +Author: Victor Seva +Date: Mon Jun 27 13:39:24 2016 +0200 + + sca: doc indent using tabs + + (cherry picked from commit a71aa0d3338a3e925053002d875d5f3ad969065c) + +commit 55bca3abc0703a70cc65b769f419a532b820cb08 +Author: Victor Seva +Date: Mon Jun 27 13:10:20 2016 +0200 + + sca: add section ids + + (cherry picked from commit 730b4b0ca839bbcf248c3f7ddfee6974c1fa0c84) + +commit 1464e0d46da6de4e662ba1fea5dd97c8f9848be6 +Author: Victor Seva +Date: Mon Jun 27 13:04:06 2016 +0200 + + sca: fix indent doc files + + (cherry picked from commit 6e9061bc101591d8ce8a9c7b7cbf696574d7545d) + +commit c64209b200d82c3be78cf32254333f55d0b92afb +Author: Daniel-Constantin Mierla +Date: Mon Jun 27 13:04:50 2016 +0200 + + userblacklist: removed errorneous extra checks in fixup parameters function + + - parsing the parameters should be enough for validity + - no need to attempt to parse to integer first parameter, it's not + expected and results in a crash for static string parameters + - reported by Jan Hazenberg + + (cherry picked from commit 5fd2c91f512b7311f11c76023da45758fb8c4365) + +commit 5aeffff693e8d7498f25b42ce9949f28901fb953 +Author: Daniel-Constantin Mierla +Date: Mon Jun 27 11:54:08 2016 +0200 + + auth_identity: include openssl/x509_vfy.h + + - looks like being required by openssl 1.1.0 to get the definition of + X509_STORE_CTX + - reported by Victor Seva, GH #685 + + (cherry picked from commit 21321c70358997f354326be048b22c7b2dfb045a) + +commit 2e82a8bb035843f31a5add7ef83f9c3721f0f657 +Author: Dmitri Savolainen +Date: Mon Jun 27 12:53:01 2016 +0300 + + nat_traversal: set via branch according to "z9hG4bK..." format (instead of "branch=0") + + (cherry picked from commit 5261c1d0723a5b59edd231c93e42d1c963eb6375) + +commit ffd5b68651c24546e38c2dfff4e64937db131077 +Author: Dmitri Savolainen +Date: Mon Jun 27 12:50:19 2016 +0300 + + nathelper: set via branch according to "z9hG4bK..." format (instead of "branch=0") + + (cherry picked from commit 1edb4298ca5b890c40f9d7df5f29199a90b0c4fd) + +commit 00f6c9f6c2f2665d455f9ad686198eae40758c19 +Author: Daniel-Constantin Mierla +Date: Thu Jun 23 21:04:47 2016 +0200 + + utils: safe wrapper in case http status code is returned 0 + + - returning it will stop config processing, replace the return code with + -1 in such case + + (cherry picked from commit afb5bb99960d951217c6c94465cda92b10394e1a) + +commit 601f47e71a3980d28663249e77b98a93bfdc27a0 +Author: Spencer Thomason +Date: Fri Jun 24 00:20:13 2016 -0700 + + core: fix logging macros for Solaris Studio + + (cherry picked from commit 5244959b3089370e5df01d26e77d31211fce9370) + +commit e3f53ef6158057b090c398f5afc0b2bcdf747430 +Author: Spencer Thomason +Date: Fri Jun 24 00:01:59 2016 -0700 + + db_postgres: rename ntohll and htonll functions + + - fix namespace conflict on platforms where these are present in system libs + + (cherry picked from commit 2ebdbec8af56027c9c94fe5e67975c9a319b9620) + +commit d7ddbd5fa460e701484dc76ba4f0c6b5a9861483 +Author: Daniel-Constantin Mierla +Date: Thu Jun 23 07:25:47 2016 +0200 + + acc: don't multiply seconds with 1000 for time mode 2 + + - it can go out of range for 32bit arch + + (cherry picked from commit 0c6653bf1c3ee7b64e811bc752e03fa0adfb0dfe) + +commit a11ebb7d0e3c5fe7e160a2679a21c7c00bb11e99 +Author: Daniel-Constantin Mierla +Date: Wed Jun 22 18:41:40 2016 +0200 + + log_custom: debug message before setting custom log function + + (cherry picked from commit 6c36b242f085367dd1d869bfbceb6454dcb2e006) + +commit e47f912cc889e7e5ed50304924cb42292cff10be +Author: Daniel-Constantin Mierla +Date: Wed Jun 22 18:34:40 2016 +0200 + + log_custom: use buffer size for printing functions + + (cherry picked from commit 071556e9b75557dad756951f2fad71504469ca32) + +commit 8814e5fc2e44f792cbff8e83d184034b3d1ebc59 +Author: Daniel-Constantin Mierla +Date: Mon Jun 20 22:39:08 2016 +0200 + + tm: detect blind uac branch to avoid generating cancel for it + + (cherry picked from commit e36eebf36b72819b1b23c39469d60206f5df2bcf) + +commit f087e6211f92484a5f0e625bc145479ba91b31a6 +Author: Daniel-Constantin Mierla +Date: Mon Jun 20 19:16:26 2016 +0200 + + tm: cleaned always enabled TM_UAC_FLAGS define + + (cherry picked from commit 4e7599064a75b8e6d0e6fbf228690cd628bfd508) + +commit 6f8ff98f10a6df21a1b669881fef5df91254446b +Author: Giovanni Mele +Date: Fri Jun 17 16:57:48 2016 +0200 + + db_unixodbc: do not consider SQL_NO_DATA return code as an error + + (cherry picked from commit feb195b2d9c801bc3591b1e95de6b70956e76dfe) + +commit 81e55b894d1585adb0e48a88460a3b5e6a5ceb4d +Author: Daniel-Constantin Mierla +Date: Fri Jun 17 15:58:36 2016 +0200 + + tm: actions triggered by t_coninue() executed as FAILURE_ROUTE type + + - the callback for scripting routing blocks are already those for + failure route and the transaction is already created, all processing + happing in the context of invalidating the "suspended" special branch + - should prevent mistaken use of functions restricted for request route, + such as msg_apply_changes() + - following a report by Victor Seva, GH #676 + + (cherry picked from commit f121e7c099ebf862dedcd5bdc1652d188446aa72) + +commit f8aa9240ef8ea284b54789abf5556886066a7fa3 +Author: Daniel-Constantin Mierla +Date: Fri Jun 17 15:24:48 2016 +0200 + + textops: more details in doc about limitations of msg_apply_changes() + + (cherry picked from commit 474ab2280309574236f796f76e3b61251d8d23bd) + +commit 57e0caee3ce86aca54f8eb7d15e0e65a5fb942ab +Author: Olle E. Johansson +Date: Wed Jun 15 22:30:07 2016 +0200 + + imc Fix formatting + + (cherry picked from commit 8fa5c9f915b3aadb93835ae18a4f88a08b799f5e) + +commit 3c45fb4674837b2302876a116c446e4abdd31196 +Author: Federico Favaro +Date: Wed Jun 15 09:15:47 2016 +0200 + + cdp: Change debug level of peer state to DBG + + IMHO debug level of message telling the state + of the peer should be DBG. If any problem + occurs on peers proper message will be written + on log. This way we have lighter log + + (cherry picked from commit 79d022fbd50684e89d98afab66b66c08f259f4eb) + +commit df5859f3269acbc2443ef77d951afd9c63ba7465 +Author: Daniel-Constantin Mierla +Date: Tue Jun 14 15:26:06 2016 +0200 + + rtpproxy: added section ids and small adjustments to content and format + + (cherry picked from commit daa89b4e206dac49607c25bf67748915b9f280a2) + +commit 0106c43e75a87d9ead0016489330b66e6c0b0b72 +Author: Daniel-Constantin Mierla +Date: Mon Jun 13 12:50:04 2016 +0200 + + kamdbctl: more error help for missing .pgpass file + + (cherry picked from commit 8a724a70859f68431094acab2a8f9ce000bbd89b) + +commit 21304177dd9586e7bb3a04d40a8329464abcd9c1 +Author: Daniel-Constantin Mierla +Date: Mon Jun 13 12:33:28 2016 +0200 + + kamdbct: fixed typo in pgpass name + + (cherry picked from commit 631b69c43ffccbcecc3f43c3ebe4e614fe5f105d) + +commit b3a320a6f7af03f12b832272c5bee3d34d596604 +Author: Victor Seva +Date: Fri Jun 10 16:47:02 2016 +0200 + + textops: filter_body() remove previous \r\n that belongs to the boundary + + we were removing only '--boundary\r\n' but we must remove '\r\n--boundary\r\n' + + (cherry picked from commit c5dca6096785296c89acbfa4b2f7a7fd8a16d9a2) + +commit 41fb662fed24e2edab8535059f5e6eb1bd7e0ca0 +Author: Daniel-Constantin Mierla +Date: Thu Jun 9 13:06:20 2016 +0200 + + rr: use msg->pid to match cached route params + + - could be related to GH #663 + + (cherry picked from commit 8f4ec60795294d17597d3bbd20e68f4f03c98495) + +commit 1c943ebeb1b4689b36a8d77c3283e0ad894cc403 +Author: Daniel-Constantin Mierla +Date: Thu Jun 9 13:04:47 2016 +0200 + + uac: debug message if contact not matched for 200ok and jump to done + + (cherry picked from commit 0ad04a5847ceb6709c7c948a5a6ac958555c0265) + +commit e6e45a4f1bf6abacdf2485b94e197881eac0c361 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 15:00:48 2016 +0200 + + purple: added note in the docs that the module is not actively maintained + + (cherry picked from commit 4a681437a22ededb8392d06db6bfd0d377649051) + +commit 7814715fe05d327d2995d73eab6233b210d63983 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 14:42:03 2016 +0200 + + async: small update to copyright year to test auto-generation of readme + + (cherry picked from commit 8ccb20adf51035aebf4512dbba71c8c1c9db4f92) + +commit 6d694df0f0731602768bae2d52871bd3c62e67e3 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 14:40:47 2016 +0200 + + app_java: added note in makefile about generating the readme on a system without java + + (cherry picked from commit 816ece3d35fea26d656addb38f73412d3f7c33b3) + +commit 6f9f6ae1524a7ccfa6ae297d2c37036bbd2162dd +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 13:58:39 2016 +0200 + + app_java: skip throwing error of missing java for make readme + + - controlled by DOCBUILD=yes + + (cherry picked from commit bb1e6ceadacd2b38826ed996e44cc45f3d8d1a41) + +commit 414d750be5117d7fe5fb5fe248b7bcadaec5dfa4 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:39:25 2016 +0200 + + core: mem/tlsf - return unsigned long for function giving available memory + + - aling it with mem api prototype + + (cherry picked from commit 0ea1b700458888f60d54f3ebf192e09b9ea56d37) + +commit 05f2de7eeec6ee6930b1163b481257488720faff +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:28:32 2016 +0200 + + core: mem - qmalloc - cast size to unsigned long in debug messages + + - better for compatibility with C sepcs older than C99 + - newer specs allow %zu, but 'z' specifier is not in older + specs, %lu being the safer approach + + (cherry picked from commit f17ac878a555b9baad3954e0e8c6b390378bad5a) + +commit 43dc23cf55bc7d63e0932c909ae3daf65b698c68 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:19:20 2016 +0200 + + core: mem - fmalloc - cast size to unsigned long in debug messages + + - better for compatibility with C sepcs older than C99 + - newer specs allow %zu, but 'z' specifier is not in older specs, %lu + being the safer approach + + (cherry picked from commit 7e8b679b6a2c66b3695da3f1e076cfa525607d34) + +commit dc83ca0ba9cf77dd38d45d34294ef3b20de1bc4a +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:04:08 2016 +0200 + + core: mem - use size_t for tlsf memory management functions + + (cherry picked from commit 587e24a48094ad672aa625461a69363219de6922) + +commit eea33aad9bb67e8f4ef7413f44cdf52d1fc35b83 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:03:50 2016 +0200 + + core: mem - use size_t for qm memory management functions + + (cherry picked from commit 7a5c95d77f863d4af6115b2b744549bd7fe6fc89) + +commit dd2f601207d647c0d7c8e946daaa01eddc095444 +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:03:18 2016 +0200 + + core: mem - use size_t for fm memory management functions + + (cherry picked from commit b2f1456ae03f2c75aceab8eea177464dc4cc3672) + +commit f10511e04712242cd98efa443c1f870a5209db7f +Author: Daniel-Constantin Mierla +Date: Wed Jun 8 10:01:51 2016 +0200 + + core: mem - use size_t for memory management api prototypes + + - be compatible with standard malloc(...) prototype + + (cherry picked from commit bab8a6b172e2a0a6155515587e72d674205dbe0c) + +commit 05fe8f8de5d83437f80fe3e18950450eb98e1bce +Author: Daniel-Constantin Mierla +Date: Tue Jun 7 15:35:04 2016 +0200 + + tm: relocated pointers in cfg group structure to align them to 8bytes + + - cope with stricter cpu architectures like sparc + - reported by GH #655 + + (cherry picked from commit 2717aed626b09298d6150c68463cb3bdb1a81906) + +commit 96088fc7a1f39544175a4582be1e346db17611b4 +Author: Daniel-Constantin Mierla +Date: Mon Jun 6 17:33:08 2016 +0200 + + utils/misc/vim: added few missing tokens to vim syntax highlighting + + (cherry picked from commit b7e36c57f47d1b17c375db2a554c84100e1f0ee8) + +commit c5ae53c738381f9b6d4c6163a6630717e7fb2ed0 +Author: Victor Seva +Date: Mon Jun 6 11:47:23 2016 +0200 + + tls: fix compilation warning + + > tls_config.c:403:6: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] + > write(out_fd, &ch, 1); + > ^~~~~ ~~~~~~~~~~~~~~ + > tls_config.c:408:5: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] + > write(out_fd, &ch, 1); + > ^~~~~ ~~~~~~~~~~~~~~ + > 2 warnings generated. + + (cherry picked from commit f0ac15dc896f959cb92ad85fd1426fac1aa0bb55) + +commit a60ba5506c64b7752cf55e9ef3292ce21dcd1741 +Author: Victor Seva +Date: Mon Jun 6 11:41:14 2016 +0200 + + app_java: fix compiler warning + + > java_msgobj.c:233:80: warning: comparison of array 'msg->add_to_branch_s' equal to a null pointer is always false [-Wtautological-pointer-compare] + > jStrParam = (*env)->NewStringUTF(env, (msg->add_to_branch_len <= 0 || msg->add_to_branch_s == NULL) ? "" : strdup(msg->add_to_branch_s)); + > ~~~~~^~~~~~~~~~~~~~~ ~~~~ + > 1 warning generated. + + (cherry picked from commit 44d17221c3a72401b1d3157cc969acf07cb80bd0) + +commit a0fa55b3bd63b1bbd1d29e9a07d7e6e95fad789b +Author: Victor Seva +Date: Mon Jun 6 10:24:01 2016 +0200 + + cdp: fix compilation warnings + + > peerstatemachine.c:97:19: warning: implicit conversion from enumeration type 'peer_state_t' to different enumeration type 'peer_event_t' [-Wenum-conversion] + > next_event = I_Snd_Conn_Req(p); + > ~ ^~~~~~~~~~~~~~~~~ + > peerstatemachine.c:531:10: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion] + > return I_Rcv_Conn_NAck; + > ~~~~~~ ^~~~~~~~~~~~~~~ + > peerstatemachine.c:534:9: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion] + > return I_Rcv_Conn_Ack; + > ~~~~~~ ^~~~~~~~~~~~~~ + > 3 warnings generated. + + (cherry picked from commit 26d1426cfeb926ee440542716e7365d16b627801) + +commit b9b1aefa7e7e8d559e86e9cda2075d352a6eee43 +Author: Victor Seva +Date: Mon Jun 6 10:22:57 2016 +0200 + + cdp: fix compilation warning + + > peerstatemachine.c:97:19: warning: implicit conversion from enumeration type 'peer_state_t' to different enumeration type 'peer_event_t' [-Wenum-conversion] + > next_event = I_Snd_Conn_Req(p); + > ~ ^~~~~~~~~~~~~~~~~ + > peerstatemachine.c:531:10: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion] + > return I_Rcv_Conn_NAck; + > ~~~~~~ ^~~~~~~~~~~~~~~ + > peerstatemachine.c:534:9: warning: implicit conversion from enumeration type 'peer_event_t' to different enumeration type 'peer_state_t' [-Wenum-conversion] + > return I_Rcv_Conn_Ack; + > ~~~~~~ ^~~~~~~~~~~~~~ + > 3 warnings generated. + + (cherry picked from commit 007bd7e0c874f25ff73bfd36bd210b0fed2bac7a) + +commit 83a8709249c4b0197eb78b70bc7e37fdd146f3e4 +Author: Victor Seva +Date: Mon Jun 6 10:10:13 2016 +0200 + + pua_xmpp: fix compilation warning + + > xmpp2simple.c:372:10: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion] + > slash= '\0'; + > ^~~~ + > 1 warning generated. + + (cherry picked from commit c3bbe6e059ade56959b68e6caae2f8521734f502) + +commit 7d8e4e6b7b0ad43ec3920ddca941458bfe773841 +Author: Victor Seva +Date: Mon Jun 6 10:05:45 2016 +0200 + + peering: fix compilation warning + + > verify.c:58:30: warning: comparison of array 'vp->strvalue' equal to a null pointer is always false [-Wtautological-pointer-compare] + > if (vp->lvalue==0 || vp->strvalue==0) + > ~~~~^~~~~~~~ ~ + > 1 warning generated. + + (cherry picked from commit bb545d02225f23e7d1d9c950f2e4645db3d33c4f) + +commit 3bc6b9123c46dab10a53baafea95a84be62cfbf9 +Author: Victor Seva +Date: Mon Jun 6 10:03:42 2016 +0200 + + misc_radius: fix compilation warning + + > functions.c:47:27: warning: comparison of array 'vp->strvalue' equal to a null pointer is always false [-Wtautological-pointer-compare] + > if (vp->lvalue==0 || vp->strvalue==0) + > ~~~~^~~~~~~~ ~ + > 1 warning generated. + + (cherry picked from commit 4e2f17dfc6ae25739cb40328f3d5636ea1ab6fca) + +commit ccb09869abe80d2b5d9d709431c0499514720969 +Author: Victor Seva +Date: Mon Jun 6 09:45:38 2016 +0200 + + auth_radius: fix compilation warning + + > authorize.c:110:8: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_NONCE_REUSED; + > ~ ^~~~~~~~~~~~~~~~~ + > authorize.c:114:8: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_STALE_NONCE; + > ~ ^~~~~~~~~~~~~~~~ + > authorize.c:120:8: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_ERROR; + > ~ ^~~~~~~~~~ + > authorize.c:124:8: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_NO_CREDENTIALS; + > ~ ^~~~~~~~~~~~~~~~~~~ + > authorize.c:131:8: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_OK; + > ~ ^~~~~~~ + > authorize.c:148:9: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_ERROR; + > ~ ^~~~~~~~~~ + > authorize.c:153:12: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_ERROR; + > ~ ^~~~~~~~~~ + > authorize.c:159:12: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_ERROR;; + > ~ ^~~~~~~~~~ + > authorize.c:186:12: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_ERROR; + > ~ ^~~~~~~~~~ + > authorize.c:189:12: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_OK; + > ~ ^~~~~~~ + > authorize.c:193:8: warning: implicit conversion from enumeration type 'enum auth_cfg_result' to different enumeration type 'auth_result_t' (aka 'enum auth_result') [-Wenum-conversion] + > ret = AUTH_INVALID_PASSWORD; + > ~ ^~~~~~~~~~~~~~~~~~~~~ + > 11 warnings generated. + + (cherry picked from commit 1db19f1672ebebcb916f4415c59f5c820a1b0068) + +commit de13f20446d0ee18ccc1033858caf21b11cd2437 +Author: Victor Seva +Date: Mon Jun 6 09:37:36 2016 +0200 + + db_berkeley: fix compilation warning + + > km_db_berkeley.c:486:58: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] + > if ((ret = bdb_get_columns(_tbc->dtp, *_r, lres, _nc)) < 0) + > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + > km_db_berkeley.c:513:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] + > if ((ret=bdb_append_row( *_r, dbuf, lres, i)) < 0) + > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + > km_db_berkeley.c:567:58: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] + > if ((ret = bdb_get_columns(_tbc->dtp, *_r, lres, _nc)) < 0) + > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + > km_db_berkeley.c:572:47: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] + > if ((ret=bdb_convert_row( *_r, dbuf, lres)) < 0) + > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + > 4 warnings generated. + + (cherry picked from commit 6e376ee273cb95afae31b0183e3b7bf3468c4520) + +commit b051f29e2064205d11ebf6f8d6b315089aa7de6f +Author: Olle E. Johansson +Date: Fri Jun 3 10:34:25 2016 +0200 + + kamctl remove svn ID's and history + + (cherry picked from commit e3cfe2adf3af1cb7b909c5f4d3c7a481d1cfa224) + +commit dfc6643fbbfb7f1c469c264e6f93b0be402d5a56 +Author: Lucian Balaceanu +Date: Thu Jun 2 17:34:39 2016 +0200 + + rtpengine: cookie is now $server_id_$mypid_$myseqn + + (cherry picked from commit 3e92a47fb3c3f4fc97f7e3cdeb33f8b111c6b1f8) + +commit f265cad36b2cffc83cfcb517731aea98510cafc2 +Author: Carsten Bock +Date: Thu Jun 2 17:46:51 2016 +0300 + + JANSSON: Improved support for JSON-Type "Integer", which can in fact be long (or even long long) + + (cherry picked from commit 691e088fe5b23faa39c2f32df19690ce4b7a7c7d) + +commit 9d6a2aec05c77422a1e90dd89af5f63eed76c374 +Author: Mikko Lehto +Date: Thu Jun 2 16:50:35 2016 +0300 + + Revert "modules/ims_qos modules/ims_registrar_scscf: fix comparison of unsigned expression" + + This reverts commit 94b4c25640c0f486c578a9e0670dad0aa5dda0c1. + + (cherry picked from commit a787c38c241eec165c2cb8e0362ba68fa769141f) + +commit 2d0cb2ca09f0db87e7de02c169841c407bf41cf1 +Author: Lucian Balaceanu +Date: Thu Jun 2 13:50:02 2016 +0300 + + rtpengine: change cookie to hostname_pid_seqno + + - pid_seqno in gencookie() is not a unique identifictor in a multi kamailio setup + + (cherry picked from commit 69e57b9260c6c09380fdb9cfd074ea67a459230a) + +commit 7b77d4e218224c6fa6f3ccb8280b238da0e5e4e6 +Author: Daniel-Constantin Mierla +Date: Thu Jun 2 08:34:16 2016 +0200 + + presence: new parameter to set the order by string for fetching records + + - used when retrieve_order is 1 + - new param: retrieve_order_by - default value is 'priority' + + (cherry picked from commit 8c5432e5285564d6104189d6358774b8d8f3382b) + +commit c2e87f015f821e44bdb8bbaed8d61e695343ea2d +Author: Daniel-Constantin Mierla +Date: Tue May 31 17:21:29 2016 +0200 + + misc/vim: syntax highlighting for log facility values + + (cherry picked from commit ab079178ab49d8c855f135d85d8e8acfb03ec6bd) + +commit c4566aa89a9564859dc856036363cd803219c825 +Author: Dragos Oancea +Date: Tue May 31 10:52:18 2016 +0200 + + ims_registrar_pcscf: fix getContactP() for is_registered_fallback2ip param - so that script function pcscf_is_registered() actually finds the contact . + + (cherry picked from commit e88ea4022af341bb67e959c42d2096a42ae3796d) + +commit e80eee8be47cfe96fbaa08f96df325bdbfc78b09 +Author: Stefan Mititelu +Date: Mon May 30 17:13:28 2016 +0300 + + mem: Add on-error log messages for q_/f_ functions + + Log some errors in case some memory API functions fail. + + (cherry picked from commit b0dea316a2aa471cf92f122e3432a6549cf0ff5c) + +commit 995d4084ebe192a51b89bd6b901e4d4b6ddd9fd7 +Author: Daniel-Constantin Mierla +Date: Mon May 30 13:11:06 2016 +0200 + + core: setting the equivalent of IP_TOS socket option for IPv6 + + - reported in GH #598 + + (cherry picked from commit ff63e5c79592a37012018660552950a40a1a1581) + +commit 761f84a61745e433850cb286da020ea595752784 +Author: Daniel-Constantin Mierla +Date: Mon May 30 12:38:32 2016 +0200 + + evapi: start evapi dispatcher process with rpc rank + + - it may be used for handling responses from external app with sip + related functions + - reported by GH #622 + + (cherry picked from commit 2d1a7e453301cfdee2c71ccebcd66d86f4c62b3a) + +commit fd6501f8fb220408c98daeb2e84cb3e17ade5d7c +Author: Daniel-Constantin Mierla +Date: Mon May 30 12:03:02 2016 +0200 + + ndb_mongodb: note about mongodb c driver version and tls + + (cherry picked from commit d1fbec620bdb923aace665170ddabedddd2a3697) + +commit 3968feedcb62ca39ae6088b3ec6c5bec875d6b37 +Author: Daniel-Constantin Mierla +Date: Mon May 30 12:02:23 2016 +0200 + + db_mongodb: note about mongodb c driver version and tls + + (cherry picked from commit 59daee299909a7e27b5d0ec5d9a9967cd1e8e7e3) + +commit fbe8523a87637518aa9d1d9d2c2954156959d5f7 +Author: Daniel-Constantin Mierla +Date: Mon May 30 11:54:34 2016 +0200 + + tm: reset T_ASYNC_SUSPENDED flag at beginning of t_continue() + + - should allow doing t_suspend() inside the route executed by + t_continue() + - related to GH #644 and #645 + + (cherry picked from commit 827ec4fc2c9fcc2bf9f814b0545ae64784d8e3b0) + +commit 4cc369335494f2be7ac71cbc2662c9635162a47b +Author: Daniel-Constantin Mierla +Date: Mon May 30 10:35:38 2016 +0200 + + tm: coherent indentation and whitespacing for t suspend code + + (cherry picked from commit d85dd4eab4eaf797ecf89a1d3540c02c207d2de4) + +commit c67edea82106d40f709fc60c47def88debf0f3c8 +Author: Olle E. Johansson +Date: Fri May 27 16:13:16 2016 +0200 + + sqlops Delete comment about modules_k + + (cherry picked from commit 1b29ea77e1ceef8c74da930c9df88409d47f744e) + +commit 3cca0eb13b151b7822ee97d4bcd4e315aaeb77b1 +Author: Olle E. Johansson +Date: Fri May 27 09:53:31 2016 +0200 + + acc_radius Remove SVN ID, history + + (cherry picked from commit 18d614e6c2eb673c08871206e6cdc153cc3c8928) + +commit 13a361bec5cb2491ef9bc6f8b917e14e102814d4 +Author: Daniel-Constantin Mierla +Date: Thu May 26 16:54:54 2016 +0200 + + pv: signed int string representation for avps + + (cherry picked from commit d6124b3d894b130e3ebeabb247230966a77c9ceb) + +commit 52358d298f55e89841fa22899b7cb83826843c30 +Author: Andrew J Robinson +Date: Thu May 26 16:30:35 2016 +0200 + + uac: read all 12 columns from uacreg database table + + - fix when the database connector does not have DB_CAP_FETCH capability + - GH #642 + + (cherry picked from commit d3abee96d9ddfa6b0600d9e7f6864bd5786fdebe) + +commit 3e0f2436d57e46dda85a9f875beedbdf3eb7724c +Author: Mikko Lehto +Date: Wed May 25 13:49:39 2016 +0300 + + modules/ims_dialog: fix clang warning -Wparentheses-equality + + (cherry picked from commit 5395bbe6522ab9b9874162874935119cff8aa764) + +commit eb9a338ba563919682e74306c33d87961be17414 +Author: Mikko Lehto +Date: Wed May 25 13:49:21 2016 +0300 + + modules/ims_qos modules/ims_registrar_scscf: fix comparison of unsigned expression + + (cherry picked from commit 94b4c25640c0f486c578a9e0670dad0aa5dda0c1) + +commit 3b3481180be9878d8837f49b77cd76284cc11221 +Author: Mikko Lehto +Date: Mon May 23 23:49:59 2016 +0300 + + modules/[call_control|mediaproxy]: proper assigment to NULL pointer + + CC (clang) [M mediaproxy.so] mediaproxy.o + mediaproxy.c:1929:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'void *' [-Wnon-literal-null-conversion] + *_params->param = MPInactive; + ^~~~~~~~~~ + + (cherry picked from commit 700b334b51b39056c4c0004451ca41304510f164) + +commit ad0f9f62fa761dcfcbe4ee21a92acc97be1c9c8f +Author: Mikko Lehto +Date: Tue May 24 12:37:44 2016 +0300 + + modules/sipcapture: fix possible NULL pointer dereference + + (cherry picked from commit a9cce1772d25e1f03cec3ee291ae5fb4a945f82f) + +commit d84d8a800e504561fe9036bc8e0fd15bd17d334f +Author: Mikko Lehto +Date: Tue May 24 12:27:14 2016 +0300 + + modules/uid_domain: initialize variables + + (cherry picked from commit e6a3f6605f50d16f673724a2dc6cf22fc47bc717) + +commit b351655cc53342137106cf9d6e4182950ee8ea0e +Author: Mikko Lehto +Date: Tue May 24 07:32:33 2016 +0300 + + modules/rr: initialize to NULL + + (cherry picked from commit c00867e50de1c7855fed8a05745086092fef38a5) + +commit c95ab90d1f8f6fcf3d172f774c8c501775a35999 +Author: Dmitri Savolainen +Date: Tue May 24 12:51:06 2016 +0300 + + uac: reset UAC_REG_DISABLED flag (if need) after refresh + + (cherry picked from commit 8e0ae1f825c080a050c7e755eea67d2c56d6841f) + +commit 877beb6b77baf44ddab3dc78965b3c065a2c1ee2 +Author: Daniel-Constantin Mierla +Date: Tue May 24 09:07:32 2016 +0200 + + Makefile.defs: cleaned unnecessary whitespaces + + (cherry picked from commit 897d8319ddce6b7834c8277ddcc436ffdbe5d164) + +commit 82b24524dc6df842d3d1c11bf5f5a1c16f2a8fa5 +Author: Mikko Lehto +Date: Sun May 22 02:43:18 2016 +0300 + + modules/presence_conference: re-organize preprocessor symbols + + Fixes compilation on FreeBSD where no special feature request is needed + + (cherry picked from commit 9852f751edb99b5190f16ffe68c62eb0f51f85bc) + +commit 01698f47ab0be22f0d80cb0a66bbeb92f8177821 +Author: Mikko Lehto +Date: Wed May 18 02:18:52 2016 +0300 + + lib/srdb1: fix compiler warning + + > CC (gcc) [L libsrdb1.so.1.0] db_ut.o + > db_ut.c:57:32: warning: extra tokens at end of #undef directive + > #undef _XOPEN_SOURCE_EXTENDED 1 /* solaris */ + > ^ + + (cherry picked from commit dee2478e521f2f829c66d025fb6ca17326138910) + +commit 6787a5ecfec64202ec80c2e9fe85c149a31e75ff +Author: Daniel-Constantin Mierla +Date: Fri May 20 07:16:46 2016 +0200 + + dispatcher: get rid of compile warning about unreachable code + + (cherry picked from commit 5ac0f5c43da106e8130143a2ad83d4a131513a18) + +commit cac8f8df9dc1ccd6c97e80aaee1f4f3d766f1f7e +Author: Dmitri Savolainen +Date: Wed May 18 20:07:38 2016 +0300 + + uac: uac.reg_refresh doc is supplemented + + (cherry picked from commit 3310aa311b76d44f33cf784d20b874db259b61b2) + +commit 14c1376a8b1afecae229124d84acb629b60424cc +Author: Mikko Lehto +Date: Tue May 17 14:49:54 2016 +0300 + + lib/srutils: fix gcc warning GH#612 + + > sha256.c: In function 'sr_SHA256_Final': + > sha256.c:613:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] + > *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; + > ^ + > sha256.c: In function 'SHA512_Last': + > sha256.c:930:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] + > *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; + > ^ + > sha256.c:931:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] + > *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; + > ^ + + (cherry picked from commit cfccbfa8590dffe9a1282dba6ce757f686f55599) + +commit d26f29930d3ccc01419f0868637c7a1f1eb8173d +Author: Victor Seva +Date: Tue May 17 13:23:11 2016 +0200 + + presence_xml: fix compiler warning #612 + + > CC (gcc) [M presence_xml.so] pidf.o + > In file included from /usr/include/time.h:27:0, + > from pidf.c:50: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit 9f1aa931dafc0d654af4d51b5e4ab6a72a71fb0c) + +commit ea3002aa6f7d1edf8cb25d9338903049132c33fe +Author: Victor Seva +Date: Tue May 17 13:22:18 2016 +0200 + + presence_dialoginfo: fix compiler warnings #612 + + > CC (gcc) [M presence_dialoginfo.so] pidf.o + > In file included from /usr/include/time.h:27:0, + > from pidf.c:48: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit e8c7b29e1d051619595f2d45276d8c775bc278a3) + +commit 387ed0885d17d8210864b45f43ec0dea564777a4 +Author: Victor Seva +Date: Tue May 17 13:20:45 2016 +0200 + + db2_ldap: fix compiler warnings #612 + + > CC (gcc) [M db2_ldap.so] ld_fld.o + > In file included from /usr/include/string.h:25:0, + > from ../../str.h:24, + > from ld_cfg.h:30, + > from ld_fld.h:37, + > from ld_fld.c:39: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit 08927c98edab0c1201138fbd4f9760dcdf3a35c1) + +commit 5245837ff6af3c88f5a9bb8ee4f5266379fb97ff +Author: Victor Seva +Date: Tue May 17 13:02:22 2016 +0200 + + presence_conference: fix compiler warnings #612 + + > CC (gcc) [M presence_conference.so] pidf.o + > In file included from /usr/include/time.h:27:0, + > from pidf.c:49: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit 3976224f6bb4b790b1752a00174439a1e2de1665) + +commit 2aa23040971693c9ebc598e3b4bea79e3d2a86de +Author: Victor Seva +Date: Tue May 17 12:09:02 2016 +0200 + + db_mysql: fix compile warning #612 + + > CC (gcc) [M db_mysql.so] my_cmd.o + > In file included from /usr/include/string.h:25:0, + > from ../../lib/srdb2/../../str.h:24, + > from ../../lib/srdb2/db_gen.h:30, + > from ../../lib/srdb2/db_drv.h:29, + > from my_cmd.h:25, + > from my_cmd.c:33: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit 3c4fa1250c8c3de74e9415a064ba75f97e1cbb4f) + +commit b6d341548abeb85f20c305b4cf0617e8f9a404ee +Author: Victor Seva +Date: Fri May 13 10:36:45 2016 +0200 + + lib/srdb1: fix compiler warning #612 + + > CC (gcc) [L libsrdb1.so.1.0] db_ut.o + > In file included from /usr/include/time.h:27:0, + > from db_ut.c:50: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit 09470aed719b0fad6c600d9c18a339e343550f33) + +commit 78192719edaa1327a4420a2f248ee5602eae91aa +Author: Daniel-Constantin Mierla +Date: Tue May 17 08:16:12 2016 +0200 + + cfgutils: added more to docs for route exists functions + + (cherry picked from commit 472782d2f094b1971543b4d0c3733058d9086d78) + +commit 0aa9f5458a59909a756b5a6f0d692ec264bb3fa3 +Author: Phil Lavin +Date: Mon May 16 15:17:04 2016 +0100 + + pua_dialoginfo: reduce the log level of every call to dialog_publish + + Change the log level of calls to dialog_publish() from INFO to DBG + + (cherry picked from commit a5e89b42151ba3697835cff4a2a379422a9afc46) + +commit e8a063a7001bad32144765f12928cf188b773e20 +Author: Daniel-Constantin Mierla +Date: Sun May 15 08:52:29 2016 +0200 + + usrloc: coonect to db from rpc processes + + - evapi consumers are using rpc rank and there can be save/lookup + operations + - reported by GH #622 + + (cherry picked from commit ee11732bdc1637d646b772ce22d43bd571f7a736) + +commit c6740e84d2dd42e7aa0da33d18228c516573de46 +Author: Daniel-Constantin Mierla +Date: Sat May 14 10:11:33 2016 +0200 + + jansson: removed empty parameters section + + - added section ids + + (cherry picked from commit 92dcec82b4f7e0de07e06d51bd57d612c949241c) + +commit feaae5a731c35778d8de32a7c87baead2def4987 +Author: Daniel-Constantin Mierla +Date: Sat May 14 09:30:55 2016 +0200 + + acc_radius: added section ids in docbook + + (cherry picked from commit 38bdeee32afb895af3a759373e1c29a30e5e5560) + +commit 27e2343d5e7da9c03fd37ecbe49e126d4a753d75 +Author: Victor Seva +Date: Fri May 13 10:34:33 2016 +0200 + + dispatcher: fix compiler warning #612 + + > CC (gcc) [M dispatcher.so] dispatch.o + > dispatch.c: In function 'ds_set_attrs': + > dispatch.c:263:8: warning: 'tmp_rweight' may be used uninitialized in this function [-Wmaybe-uninitialized] + > int tmp_rweight; + > ^ + > make[3]: 'libkmi.so.1.0' is up to date. + + (cherry picked from commit 6dd4b1f83cb041a42571ef1355832661be0ae492) + +commit debffdc10887a0654ce1e6451dead14aa36083b2 +Author: Victor Seva +Date: Fri May 13 10:25:42 2016 +0200 + + dmq_usrloc: fix compiler warning #612 + + > CC (gcc) [M dmq_usrloc.so] usrloc_sync.o + > usrloc_sync.c: In function 'usrloc_dmq_handle_msg': + > usrloc_sync.c:403:12: warning: 'reg_id' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.reg_id = reg_id; + > ^ + > usrloc_sync.c:401:13: warning: 'methods' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.methods = methods; + > ^ + > usrloc_sync.c:405:19: warning: 'last_modified' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.last_modified = last_modified; + > ^ + > usrloc_sync.c:394:7: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.q = q; + > ^ + > usrloc_sync.c:399:12: warning: 'cflags' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.cflags = cflags; + > ^ + > usrloc_sync.c:397:11: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.flags = flags; + > ^ + > usrloc_sync.c:396:10: warning: 'cseq' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.cseq = cseq; + > ^ + > usrloc_sync.c:393:13: warning: 'expires' may be used uninitialized in this function [-Wmaybe-uninitialized] + > ci.expires = expires; + > ^ + > usrloc_sync.c:407:2: warning: 'action' may be used uninitialized in this function [-Wmaybe-uninitialized] + > switch(action) { + > ^ + > make[3]: 'libsrutils.so.1.0' is up to date. + + (cherry picked from commit c7c8d31e4a4f9640673099aa1589e3fe96fad558) + +commit 1740d3861d0bcabe3897285fc1f64629da1433a0 +Author: Victor Seva +Date: Thu May 12 22:08:28 2016 +0200 + + sms: fix compiler warning #612 (#617) + + * show error message if error in write + + > CC (clang) [M sms.so] libsms_modem.o + > libsms_modem.c:77:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] + > write(mdm->fd,cmd,cmd_len); + > ^~~~~ ~~~~~~~~~~~~~~~~~~~ + >1 warning generated. + (cherry picked from commit a61ff084bc87c7d3dd05b14afd35795b466d37dc) + +commit 644bc141ca91c86fdf83b0998558dd647e6a0693 +Author: Frank Carmickle +Date: Thu May 12 18:00:52 2016 +0200 + + tm: updated the reason text for canceled branches after one is answered + + - change answered elsewhere to call completed elsewhere + - "Call completed elsewhere", RFC3326, defines this as the string to send + - submited by William King , GH #610 + + (cherry picked from commit e75837afc7e146d0f43e637d394146c3f1d05eea) + +commit 99e1c33b1bb16959273114eebcf1cf134d75997d +Author: Kamailio Dev +Date: Thu Jun 9 15:46:27 2016 +0200 + + modules: readme files regenerated - dialog ... + +commit a3b6c3f836e8988b843eb25d5f553ff554821df8 +Author: Olle E. Johansson +Date: Thu Jun 9 15:42:42 2016 +0200 + + docbook Update location of our bug tracker + +commit b5d274b52619a935a71a346cb7cf24486a8474c5 +Author: Kamailio Dev +Date: Wed Jun 8 14:50:15 2016 +0200 + + modules: readme files regenerated - app_mono ... + +commit 42be15030909cf31cedbb3642e2a6b51b2b5ae9f +Author: Victor Seva +Date: Tue May 17 13:24:05 2016 +0200 + + xmlrpc: fix compiler warning #612 + + > CC (gcc) [M xmlrpc.so] xmlrpc.o + > In file included from /usr/include/strings.h:26:0, + > from xmlrpc.c:28: + > /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] + > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + + (cherry picked from commit 947fe8673c3014f4d011583bed95d44408b907f4) + +commit 253909bf673c0a59e7adf578bb5df73eb157d0f2 +Author: Daniel-Constantin Mierla +Date: Tue Jun 7 15:21:06 2016 +0200 + + tls: proper check of libssl versions used for compilation and available on system + + - shift out the last 12bits, being the patch version and status (see man + SSLeay) + - reported by Victor Seva, GH #662 + + (cherry picked from commit c38b4c7345a6806f48a0cdb07841e10bc962e1bf) + +commit bb07a9d6229bbd191078d3a886b82308d066dbda +Author: Olle E. Johansson +Date: Tue Jun 7 14:25:31 2016 +0200 + + dialog Document states of a dialog + + The states are stored in the state_column in the database, but was only explained in source code previously + + (cherry picked from commit 50346dbc671078cab8e1d9f21f410a96286c7a83) + +commit 9d4e2e1c987e2c5d15dd6f6c434e0467d678a46e +Author: Olle E. Johansson +Date: Tue Jun 7 14:05:17 2016 +0200 + + dialog Use correct default name for toroute_name database column + + (cherry picked from commit 6196309a05c5de13dab2606bd2e227cebd7fa477) + +commit 09cb608ee56ca4d336d5a02c8bf2fd5ea05ff4d0 +Author: Olle E. Johansson +Date: Tue Jun 7 13:48:52 2016 +0200 + + dialog fix typo in README and doc + + The call_id_column variable was named callid_column in the doc. + +commit 70a2ab1c64bc19d4b67e09b990b78a23593999ce +Author: jaybeepee +Date: Thu Jun 2 16:30:21 2016 +0200 + + modules/ims_usrloc_scscf: do not use DB functions if db_mode not enabled. + + (cherry picked from commit 06df7d591e56d48ddbc100e5be4dc917731fc1a4) + +commit 7a0de650d5d443f84fd3aeb8d6209663074dc6da +Author: grumvalski +Date: Sun Jun 5 08:27:37 2016 +0200 + + cnxcc: release credit_data in terminate_all_calls + + - GH #563 + + (cherry picked from commit d0bdaa7567240b18794ab7512b09a55767c44240) + +commit 12b0480169feab25ad68509c23f472155f10082b +Author: Victor Seva +Date: Fri Jun 3 13:55:42 2016 +0200 + + xmlrpc: remove redeclaration of snprintf and vsnprintf + + compilation was failling with clang: + + > CC (clang) [M xmlrpc.so] xmlrpc.o + > xmlrpc.c:152:5: error: expected parameter declarator + > int snprintf(char *str, size_t size, const char *format, ...); + > ^ + > /usr/include/x86_64-linux-gnu/bits/stdio2.h:69:39: note: expanded from macro 'snprintf' + > __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \ + > ^ + > /usr/include/features.h:329:31: note: expanded from macro '__USE_FORTIFY_LEVEL' + > # define __USE_FORTIFY_LEVEL 2 + > ^ + > xmlrpc.c:152:5: error: expected ')' + > /usr/include/x86_64-linux-gnu/bits/stdio2.h:69:39: note: expanded from macro 'snprintf' + > __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \ + > ^ + > /usr/include/features.h:329:31: note: expanded from macro '__USE_FORTIFY_LEVEL' + > # define __USE_FORTIFY_LEVEL 2 + > ^ + > xmlrpc.c:152:5: note: to match this '(' + > /usr/include/x86_64-linux-gnu/bits/stdio2.h:69:28: note: expanded from macro 'snprintf' + > __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \ + > ^ + > xmlrpc.c:152:5: error: conflicting types for '__builtin___snprintf_chk' + > int snprintf(char *str, size_t size, const char *format, ...); + > ^ + > /usr/include/x86_64-linux-gnu/bits/stdio2.h:69:3: note: expanded from macro 'snprintf' + > __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \ + > ^ + > xmlrpc.c:152:5: note: '__builtin___snprintf_chk' is a builtin with type 'int (char *, unsigned long, int, unsigned long, const char *, ...)' + > /usr/include/x86_64-linux-gnu/bits/stdio2.h:69:3: note: expanded from macro 'snprintf' + > __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \ + > ^ + > 3 errors generated. + + (cherry picked from commit 358de10a94bef4df6b1811ac8e88ea4e7919542c) + +commit e4e5ad4c674d1b27f0c68b7932b679b36e50c08d +Author: Victor Seva +Date: Fri Jun 3 11:17:07 2016 +0200 + + travis: remove rebuild twice for MEMDBG test + + (cherry picked from commit eb0d271af95ba0eb409716335d86351ea9e94343) + +commit 520b6fcd3ae75575c61b31a41d49ddaeab87f24f +Author: Victor Seva +Date: Fri Jun 3 11:12:50 2016 +0200 + + pkg/kamailio/deb: fix build rule for modules + + (cherry picked from commit 2115943fb5beb11a4b461c14f16dc42df8f32ab3) + +commit e5f76d42e98b70ad77b275c654b48a7f22b2df66 +Merge: 9bbe982 cad6a67 +Author: Olle E. Johansson +Date: Fri May 27 16:14:28 2016 +0200 + + Merge branch '4.4' of https://github.com/kamailio/kamailio into 4.4 + + Apologies + + * '4.4' of https://github.com/kamailio/kamailio: + uac: proper skip of uacreg records with empty attributes + uac: proper handling of empty attribute for uacreg refresh + Makefile.defs: detect gcc 6.x + +commit 9bbe98204295df6a0a2eadc6aaf539c6597f99b5 +Author: Olle E. Johansson +Date: Fri May 27 16:12:43 2016 +0200 + + sqlops Document return values for sql_query() + + (cherry picked from commit 639574e79200b5ffae4274b862ad595bd209da24) + +commit cad6a67a41c8085f126798859b38a64a7350fbf6 +Author: Daniel-Constantin Mierla +Date: Fri May 27 11:39:09 2016 +0200 + + uac: proper skip of uacreg records with empty attributes + + (cherry picked from commit 451b19597c5436ba481a49ecc89cc113829a9425) + +commit 3acfc0003915401f1a27120b9a5d329b2e52e78d +Author: Daniel-Constantin Mierla +Date: Fri May 27 11:14:26 2016 +0200 + + uac: proper handling of empty attribute for uacreg refresh + + - reg_db_set_attr() does a continue on empty value, but for this + operation was not used inside a loop + - reported by Dmitri Savolainen, GH #643 + + (cherry picked from commit a34b382002cf9efe13c913f547ffacec3bd7757f) + +commit 6a01019bf63cf897d2430d6ada085cd23465fa79 +Author: Daniel-Constantin Mierla +Date: Tue May 24 00:00:34 2016 +0200 + + Makefile.defs: detect gcc 6.x + + - reported by Anthony Messina, GH #633 + + (cherry picked from commit 1975ebdf37b9ffd325a38960bc0bf417466b432f) + +commit d6710fdaf1ea8705655025e231d27828ac89da82 +Author: Olle E. Johansson +Date: Tue May 24 10:42:38 2016 +0200 + + kex Fix spelling error and add "core" as an example of a module name + + (cherry picked from commit b5ef63f447e82caf95aa7f03d3c3c0e0e5de5503) + +commit 63dea59a507c1e949c4eb605ca5b56163b25c8d4 +Author: Federico Cabiddu +Date: Tue May 17 14:06:56 2016 +0200 + + http_async_client: workaround for dealing with HTTP Via format in replies + + (cherry picked from commit 2449f8591261b207c091f9a44ce6cf40bdb71ab6) + +commit 053c522e45fedea8bdb2ed92bd1de0a82331a7bf +Author: Daniel-Constantin Mierla +Date: Thu May 12 16:52:34 2016 +0200 + + cfgutils: proper check for return code looking up routing block in route_exists() + + - when the route block doesn't exist, route_lookup() returns -1, which + was used to access routing actions due to condition expecting 0 on not + found. The fix should avoid crashing by accessing invalid addresses. + Reported by Alex Balashov + - fixed return codes in the configuration file to follow the rules with + positive being evaluated to true and negative to false + - route_exists() returns the code returned by running actions, like a + classic sub-route execution + + (cherry picked from commit 6a3fc200b19500ddd6ed9a2236db6e21f777564a) + + ===================== 2016-05-10 Version 4.4.1 Released ===================== ===================== Changes Since Version 4.4.0 =========================== diff --git a/Makefile.defs b/Makefile.defs index 57e55cde6..48278aa2a 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -27,7 +27,7 @@ endif # verbose else ifeq (,$(main_makefile)) -# hack to automatically use config.mak in all the modules, without +# hack to automatically use config.mak in all the modules, without # changing the current module makefiles (which all include Makefile.defs): # if not called from the main makefile (module, lib or ut): # include config.mak, but if not present or incomplete (makefile_defs!=1) @@ -96,7 +96,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) # version number VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 1 +SUBLEVEL = 2 # memory manager switcher # 0 - f_malloc (fast malloc) @@ -149,7 +149,7 @@ OSREL_N:= $(shell echo $(OSREL) | sed -e 's/^[^0-9]*//' \ # TLS support -CORE_TLS ?= +CORE_TLS ?= # by default compile with tls hooks support (so that no ser recompile is # needed before the tls module can be used) TLS_HOOKS=1 @@ -176,7 +176,7 @@ INSTALL ?= install TAR ?= tar endif -INSTALL_TOUCH = touch # used to create the file first (good to +INSTALL_TOUCH = touch # used to create the file first (good to # make solaris install work) INSTALL_CFG = $(INSTALL) -m 644 INSTALL_BIN = $(INSTALL) -m 755 @@ -220,8 +220,8 @@ ifneq (,$(findstring gcc, $(CC_LONGVER))) # CC_VER:=$(word 1,$(CC)) $(shell $(CC) - --version|head -n 1|cut -d" " -f 3\ # |sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'\ # -e 's/^[^0-9].*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/') - # sed with POSIX.1 regex doesn't support |, + or ? - # (darwin, solaris ...) => this complicated expression + # sed with POSIX.1 regex doesn't support |, + or ? + # (darwin, solaris ...) => this complicated expression MKDEP=$(CC) -MM -MG #transform gcc version into 2.9x or 3.0 CC_SHORTVER:=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \ @@ -238,8 +238,10 @@ ifneq (,$(findstring gcc, $(CC_LONGVER))) -e 's/4\.[5-9]\..*/4.5+/' \ -e 's/4\.[5-9]$$/4.5+/' \ -e 's/5\.[0-9]\..*/5.0+/' \ - -e 's/5\.[0-9]$$/5.0+/') -ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + -e 's/5\.[0-9]$$/5.0+/' \ + -e 's/6\.[0-9]\..*/6.0+/' \ + -e 's/6\.[0-9]$$/6.0+/') +ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) # dependencies can be generated on-the-fly while compiling *.c CC_MKDEP_OPTS=-MMD -MP endif # 3.0 <= $(CC_SHORTVER) <= 4.x @@ -250,7 +252,7 @@ ifneq (, $(findstring Sun, $(CC_LONGVER))) CC_SHORTVER:=$(shell echo "$(CC_LONGVER)"|head -n 1| \ sed -e 's/.*\([0-9]\.[0-9]\).*/\1/g' ) CC_VER=$(CC) $(CC_SHORTVER) - MKDEP=$(CC) -xM1 + MKDEP=$(CC) -xM1 endif ifneq (, $(findstring Intel(R) C++ Compiler, $(CC_LONGVER))) @@ -260,7 +262,7 @@ ifneq (, $(findstring Intel(R) C++ Compiler, $(CC_LONGVER))) sed -e 's/.*Version \([0-9]\.[0-9]\.[0-9]*\).*/\1/g' ) CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 ) CC_VER=$(CC) $(CC_FULLVER) - MKDEP=$(CC) -MM + MKDEP=$(CC) -MM endif ifneq (, $(findstring clang, $(CC_LONGVER))) @@ -270,7 +272,7 @@ ifneq (, $(findstring clang, $(CC_LONGVER))) CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 ) CC_VER=$(CC) $(CC_FULLVER) CC_OPT=-O3 - MKDEP=$(CC) -MM + MKDEP=$(CC) -MM endif ifeq (,$(CC_NAME)) @@ -278,7 +280,7 @@ ifeq (,$(CC_NAME)) CC_NAME=$(CC) CC_SHORTVER=unknown CC_VER=unknown - MKDEP=gcc -MM + MKDEP=gcc -MM $(warning Unknown compiler $(CC)\; supported compilers: \ gcc, sun cc, intel icc ) endif @@ -517,8 +519,8 @@ data_target = $(prefix)/$(data_dir) # an implemetation of the "two levels segregated fit" malloc algorithm # -DDL_MALLOC # a malloc implementation based on Doug Lea's dl_malloc -# -DSF_MALLOC -# an experimental multi-CPU, pool based, multi-process safe version of +# -DSF_MALLOC +# an experimental multi-CPU, pool based, multi-process safe version of # F_MALLOC. Should give better performance on machines with lots of CPUs # after some tunning. # -DLL_MALLOC @@ -534,7 +536,7 @@ data_target = $(prefix)/$(data_dir) # -DUSE_SYSV_SEM # uses sys v sems for locking (slower & limited number) # -DUSE_PTHREAD_MUTEX -# uses pthread mutexes, faster than sys v or posix sems, but do not +# uses pthread mutexes, faster than sys v or posix sems, but do not # work on all systems inter-processes (e.g. linux) # -DUSE_POSIX_SEM # uses posix semaphores for locking (faster than sys v) @@ -546,7 +548,7 @@ data_target = $(prefix)/$(data_dir) # try busy waiting for a while and if the lock is still held go to # force reschedule (FAST_LOCK) # -DADAPTIVE_WAIT_LOOPS=number -# number of loops we busy wait, after "number" loops have elapsed we +# number of loops we busy wait, after "number" loops have elapsed we # force a reschedule (FAST_LOCK) # -DNOSMP # don't use smp compliant locking (faster but won't work on SMP machines) @@ -560,26 +562,26 @@ data_target = $(prefix)/$(data_dir) # -DDISABLE_NAGLE # disable the tcp Nagle algorithm (lower delay) # -DUSE_TLS -# compiles in tls support, requires -DUSE_TCP. Note: this is only +# compiles in tls support, requires -DUSE_TCP. Note: this is only # generic support (parsing a.s.o.), it does not include the actual # "tls engine". If you really want tls you need also either # -DCORE_TLS and a tls/ subdir with the tls code or -DTLS_HOOKS and # the tls module loaded. # -DCORE_TLS -# compiles tls in-core support. Requires -DUSE_TLS, conflicts +# compiles tls in-core support. Requires -DUSE_TLS, conflicts # -DTLS_HOOKS. Please use make CORE_TLS=1 instead (it will set all the # needed defines automatically and extra libraries needed for linking). # -DTLS_HOOKS # compile tls module support (support for having the "tls engine" in a # module). Requires -DUSE_TLS, conflicts -DCORE_TLS. # Please use make TLS_HOOKS=1 (or TLS_HOOKS=0 to for disabling) instead -# of setting -DTLS_HOOKS (it will set all the needed defines +# of setting -DTLS_HOOKS (it will set all the needed defines # automatically) # -DHAVE_RESOLV_RES # support for changing some of the resolver parameters present # (_res structure in ) # -DUSE_COMP -# compiles in comp=[sergz|sigcomp] support (parsing uri & via, +# compiles in comp=[sergz|sigcomp] support (parsing uri & via, # adding it to via, lumps a.s.o). WARNING: right now this option # is useless since the compression code doesn't exist yet. # -DHONOR_MADDR @@ -602,7 +604,7 @@ data_target = $(prefix)/$(data_dir) # if enabled profiling will be enabled for child processes # Don't forget to set PROFILE (see below) # -DNO_SIG_DEBUG -# turns off debugging messages in signal handlers (which might be +# turns off debugging messages in signal handlers (which might be # unsafe) # -DUSE_NAPTR # turns on naptr support (but must be also enabled from the config) @@ -666,7 +668,7 @@ C_DEFS= $(extra_defs) \ # you may also want to set -DPROFILING # WARNING: do not add mode=debug or mode=release anymore in the Makefile, -# use make mode=debug all instead. Anyway no by default ser is compiled w/ +# use make mode=debug all instead. Anyway no by default ser is compiled w/ # debugging symbols in all cases (-g). --andrei # memory managers and related debug mode @@ -736,7 +738,7 @@ ifeq ($(CC_NAME), gcc) else echo "as" ; \ fi\ fi) - + LDTYPE:=$(shell if $(LDPATH) -V 1>/dev/null 2>/dev/null; then \ if $(LDPATH) -V 2>&1|grep GNU >/dev/null; \ then echo gnu; \ @@ -825,7 +827,7 @@ ifeq ($(ARCH), alpha) endif ifeq ($(use_fast_lock), yes) - C_DEFS+= -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 + C_DEFS+= -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 found_lock_method=yes endif @@ -836,13 +838,13 @@ C_INCLUDES= ifeq ($(mode), release) #if i386 ifeq ($(ARCH), i386) - # if gcc -ifeq ($(CC_NAME), gcc) + # if gcc +ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS=-g $(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) $(call set_if_empty,CPUTYPE,athlon64) CFLAGS+=-m32 -minline-all-stringops \ -falign-loops \ @@ -857,7 +859,7 @@ $(call set_if_empty,CPUTYPE,athlon64) CFLAGS+=-m32 -minline-all-stringops \ -falign-loops \ -ftree-vectorize \ - -mtune=$(CPUTYPE) + -mtune=$(CPUTYPE) LDFLAGS+=-m32 else #if gcc 3.4+ @@ -865,7 +867,7 @@ ifeq ($(CC_SHORTVER), 3.4) $(call set_if_empty,CPUTYPE,athlon) CFLAGS+=-m32 -minline-all-stringops \ -falign-loops \ - -mtune=$(CPUTYPE) + -mtune=$(CPUTYPE) LDFLAGS+=-m32 else #if gcc 3.0+ @@ -879,7 +881,7 @@ else ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5]) $(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \ for better results) - + CFLAGS+=-m486 \ -malign-loops=4 else @@ -891,7 +893,7 @@ endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ else # CC_NAME, gcc ifeq ($(CC_NAME), clang) @@ -903,7 +905,7 @@ else # CC_NAME, clang ifeq ($(CC_NAME), icc) C_DEFS+=-DCC_GCC_LIKE_ASM CFLAGS=-g -O3 -ipo -ipo_obj -unroll $(PROFILE) \ - -tpp6 -xK #-openmp #optimize for PIII + -tpp6 -xK #-openmp #optimize for PIII # -prefetch doesn't seem to work #( ty to inline acroos files, unroll loops,prefetch, # optimize for PIII, use PIII instructions & vect., @@ -918,14 +920,14 @@ endif #ARCH, i386 #x86_64 ifeq ($(ARCH), x86_64) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS=-g $(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) #if gcc 4.5+ # don't add '-mtune=$(CPUTYPE)' - gcc failure -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+ 6.0+)) $(call set_if_empty,CPUTYPE,opteron) CFLAGS+=-m64 -minline-all-stringops \ -falign-loops \ @@ -949,21 +951,21 @@ $(call set_if_empty,CPUTYPE,opteron) CFLAGS+=-m64 -minline-all-stringops \ -falign-loops \ -ftree-vectorize \ - -mtune=$(CPUTYPE) + -mtune=$(CPUTYPE) LDFLAGS+=-m64 else #if gcc 3.4 ifeq ($(CC_SHORTVER), 3.4) $(call set_if_empty,CPUTYPE,athlon64) CFLAGS+=-m64 -minline-all-stringops \ - -falign-loops + -falign-loops LDFLAGS+=-m64 else #if gcc 3.0 ifeq ($(CC_SHORTVER), 3.0) $(call set_if_empty,CPUTYPE,athlon64) CFLAGS+=-minline-all-stringops \ - -falign-loops + -falign-loops #-mcpu=$(CPUTYPE) \ # not working on all x86_64 gccs #-mcpu=athlon #-m64 on x86_64/x86 works starting with gcc 3.2 @@ -971,7 +973,7 @@ else ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5]) $(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \ for better results) - + CFLAGS+=-m486 \ -malign-loops=4 else @@ -984,20 +986,20 @@ endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x endif # CC_SHORTVER, 4.2+ -endif # CC_SHORTVER, 5.0+, 4.5+ +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ else # CC_NAME, gcc ifeq ($(CC_NAME), clang) $(call set_if_empty,CPUTYPE,opteron) C_DEFS+=-DCC_GCC_LIKE_ASM CFLAGS+=-g -m64 \ - $(CC_OPT) + $(CC_OPT) LDFLAGS+=-m64 else # CC_NAME, clang ifeq ($(CC_NAME), icc) C_DEFS+=-DCC_GCC_LIKE_ASM CFLAGS=-g -O3 -ipo -ipo_obj -unroll $(PROFILE) \ - -tpp6 -xK #-openmp #optimize for PIII + -tpp6 -xK #-openmp #optimize for PIII # -prefetch doesn't seem to work #( ty to inline acroos files, unroll loops,prefetch, # optimize for PIII, use PIII instructions & vect., @@ -1018,9 +1020,9 @@ ifeq ($(CC_NAME), gcc) #common stuff CFLAGS=-g $(CC_OPT) -funroll-loops $(PROFILE) \ #-Wcast-align \ - #-Wmissing-prototypes - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #-Wmissing-prototypes + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) $(call set_if_empty,CPUTYPE,ultrasparc) #use 32bit for now CFLAGS+=-m64 -mcpu=ultrasparc \ @@ -1066,28 +1068,28 @@ $(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \ ifneq ($(OS), netbsd) # on netbsd/sparc64, gcc 2.95.3 does not compile # ser with -mv8 - CFLAGS+= -mv9 + CFLAGS+= -mv9 # -m64/-m32 on sparc works starting with gcc 3.0 endif ifeq ($(ASTYPE), solaris) CFLAGS+= -Wa,-xarch=v8plus -endif +endif else #CC_SHORTVER, 2.9x #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - - CFLAGS+= -mv9 + + CFLAGS+= -mv9 ifeq ($(ASTYPE), solaris) CFLAGS+= -Wa,-xarch=v8plus -endif - +endif + endif #CC_SHORTVER, 2.9x endif #CC_SHORTVER, 3.0 endif #CC_SHORTVER, 3.4 endif #CC_SHORTVER, 4.x -endif #CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else #CC_NAME, gcc ifeq ($(CC_NAME), suncc) C_DEFS+=-DSPARC64_MODE @@ -1109,9 +1111,9 @@ ifeq ($(CC_NAME), gcc) #common stuff CFLAGS=-g $(CC_OPT) -funroll-loops $(PROFILE) \ #-Wcast-align \ - #-Wmissing-prototypes + #-Wmissing-prototypes #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) $(call set_if_empty,CPUTYPE,v8) #use 32bit for now CFLAGS+= -mtune=$(CPUTYPE) \ @@ -1147,13 +1149,13 @@ else #CC_SHORTVER, 2.9x #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif #CC_SHORTVER, 2.9x endif #CC_SHORTVER, 3.0 endif #CC_SHORTVER, 3.4 endif #CC_SHORTVER, 4.x -endif #CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else #CC_NAME, gcc ifeq ($(CC_NAME), suncc) CFLAGS+= -g -xO5 -fast -native -xCC \ @@ -1168,20 +1170,20 @@ endif #ARCH, sparc #if ipaq/netwinder ifeq ($(ARCH), arm) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS=-marm -march=armv5t $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE) #if gcc 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) CFLAGS+= -ftree-vectorize -fno-strict-overflow - # not supported on arm: -minline-all-stringops + # not supported on arm: -minline-all-stringops else #if gcc 4.x+ ifeq ($(CC_SHORTVER), 4.x) CFLAGS+= -ftree-vectorize - # not supported on arm: -minline-all-stringops + # not supported on arm: -minline-all-stringops else #if gcc 3.4+ ifeq ($(CC_SHORTVER), 3.4) @@ -1189,41 +1191,41 @@ ifeq ($(CC_SHORTVER), 3.4) else #if gcc 3.0 ifeq ($(CC_SHORTVER), 3.0) - CFLAGS+= + CFLAGS+= #-mcpu=athlon else ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5]) $(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \ for better results) - + CFLAGS+= else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) endif #CC_NAME, gcc -endif #ARCH, arm +endif #ARCH, arm - #if armv6 cpu + #if armv6 cpu ifeq ($(ARCH), arm6) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \ $(PROFILE) - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) CFLAGS+= -ftree-vectorize -fno-strict-overflow else #if gcc 4.x+ @@ -1236,25 +1238,25 @@ ifeq ($(CC_SHORTVER), 3.4) else #if gcc 3.0 ifeq ($(CC_SHORTVER), 3.0) - CFLAGS+= + CFLAGS+= #-mcpu=athlon else ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5]) $(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \ for better results) - + CFLAGS+= else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) @@ -1263,13 +1265,13 @@ endif #ARCH, arm6 #if mips (R3000) ifeq ($(ARCH), mips) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS=$(CC_OPT) -funroll-loops $(PROFILE) - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) CFLAGS+=-mfp32 -march=r3000 \ -ftree-vectorize -fno-strict-overflow # not supported on mips: -minline-all-stringops @@ -1291,19 +1293,19 @@ else ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5]) $(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \ for better results) - + CFLAGS+=-march=r3000 else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) @@ -1312,13 +1314,13 @@ endif #ARCH, mips #if >=mips2 (R4000, R5000, R6000 ....) ifeq ($(ARCH), mips2) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE) - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) CFLAGS+=-ftree-vectorize -fno-strict-overflow # not supported on mips: -minline-all-stringops else @@ -1343,13 +1345,13 @@ else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) @@ -1358,13 +1360,13 @@ endif #ARCH, mips2 #if >=mips64 ifeq ($(ARCH), mips64) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE) - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) CFLAGS+=-ftree-vectorize -fno-strict-overflow # not supported on mips: -minline-all-stringops @@ -1390,13 +1392,13 @@ else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) @@ -1405,19 +1407,19 @@ endif #ARCH, mips64 #if alpha ifeq ($(ARCH), alpha) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE) #if gcc 5.0+, 4.5 or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) CFLAGS+= -fno-strict-overflow # not supported: -minline-all-stringops else #if gcc 4.0+ ifeq ($(CC_SHORTVER), 4.x) - CFLAGS+= + CFLAGS+= # not supported: -minline-all-stringops else #if gcc 3.4+ @@ -1436,28 +1438,28 @@ else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) endif #CC_NAME, gcc -endif #ARCH, alpha +endif #ARCH, alpha #if ppc ifeq ($(ARCH), ppc) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS= - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) $(call set_if_empty,CPUTYPE,powerpc) ifeq ($(NOALTIVEC),) CFLAGS += $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE) @@ -1493,28 +1495,28 @@ else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) endif #CC_NAME, gcc -endif #ARCH, ppc +endif #ARCH, ppc #if ppc64 ifeq ($(ARCH), ppc64) - # if gcc + # if gcc ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff CFLAGS= $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE) - #if gcc 5.0+, 4.5+ or 4.2+ -ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER)))) + #if gcc 6.0+, 5.0+, 4.5+ or 4.2+ +ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER)))) $(call set_if_empty,CPUTYPE,powerpc64) CFLAGS+=-ftree-vectorize \ -fno-strict-overflow \ @@ -1542,18 +1544,18 @@ else #really old version $(warning You are using an old and unsupported gcc \ version ($(CC_SHORTVER)), compile at your own risk!) - + endif # CC_SHORTVER, 2.9x endif # CC_SHORTVER, 3.0 endif # CC_SHORTVER, 3.4 endif # CC_SHORTVER, 4.x -endif # CC_SHORTVER, 5.0+, 4.5+ or 4.2+ - +endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+ + else # CC_NAME, gcc #other compilers $(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc) endif #CC_NAME, gcc -endif #ARCH, ppc +endif #ARCH, ppc CFLAGS+= $(CC_EXTRA_OPTS) @@ -1567,9 +1569,9 @@ ifeq ($(LDTYPE), solaris) LIB_LDFLAGS:=-G $(LDFLAGS) LIB_SONAME=-Wl,-h, LD_RPATH=-Wl,-R, -else +else #gcc and maybe others, => gnu ld - LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE) + LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE) MOD_LDFLAGS:=-shared $(LDFLAGS) LIB_LDFLAGS:=-shared $(LDFLAGS) LIB_SONAME=-Wl,-soname, @@ -1578,7 +1580,7 @@ endif endif ifeq ($(CC_NAME), icc) #gcc and maybe others - LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE) + LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE) MOD_LDFLAGS:=-shared $(LDFLAGS) LIB_LDFLAGS:=-shared $(LDFLAGS) LIB_SONAME=-Wl,-soname, @@ -1598,10 +1600,10 @@ endif ifeq ($(CC_NAME), clang) LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE) - MOD_LDFLAGS:=-shared $(LDFLAGS) - LIB_LDFLAGS:=-shared $(LDFLAGS) - LIB_SONAME=-Wl,-soname, - LD_RPATH=-Wl,-rpath, + MOD_LDFLAGS:=-shared $(LDFLAGS) + LIB_LDFLAGS:=-shared $(LDFLAGS) + LIB_SONAME=-Wl,-soname, + LD_RPATH=-Wl,-rpath, endif LDFLAGS+= $(LD_EXTRA_OPTS) @@ -1724,8 +1726,8 @@ ifeq ($(OS), linux) LIBS+=-lpthread endif endif - # check for >= 2.5.44 + # check for >= 2.5.44 ifeq ($(shell [ $(OSREL_N) -ge 2005044 ] && echo has_epoll), has_epoll) ifeq ($(NO_EPOLL),) C_DEFS+=-DHAVE_EPOLL @@ -1824,7 +1826,7 @@ ifeq ($(CC_NAME), suncc) endif OLD_SOLARIS= $(shell echo "$(OSREL)" | \ sed -e 's/^5\.[0-6][^0-9]*$$/yes/' ) - LIBS+= -L$(LOCALBASE)/lib -lxnet -lsocket -lnsl + LIBS+= -L$(LOCALBASE)/lib -lxnet -lsocket -lnsl ifeq ($(OLD_SOLARIS), yes) LIBS+=-lposix4 else @@ -1903,7 +1905,7 @@ ifeq ($(OS), openbsd) # unfortunately pthread is needed for sigwait LIBS= -lpthread endif # if opensd - + ifeq ($(OS), netbsd) C_DEFS+=-DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 \ -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM @@ -1924,7 +1926,7 @@ ifeq ($(OS), netbsd) C_DEFS+=-DHAVE_SELECT endif YACC=yacc - LIBS= + LIBS= endif # OS X support, same as freebsd @@ -1951,7 +1953,7 @@ ifeq ($(OS), darwin) C_DEFS+=-DHAVE_SELECT endif LDFLAGS= # darwin doesn't like -O2 or -E - # the modules uses symbols from ser => either + # the modules uses symbols from ser => either # -flat_namespace -undefined_suppress or -bundle_loader ../../$(MAIN_NAME) MOD_LDFLAGS:= -bundle -flat_namespace -undefined suppress # for libs using symbols from ser (e.g srdb2, kcore a.s.o) we @@ -2015,7 +2017,7 @@ endif # ifeq ($(makefile_defs), 1) # if incomplete or missing config.mak, or already exported vars, don't # try to export/re-export -ifeq ($(makefile_defs),1) +ifeq ($(makefile_defs),1) ifneq ($(exported_vars),1) diff --git a/autover.h b/autover.h index 3711d73e1..b5db8b467 100644 --- a/autover.h +++ b/autover.h @@ -2,6 +2,6 @@ * DO NOT EDIT IT */ -#define REPO_VER "90be8b" -#define REPO_HASH "90be8b" +#define REPO_VER "892ad6" +#define REPO_HASH "892ad6" #define REPO_STATE "" diff --git a/docbook/entities.xml b/docbook/entities.xml index bf1b95249..fd88da4b3 100644 --- a/docbook/entities.xml +++ b/docbook/entities.xml @@ -16,7 +16,7 @@ - + diff --git a/dprint.h b/dprint.h index 5f03445fe..bc114885b 100644 --- a/dprint.h +++ b/dprint.h @@ -184,11 +184,11 @@ void log_prefix_init(void); #ifdef NO_LOG # ifdef __SUNPRO_C -# define LOG__(facility, level, lname, prefix, fmt, ...) -# define LOG_(facility, level, prefix, fmt, ...) +# define LOG__(facility, level, lname, prefix, ...) +# define LOG_(facility, level, prefix, ...) # define LOG(level, fmt, ...) -# define LOG_FC(facility, level, fmt, ...) -# define LOG_LN(level, lname, fmt, ...) +# define LOG_FC(facility, level, ...) +# define LOG_LN(level, lname, ...) # else # define LOG__(facility, level, lname, prefix, fmt, args...) # define LOG_(facility, level, prefix, fmt, args...) @@ -212,78 +212,78 @@ void log_prefix_init(void); # ifdef __SUNPRO_C # define LOG__(facility, level, lname, prefix, fmt, ...) \ do { \ - if (unlikely(get_debug_level(LOG_MNAME, LOG_MNAME_LEN) >= (level) && \ - DPRINT_NON_CRIT)) { \ + if (get_debug_level(LOG_MNAME, LOG_MNAME_LEN) >= (level) && \ + DPRINT_NON_CRIT) { \ + int __llevel; \ + __llevel = ((level)L_DBG)?L_DBG:level); \ DPRINT_CRIT_ENTER; \ - if (likely(((level) >= L_ALERT) && ((level) <= L_DBG))){ \ - if (unlikely(log_stderr)) { \ - if (unlikely(log_color)) dprint_color(level); \ - fprintf(stderr, "%2d(%d) %s: %s" fmt, \ - process_no, my_pid(), \ - (lname)?(lname):LOG_LEVEL2NAME(level), (prefix), \ - __VA_ARGS__); \ - if (unlikely(log_color)) dprint_color_reset(); \ + if (unlikely(log_stderr)) { \ + if (unlikely(log_color)) dprint_color(__llevel); \ + if(unlikely(log_prefix_val)) { \ + fprintf(stderr, "%.*s%2d(%d) %s: %s" fmt, \ + log_prefix_val->len, log_prefix_val->s, \ + process_no, my_pid(), \ + (lname)?(lname):LOG_LEVEL2NAME(__llevel), \ + (prefix) , __VA_ARGS__);\ } else { \ - syslog(LOG2SYSLOG_LEVEL(level) | \ - (((facility) != DEFAULT_FACILITY) ? \ - (facility) : \ - get_debug_facility(LOG_MNAME, LOG_MNAME_LEN)), \ - "%s: %s" fmt, \ - (lname)?(lname):LOG_LEVEL2NAME(level),\ - (prefix), __VA_ARGS__); \ + fprintf(stderr, "%2d(%d) %s: %s" fmt, \ + process_no, my_pid(), \ + (lname)?(lname):LOG_LEVEL2NAME(__llevel), \ + (prefix) , __VA_ARGS__);\ } \ + if (unlikely(log_color)) dprint_color_reset(); \ } else { \ - if (log_stderr) { \ - if (unlikely(log_color)) dprint_color(level); \ - fprintf(stderr, "%2d(%d) %s" fmt, \ - process_no, my_pid(), \ - (prefix), __VA_ARGS__); \ - if (unlikely(log_color)) dprint_color_reset(); \ + if(unlikely(log_prefix_val)) { \ + _km_log_func(LOG2SYSLOG_LEVEL(__llevel) |\ + (((facility) != DEFAULT_FACILITY) ? \ + (facility) : \ + get_debug_facility(LOG_MNAME, LOG_MNAME_LEN)), \ + "%.*s%s: %s" fmt,\ + log_prefix_val->len, log_prefix_val->s, \ + (lname)?(lname):LOG_LEVEL2NAME(__llevel),\ + (prefix) , __VA_ARGS__); \ } else { \ - if ((level) diff --git a/lib/srutils/sha256.c b/lib/srutils/sha256.c index 90efd157f..2b405511a 100644 --- a/lib/srutils/sha256.c +++ b/lib/srutils/sha256.c @@ -610,7 +610,7 @@ void sr_SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { *context->buffer = 0x80; } /* Set the bit count: */ - *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; + MEMCPY_BCOPY(&(context->buffer[SHA256_SHORT_BLOCK_LENGTH]), &(context->bitcount), sizeof(sha2_word64)); /* Final transform: */ SHA256_Transform(context, (sha2_word32*)context->buffer); @@ -927,8 +927,8 @@ void SHA512_Last(SHA512_CTX* context) { *context->buffer = 0x80; } /* Store the length of input data (in bits): */ - *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; - *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; + MEMCPY_BCOPY(&(context->buffer[SHA512_SHORT_BLOCK_LENGTH+0]), &(context->bitcount[1]), sizeof(sha2_word64)); + MEMCPY_BCOPY(&(context->buffer[SHA512_SHORT_BLOCK_LENGTH+8]), &(context->bitcount[0]), sizeof(sha2_word64)); /* Final transform: */ SHA512_Transform(context, (sha2_word64*)context->buffer); diff --git a/mem/f_malloc.c b/mem/f_malloc.c index 6afe7f70c..764e79d5a 100644 --- a/mem/f_malloc.c +++ b/mem/f_malloc.c @@ -262,19 +262,19 @@ static inline void fm_insert_free(struct fm_block* qm, struct fm_frag* frag) * \param size fragement size */ static inline -#ifdef DBG_F_MALLOC +#ifdef DBG_F_MALLOC void fm_split_frag(struct fm_block* qm, struct fm_frag* frag, - unsigned long size, + size_t size, const char* file, const char* func, unsigned int line, const char* mname) #else void fm_split_frag(struct fm_block* qm, struct fm_frag* frag, - unsigned long size) + size_t size) #endif { - unsigned long rest; + size_t rest; struct fm_frag* n; - + rest=frag->size-size; #ifdef MEM_FRAG_AVOIDANCE if ((rest> (FRAG_OVERHEAD+F_MALLOC_OPTIMIZE))|| @@ -316,14 +316,15 @@ struct fm_block* fm_malloc_init(char* address, unsigned long size, int type) char* end; struct fm_block* qm; unsigned long init_overhead; - + /* make address and size multiple of 8*/ start=(char*)ROUNDUP((unsigned long) address); DBG("fm_malloc_init: F_OPTIMIZE=%lu, /ROUNDTO=%lu\n", F_MALLOC_OPTIMIZE, F_MALLOC_OPTIMIZE/ROUNDTO); DBG("fm_malloc_init: F_HASH_SIZE=%lu, fm_block size=%lu\n", - F_HASH_SIZE, (long)sizeof(struct fm_block)); - DBG("fm_malloc_init(%p, %lu), start=%p\n", address, size, start); + F_HASH_SIZE, (unsigned long)sizeof(struct fm_block)); + DBG("fm_malloc_init(%p, %lu), start=%p\n", address, (unsigned long)size, + start); if (sizefunc=func; frag->mname=mname; frag->line=line; - MDBG("fm_malloc(%p, %lu) returns address %p \n", qm, size, + MDBG("fm_malloc(%p, %lu) returns address %p \n", qm, (unsigned long)size, (char*)frag+sizeof(struct fm_frag)); #endif frag->check=ST_CHECK_PATTERN; @@ -625,25 +638,25 @@ void fm_free(void* qmp, void* p) * \return reallocated memory block */ #ifdef DBG_F_MALLOC -void* fm_realloc(void* qmp, void* p, unsigned long size, +void* fm_realloc(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char *mname) #else -void* fm_realloc(void* qmp, void* p, unsigned long size) +void* fm_realloc(void* qmp, void* p, size_t size) #endif { struct fm_block* qm; struct fm_frag *f; - unsigned long diff; - unsigned long orig_size; + size_t diff; + size_t orig_size; struct fm_frag *n; void *ptr; qm = (struct fm_block*)qmp; #ifdef DBG_F_MALLOC - MDBG("fm_realloc(%p, %p, %lu) called from %s: %s(%d)\n", qm, p, size, - file, func, line); + MDBG("fm_realloc(%p, %p, %lu) called from %s: %s(%d)\n", qm, p, + (unsigned long)size, file, func, line); if ((p)&&(p>(void*)qm->last_frag || p<(void*)qm->first_frag)){ LOG(L_CRIT, "BUG: fm_free: bad pointer %p (out of memory block!) - " "aborting\n", p); @@ -675,7 +688,8 @@ void* fm_realloc(void* qmp, void* p, unsigned long size) if (f->size > size){ /* shrink */ #ifdef DBG_F_MALLOC - MDBG("fm_realloc: shrinking from %lu to %lu\n", f->size, size); + MDBG("fm_realloc: shrinking from %lu to %lu\n", f->size, + (unsigned long)size); fm_split_frag(qm, f, size, file, "frag. from fm_realloc", line, mname); #else fm_split_frag(qm, f, size); @@ -683,7 +697,8 @@ void* fm_realloc(void* qmp, void* p, unsigned long size) }else if (f->sizesize, size); + MDBG("fm_realloc: growing from %lu to %lu\n", f->size, + (unsigned long)size); #endif diff=size-f->size; n=FRAG_NEXT(f); @@ -715,6 +730,14 @@ void* fm_realloc(void* qmp, void* p, unsigned long size) if (ptr){ /* copy, need by libssl */ memcpy(ptr, p, orig_size); + } else { +#ifdef DBG_F_MALLOC + LOG(L_ERR, "fm_realloc(%p, %lu) called from %s: %s(%d), module: %s; fm_malloc() failed!\n", + qm, (unsigned long)size, file, func, line, mname); +#else + LOG(L_ERR, "fm_realloc(%p, %lu); fm_malloc() failed!\n", + qm, (unsigned long)size); +#endif } #ifdef DBG_F_MALLOC fm_free(qm, p, file, func, line, mname); @@ -727,7 +750,7 @@ void* fm_realloc(void* qmp, void* p, unsigned long size) /* do nothing */ #ifdef DBG_F_MALLOC MDBG("fm_realloc: doing nothing, same size: %lu - %lu\n", - f->size, size); + f->size, (unsigned long)size); #endif } #ifdef DBG_F_MALLOC @@ -1080,7 +1103,7 @@ static struct fm_block *_fm_shm_block = 0; /*SHM wrappers to sync the access to memory block*/ #ifdef DBG_F_MALLOC -void* fm_shm_malloc(void* qmp, unsigned long size, +void* fm_shm_malloc(void* qmp, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1089,7 +1112,7 @@ void* fm_shm_malloc(void* qmp, unsigned long size, shm_unlock(); return r; } -void* fm_shm_realloc(void* qmp, void* p, unsigned long size, +void* fm_shm_realloc(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1098,7 +1121,7 @@ void* fm_shm_realloc(void* qmp, void* p, unsigned long size, shm_unlock(); return r; } -void* fm_shm_resize(void* qmp, void* p, unsigned long size, +void* fm_shm_resize(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1116,7 +1139,7 @@ void fm_shm_free(void* qmp, void* p, const char* file, const char* func, shm_unlock(); } #else -void* fm_shm_malloc(void* qmp, unsigned long size) +void* fm_shm_malloc(void* qmp, size_t size) { void *r; shm_lock(); @@ -1124,7 +1147,7 @@ void* fm_shm_malloc(void* qmp, unsigned long size) shm_unlock(); return r; } -void* fm_shm_realloc(void* qmp, void* p, unsigned long size) +void* fm_shm_realloc(void* qmp, void* p, size_t size) { void *r; shm_lock(); @@ -1132,7 +1155,7 @@ void* fm_shm_realloc(void* qmp, void* p, unsigned long size) shm_unlock(); return r; } -void* fm_shm_resize(void* qmp, void* p, unsigned long size) +void* fm_shm_resize(void* qmp, void* p, size_t size) { void *r; shm_lock(); diff --git a/mem/f_malloc.h b/mem/f_malloc.h index cf6f56b27..cfd471941 100644 --- a/mem/f_malloc.h +++ b/mem/f_malloc.h @@ -134,11 +134,11 @@ struct fm_block* fm_malloc_init(char* address, unsigned long size, int type); * \return address of allocated memory */ #ifdef DBG_F_MALLOC -void* fm_malloc(void* qmp, unsigned long size, +void* fm_malloc(void* qmp, size_t size, const char* file, const char* func, unsigned int line, const char* mname); #else -void* fm_malloc(void* qmp, unsigned long size); +void* fm_malloc(void* qmp, size_t size); #endif @@ -167,10 +167,10 @@ void fm_free(void* qmp, void* p); * \return reallocated memory block */ #ifdef DBG_F_MALLOC -void* fm_realloc(void* qmp, void* p, unsigned long size, +void* fm_realloc(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char *mname); #else -void* fm_realloc(void* qmp, void* p, unsigned long size); +void* fm_realloc(void* qmp, void* p, size_t size); #endif diff --git a/mem/memapi.h b/mem/memapi.h index 28e9f8626..2e1b7fe64 100644 --- a/mem/memapi.h +++ b/mem/memapi.h @@ -20,27 +20,29 @@ #ifndef _sr_mem_api_ #define _sr_mem_api_ +#include + #include "src_loc.h" #include "meminfo.h" #include "memdbg.h" #ifdef DBG_SR_MEMORY -typedef void* (*sr_malloc_f)(void* mbp, unsigned long size, +typedef void* (*sr_malloc_f)(void* mbp, size_t size, const char* file, const char* func, unsigned int line, const char* mname); typedef void (*sr_free_f)(void* mbp, void* p, const char* file, const char* func, unsigned int line, const char* mname); -typedef void* (*sr_realloc_f)(void* mbp, void* p, unsigned long size, +typedef void* (*sr_realloc_f)(void* mbp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname); -typedef void* (*sr_resize_f)(void* mbp, void* p, unsigned long size, +typedef void* (*sr_resize_f)(void* mbp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname); #else /*DBG_SR_MEMORY*/ -typedef void* (*sr_malloc_f)(void* mbp, unsigned long size); +typedef void* (*sr_malloc_f)(void* mbp, size_t size); typedef void (*sr_free_f)(void* mbp, void* p); -typedef void* (*sr_realloc_f)(void* mbp, void* p, unsigned long size); -typedef void* (*sr_resize_f)(void* mbp, void* p, unsigned long size); +typedef void* (*sr_realloc_f)(void* mbp, void* p, size_t size); +typedef void* (*sr_resize_f)(void* mbp, void* p, size_t size); #endif /*DBG_SR_MEMORY*/ diff --git a/mem/q_malloc.c b/mem/q_malloc.c index 36cc15a7b..4b8014cf9 100644 --- a/mem/q_malloc.c +++ b/mem/q_malloc.c @@ -188,8 +188,9 @@ struct qm_block* qm_malloc_init(char* address, unsigned long size, int type) DBG("qm_malloc_init: QM_OPTIMIZE=%lu, /ROUNDTO=%lu\n", QM_MALLOC_OPTIMIZE, QM_MALLOC_OPTIMIZE/ROUNDTO); DBG("qm_malloc_init: QM_HASH_SIZE=%lu, qm_block size=%lu\n", - QM_HASH_SIZE, (long)sizeof(struct qm_block)); - DBG("qm_malloc_init(%p, %lu), start=%p\n", address, size, start); + QM_HASH_SIZE, (unsigned long)sizeof(struct qm_block)); + DBG("qm_malloc_init(%p, %lu), start=%p\n", address, + (unsigned long)size, start); if (sizecheck2=END_CHECK_PATTERN2;*/ MDBG("qm_malloc(%p, %lu) returns address %p frag. %p (size=%lu) on %d" " -th hit\n", - qm, size, (char*)f+sizeof(struct qm_frag), f, f->size, list_cntr ); + qm, (unsigned long)size, (char*)f+sizeof(struct qm_frag), f, + f->size, list_cntr); #endif #ifdef MALLOC_STATS if(qm->type==MEM_TYPE_PKG) { @@ -413,6 +420,15 @@ void* qm_malloc(void* qmp, unsigned long size) #endif return (char*)f+sizeof(struct qm_frag); } + +#ifdef DBG_QM_MALLOC + LOG(L_ERR, "qm_malloc(%p, %lu) called from %s: %s(%d), module: %s; Free fragment not found!\n", + qm, (unsigned long)size, file, func, line, mname); +#else + LOG(L_ERR, "qm_malloc(%p, %lu); Free fragment not found!\n", + qm, (unsigned long)size); +#endif + return 0; } @@ -427,7 +443,7 @@ void qm_free(void* qmp, void* p) { struct qm_block* qm; struct qm_frag* f; - unsigned long size; + size_t size; #ifdef MEM_JOIN_FREE struct qm_frag* next; struct qm_frag* prev; @@ -542,24 +558,25 @@ void qm_free(void* qmp, void* p) #ifdef DBG_QM_MALLOC -void* qm_realloc(void* qmp, void* p, unsigned long size, +void* qm_realloc(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char *mname) #else -void* qm_realloc(void* qmp, void* p, unsigned long size) +void* qm_realloc(void* qmp, void* p, size_t size) #endif { struct qm_block* qm; struct qm_frag* f; - unsigned long diff; - unsigned long orig_size; + size_t diff; + size_t orig_size; struct qm_frag* n; void* ptr; qm = (struct qm_block*)qmp; #ifdef DBG_QM_MALLOC - MDBG("qm_realloc(%p, %p, %lu) called from %s: %s(%d)\n", qm, p, size, + MDBG("qm_realloc(%p, %p, %lu) called from %s: %s(%d)\n", + qm, p, (unsigned long)size, file, func, line); if ((p)&&(p>(void*)qm->last_frag_end || p<(void*)qm->first_frag)){ LOG(L_CRIT, "BUG: qm_free: bad pointer %p (out of memory block!) - " @@ -600,7 +617,8 @@ void* qm_realloc(void* qmp, void* p, unsigned long size) orig_size=f->size; /* shrink */ #ifdef DBG_QM_MALLOC - MDBG("qm_realloc: shrinking from %lu to %lu\n", f->size, size); + MDBG("qm_realloc: shrinking from %lu to %lu\n", + f->size, (unsigned long)size); if(split_frag(qm, f, size, file, "fragm. from qm_realloc", line, mname)!=0){ MDBG("qm_realloc : shrinked successful\n"); #else @@ -617,7 +635,8 @@ void* qm_realloc(void* qmp, void* p, unsigned long size) }else if (f->size < size){ /* grow */ #ifdef DBG_QM_MALLOC - MDBG("qm_realloc: growing from %lu to %lu\n", f->size, size); + MDBG("qm_realloc: growing from %lu to %lu\n", + f->size, (unsigned long)size); #endif orig_size=f->size; diff=size-f->size; @@ -653,6 +672,14 @@ void* qm_realloc(void* qmp, void* p, unsigned long size) if (ptr){ /* copy, need by libssl */ memcpy(ptr, p, orig_size); + } else { +#ifdef DBG_QM_MALLOC + LOG(L_ERR, "qm_realloc(%p, %lu) called from %s: %s(%d), module: %s; qm_malloc() failed!\n", + qm, (unsigned long)size, file, func, line, mname); +#else + LOG(L_ERR, "qm_realloc(%p, %lu); qm_malloc() failed!\n", + qm, (unsigned long)size); +#endif } #ifdef DBG_QM_MALLOC qm_free(qm, p, file, func, line, mname); @@ -665,7 +692,7 @@ void* qm_realloc(void* qmp, void* p, unsigned long size) /* do nothing */ #ifdef DBG_QM_MALLOC MDBG("qm_realloc: doing nothing, same size: %lu - %lu\n", - f->size, size); + f->size, (unsigned long)size); #endif } #ifdef DBG_QM_MALLOC @@ -1045,7 +1072,7 @@ static struct qm_block *_qm_shm_block = 0; /*SHM wrappers to sync the access to memory block*/ #ifdef DBG_QM_MALLOC -void* qm_shm_malloc(void* qmp, unsigned long size, +void* qm_shm_malloc(void* qmp, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1054,7 +1081,7 @@ void* qm_shm_malloc(void* qmp, unsigned long size, shm_unlock(); return r; } -void* qm_shm_realloc(void* qmp, void* p, unsigned long size, +void* qm_shm_realloc(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1063,7 +1090,7 @@ void* qm_shm_realloc(void* qmp, void* p, unsigned long size, shm_unlock(); return r; } -void* qm_shm_resize(void* qmp, void* p, unsigned long size, +void* qm_shm_resize(void* qmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1081,7 +1108,7 @@ void qm_shm_free(void* qmp, void* p, const char* file, const char* func, shm_unlock(); } #else -void* qm_shm_malloc(void* qmp, unsigned long size) +void* qm_shm_malloc(void* qmp, size_t size) { void *r; shm_lock(); @@ -1089,7 +1116,7 @@ void* qm_shm_malloc(void* qmp, unsigned long size) shm_unlock(); return r; } -void* qm_shm_realloc(void* qmp, void* p, unsigned long size) +void* qm_shm_realloc(void* qmp, void* p, size_t size) { void *r; shm_lock(); @@ -1097,7 +1124,7 @@ void* qm_shm_realloc(void* qmp, void* p, unsigned long size) shm_unlock(); return r; } -void* qm_shm_resize(void* qmp, void* p, unsigned long size) +void* qm_shm_resize(void* qmp, void* p, size_t size) { void *r; shm_lock(); diff --git a/mem/q_malloc.h b/mem/q_malloc.h index 10a768e0f..5d43900c4 100644 --- a/mem/q_malloc.h +++ b/mem/q_malloc.h @@ -128,10 +128,10 @@ struct qm_block{ struct qm_block* qm_malloc_init(char* address, unsigned long size, int type); #ifdef DBG_QM_MALLOC -void* qm_malloc(void*, unsigned long size, const char* file, +void* qm_malloc(void*, size_t size, const char* file, const char* func, unsigned int line, const char* mname); #else -void* qm_malloc(void*, unsigned long size); +void* qm_malloc(void*, size_t size); #endif #ifdef DBG_QM_MALLOC @@ -141,10 +141,10 @@ void qm_free(void*, void* p, const char* file, const char* func, void qm_free(void*, void* p); #endif #ifdef DBG_QM_MALLOC -void* qm_realloc(void*, void* p, unsigned long size, +void* qm_realloc(void*, void* p, size_t size, const char* file, const char* func, unsigned int line, const char *mname); #else -void* qm_realloc(void*, void* p, unsigned long size); +void* qm_realloc(void*, void* p, size_t size); #endif void qm_check(struct qm_block*); diff --git a/mem/tlsf_malloc.c b/mem/tlsf_malloc.c index 85afcfffc..2570ae68b 100644 --- a/mem/tlsf_malloc.c +++ b/mem/tlsf_malloc.c @@ -1138,10 +1138,10 @@ void tlsf_meminfo(tlsf_t pool, struct mem_info *info) info->total_size = control->total_size; } -size_t tlsf_available(tlsf_t pool) +unsigned long tlsf_available(tlsf_t pool) { control_t* control = tlsf_cast(control_t*, pool); - return control->total_size - control->real_used; + return (unsigned long)(control->total_size - control->real_used); } void tlsf_status(tlsf_t pool) @@ -1370,7 +1370,7 @@ static tlsf_t _tlsf_shm_block = 0; /*SHM wrappers to sync the access to memory block*/ #ifdef DBG_TLSF_MALLOC -void* tlsf_shm_malloc(void* tlsfmp, unsigned long size, +void* tlsf_shm_malloc(void* tlsfmp, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1379,7 +1379,7 @@ void* tlsf_shm_malloc(void* tlsfmp, unsigned long size, shm_unlock(); return r; } -void* tlsf_shm_realloc(void* tlsfmp, void* p, unsigned long size, +void* tlsf_shm_realloc(void* tlsfmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1388,7 +1388,7 @@ void* tlsf_shm_realloc(void* tlsfmp, void* p, unsigned long size, shm_unlock(); return r; } -void* tlsf_shm_resize(void* tlsfmp, void* p, unsigned long size, +void* tlsf_shm_resize(void* tlsfmp, void* p, size_t size, const char* file, const char* func, unsigned int line, const char* mname) { void *r; @@ -1406,7 +1406,7 @@ void tlsf_shm_free(void* tlsfmp, void* p, const char* file, const char* func, shm_unlock(); } #else -void* tlsf_shm_malloc(void* tlsfmp, unsigned long size) +void* tlsf_shm_malloc(void* tlsfmp, size_t size) { void *r; shm_lock(); @@ -1414,7 +1414,7 @@ void* tlsf_shm_malloc(void* tlsfmp, unsigned long size) shm_unlock(); return r; } -void* tlsf_shm_realloc(void* tlsfmp, void* p, unsigned long size) +void* tlsf_shm_realloc(void* tlsfmp, void* p, size_t size) { void *r; shm_lock(); @@ -1422,7 +1422,7 @@ void* tlsf_shm_realloc(void* tlsfmp, void* p, unsigned long size) shm_unlock(); return r; } -void* tlsf_shm_resize(void* tlsfmp, void* p, unsigned long size) +void* tlsf_shm_resize(void* tlsfmp, void* p, size_t size) { void *r; shm_lock(); diff --git a/mem/tlsf_malloc.h b/mem/tlsf_malloc.h index 97e962a59..b92ae6fc2 100644 --- a/mem/tlsf_malloc.h +++ b/mem/tlsf_malloc.h @@ -79,7 +79,7 @@ int tlsf_check_pool(pool_t pool); void tlsf_meminfo(tlsf_t pool, struct mem_info *info); void tlsf_status(tlsf_t pool); void tlsf_sums(tlsf_t pool); -size_t tlsf_available(tlsf_t pool); +unsigned long tlsf_available(tlsf_t pool); void tlsf_mod_get_stats(tlsf_t pool, void **root); void tlsf_mod_free_stats(void *root); diff --git a/modules/acc/README b/modules/acc/README index 002df8c26..4b6c0666a 100644 --- a/modules/acc/README +++ b/modules/acc/README @@ -22,16 +22,18 @@ Bogdan-Andrei Iancu Voice Sistem SRL +Edited by + Sven Knoblich 1&1 Internet AG - Copyright 2002, 2003 FhG FOKUS + Copyright © 2002, 2003 FhG FOKUS - Copyright 2004, 2006 Voice Sistem SRL + Copyright © 2004, 2006 Voice Sistem SRL - Copyright 2011 1&1 Internet AG + Copyright © 2011 1&1 Internet AG Revision History Revision $Revision$ $Date$ __________________________________________________________________ @@ -321,7 +323,7 @@ Chapter 1. Admin Guide To account a transaction and to choose which set of backends to be used, the script writer just has to set some flags (see the module - parameters section for flag definitions Section 6, "Parameters"). If + parameters section for flag definitions Section 6, “Parameters”). If the accounting flag for a specific backend is set, the acc module will then report on completed transaction. A typical usage of the module takes no acc-specific script command -- the functionality binds @@ -333,7 +335,7 @@ Chapter 1. Admin Guide The accounting module will log by default a fixed set of attributes for the transaction - if you customize your accounting by adding more information to be logged, please see the next chapter about extra - accounting - Section 2, "Extra accounting". + accounting - Section 2, “Extra accounting”. The fixed minimal accounting information is: * Request Method name @@ -360,7 +362,7 @@ Chapter 1. Admin Guide gateway). However, CDR-base logging has the option to log existing information from expired dialogs (the dlg_vars in cdr_extra) Please see cdr_expired_dlg_enable parameter - Section 6.40, - "cdr_expired_dlg_enable (integer)". + “cdr_expired_dlg_enable (integer)”. The SQL backend support is compiled in the module. For RADIUS and DIAMETER you need to enable it by recompiling the module with properly @@ -572,21 +574,21 @@ Note message is never transmitted. You can toggle on/off the generation of CDR-based logging in such cases with only the dlg_vars showing by using the cdr_expired_dlg_enable parameter - Section 6.40, - "cdr_expired_dlg_enable (integer)". Default behavior is not logging. + “cdr_expired_dlg_enable (integer)”. Default behavior is not logging. 4.2. CDR Extra - This section is similar to the "LOG accounting" part of Section 2, - "Extra accounting". + This section is similar to the “LOG accounting” part of Section 2, + “Extra accounting”. 4.2.1. Definitions and syntax Selection of extra information is done similar to the transaction extra - Section 2.2, "Definitions and syntax". + Section 2.2, “Definitions and syntax”. * cdr_extra = cdr_extra_definition (';'cdr_extra_definition)* * cdr_extra_definition = cdr_log_name '=' pseudo_variable - See also Section 6.43, "cdr_extra (string)". + See also Section 6.43, “cdr_extra (string)”. The full list of supported pseudo-variables in Sip-Router is available at: http://sip-router.org/wiki/cookbooks/pseudo-variables/devel @@ -595,7 +597,7 @@ Note 4.3.1. Overview - As mentioned in Section 3, "Multi Call-Legs accounting", a leg + As mentioned in Section 3, “Multi Call-Legs accounting”, a leg represents a parallel or forwarded call. In contrast to the normal accounting the cdr logging uses dialogs instead of transaction to log data. This may reduce the amount of information but it also make it @@ -606,7 +608,7 @@ Note 4.3.2. Configuration When you route messages multiple times through your proxy (e.g. to - handle "call-forwardings") you have to use detect_spirals from the + handle “call-forwardings”) you have to use detect_spirals from the dialog modules. Otherwise the proxy can't identify and reuse existing dialogs. @@ -659,9 +661,9 @@ $dlg_var(callee) = $avp(callee); #callee='C' listed modules must be loaded before this module): * tm -- Transaction Manager * a database module -- If SQL support is used. - * rr -- Record Route, if "detect_direction" module parameter is + * rr -- Record Route, if “detect_direction” module parameter is enabled. - * dialog -- Dialog, if "cdr_enable" module parameter is enabled. + * dialog -- Dialog, if “cdr_enable” module parameter is enabled. 5.2. External Libraries or Applications @@ -841,7 +843,7 @@ modparam("acc", "acc_prepare_always", 1) 6.9. multi_leg_info (string) Defines the AVP set to be used in per-call-leg accounting. See - Section 3, "Multi Call-Legs accounting" for a detailed description of + Section 3, “Multi Call-Legs accounting” for a detailed description of the Multi Call-Legs accounting. If empty, the multi-leg accounting support will be disabled. @@ -912,7 +914,7 @@ modparam("acc", "log_facility", "LOG_DAEMON") 6.14. log_extra (string) - Extra values to be logged. See section Section 2, "Extra accounting" + Extra values to be logged. See section Section 2, “Extra accounting” for more details. Default value is NULL. @@ -933,7 +935,7 @@ modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)") If the parameter is set to empty string, the RADIUS accounting support will be disabled (even if compiled). - Default value is "NULL". + Default value is “NULL”. Example 1.15. radius_config example ... @@ -978,7 +980,7 @@ modparam("acc", "service_type", 16) 6.19. radius_extra (string) Extra values to be logged via RADIUS - RADIUS specific. See section - Section 2, "Extra accounting" for more details. + Section 2, “Extra accounting” for more details. Default value is NULL. @@ -1016,7 +1018,7 @@ modparam("acc", "db_missed_flag", 3) Table name of accounting successfull calls -- database specific. It can contain config variables that will be evaluated at runtime. - Default value is "acc" + Default value is “acc” Example 1.22. db_table_acc example ... @@ -1029,7 +1031,7 @@ modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)") Table name for accounting missed calls -- database specific. It can contain config variables that will be evaluated at runtime. - Default value is "missed_calls" + Default value is “missed_calls” Example 1.23. db_table_missed_calls example ... @@ -1041,7 +1043,7 @@ modparam("acc", "db_table_missed_calls", "myMC_table") SQL address -- database specific. If is set to NULL or emty string, the SQL support is disabled. - Default value is "NULL" (SQL disabled). + Default value is “NULL” (SQL disabled). Example 1.24. db_url example ... @@ -1053,7 +1055,7 @@ modparam("acc", "db_url", "mysql://user:password@localhost/kamailio") Column name in accounting table to store the request's method name as string. - Default value is "method". + Default value is “method”. Example 1.25. acc_method_column example ... @@ -1064,7 +1066,7 @@ modparam("acc", "acc_method_column", "method") Column name in accounting table to store the From header TAG parameter. - Default value is "from_tag". + Default value is “from_tag”. Example 1.26. acc_from_tag_column example ... @@ -1075,7 +1077,7 @@ modparam("acc", "acc_from_tag_column", "from_tag") Column name in accounting table to store the To header TAG parameter. - Default value is "to_tag". + Default value is “to_tag”. Example 1.27. acc_to_tag_column example ... @@ -1086,7 +1088,7 @@ modparam("acc", "acc_to_tag_column", "to_tag") Column name in accounting table to store the request's Callid value. - Default value is "callid". + Default value is “callid”. Example 1.28. acc_callid_column example ... @@ -1098,7 +1100,7 @@ modparam("acc", "acc_callid_column", "callid") Column name in accounting table to store the final reply's numric code value in string format. - Default value is "sip_code". + Default value is “sip_code”. Example 1.29. acc_sip_code_column example ... @@ -1110,7 +1112,7 @@ modparam("acc", "acc_sip_code_column", "sip_code") Column name in accounting table to store the final reply's reason phrase value. - Default value is "sip_reason". + Default value is “sip_reason”. Example 1.30. acc_sip_reason_column example ... @@ -1122,7 +1124,7 @@ modparam("acc", "acc_sip_reason_column", "sip_reason") Column name in accounting table to store the time stamp of the transaction completion in date-time format. - Default value is "time". + Default value is “time”. Example 1.31. acc_time_column example ... @@ -1132,7 +1134,7 @@ modparam("acc", "acc_time_column", "time") 6.32. db_extra (string) Extra values to be logged into database - DB specific. See section - Section 2, "Extra accounting" for more details. + Section 2, “Extra accounting” for more details. Default value is NULL. @@ -1189,7 +1191,7 @@ modparam("acc", "diameter_missed_flag", 3) Hostname of the machine where the DIAMETER Client is running -- DIAMETER specific. - Default value is "localhost". + Default value is “localhost”. Example 1.36. diameter_client_host example ... @@ -1211,7 +1213,7 @@ modparam("acc", "diameter_client_port", 3000) 6.38. diameter_extra (string) Extra values to be logged via DIAMETER - DIAMETER specific. See section - Section 2, "Extra accounting" for more details. + Section 2, “Extra accounting” for more details. Default value is NULL. @@ -1270,7 +1272,7 @@ modparam("acc", "cdr_facility", "LOG_DAEMON") 6.43. cdr_extra (string) Set of pseudo-variables defining custom CDR fields. See Section 4.2, - "CDR Extra" for more details. + “CDR Extra” for more details. Default value is NULL. @@ -1446,7 +1448,7 @@ modparam("acc", "cdr_on_failed", 0) 7.3. acc_rad_request(comment) 7.4. acc_diam_request(comment) -7.1. acc_log_request(comment) +7.1. acc_log_request(comment) acc_request reports on a request, for example, it can be used to report on missed calls to off-line users who are replied 404 - Not Found. To @@ -1467,10 +1469,10 @@ $avp(reason) = "Not found"; acc_log_request("$var(code) Error: $avp(reason)"); ... -7.2. acc_db_request(comment, table) +7.2. acc_db_request(comment, table) Like acc_log_request, acc_db_request reports on a request. The report - is sent to database at "db_url", in the table referred to in the second + is sent to database at “db_url”, in the table referred to in the second action parameter. Meaning of the parameters is as follows: @@ -1488,10 +1490,10 @@ acc_db_request("Some comment", "acc_$time(year)_$time(mon)"); acc_db_request("$var(code) Error: $avp(reason)", "SomeTable"); ... -7.3. acc_rad_request(comment) +7.3. acc_rad_request(comment) Like acc_log_request, acc_rad_request reports on a request. It reports - to radius server as configured in "radius_config". + to radius server as configured in “radius_config”. Meaning of the parameters is as follows: * comment - Comment to be appended. The string can contain any number @@ -1505,7 +1507,7 @@ acc_rad_request("Some comment"); acc_rad_request("$var(code) Error: $avp(reason)"); ... -7.4. acc_diam_request(comment) +7.4. acc_diam_request(comment) Like acc_log_request, acc_diam_request reports on a request. It reports to the configured Diameter server. @@ -1533,55 +1535,55 @@ Chapter 2. Frequently Asked Questions 2.1. - What happend with old log_fmt parameter + What happend with old log_fmt parameter - The parameter became obsolete with the restructure of the data logged - by ACC module (refer to the Overview chapter). For similar behaviour - you can use the extra accouting (see the coresponding chapter). + The parameter became obsolete with the restructure of the data logged + by ACC module (refer to the Overview chapter). For similar behaviour + you can use the extra accouting (see the coresponding chapter). 2.2. - What happend with old multi_leg_enabled parameter + What happend with old multi_leg_enabled parameter - The parameter becaome obsolete by the addition of the new - multi_leg_info parameter. The multi-leg accouting is automatically - enabled when multi_leg_info is defined. + The parameter becaome obsolete by the addition of the new + multi_leg_info parameter. The multi-leg accouting is automatically + enabled when multi_leg_info is defined. 2.3. - What happend with old src_leg_avp_id and dst_leg_avp_id parameters + What happend with old src_leg_avp_id and dst_leg_avp_id parameters - The parameter was replaced by the more generic new parameter - multi_leg_info. This allows logging (per-leg) of more information than - just dst and src. + The parameter was replaced by the more generic new parameter + multi_leg_info. This allows logging (per-leg) of more information than + just dst and src. 2.4. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 2.5. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 2.6. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + https://github.com/kamailio/kamailio/issues. diff --git a/modules/acc/acc.c b/modules/acc/acc.c index 7bf7dd7d3..8d0d01c9c 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c @@ -232,6 +232,7 @@ int acc_log_request( struct sip_msg *rq) int o; int i; struct tm *t; + double dtime; /* get default values */ m = core2strar( rq, val_arr, int_arr, type_arr); @@ -290,12 +291,11 @@ int acc_log_request( struct sip_msg *rq) acc_time_exten.s, (unsigned int)acc_env.tv.tv_usec, log_msg); } else if(acc_time_mode==2) { + dtime = (double)acc_env.tv.tv_usec; + dtime = (dtime / 1000000) + (double)acc_env.tv.tv_sec; LM_GEN2(log_facility, log_level, "%.*stimestamp=%lu;%s=%.3f%s", acc_env.text.len, acc_env.text.s,(unsigned long)acc_env.ts, - acc_time_attr.s, - (((double)(acc_env.tv.tv_sec * 1000) - + (acc_env.tv.tv_usec / 1000)) / 1000), - log_msg); + acc_time_attr.s, dtime, log_msg); } else if(acc_time_mode==3 || acc_time_mode==4) { if(acc_time_mode==3) { t = localtime(&acc_env.ts); @@ -443,6 +443,7 @@ int acc_db_request( struct sip_msg *rq) int i; int o; struct tm *t; + double dtime; /* formated database columns */ m = core2strar( rq, val_arr, int_arr, type_arr ); @@ -458,8 +459,9 @@ int acc_db_request( struct sip_msg *rq) VAL_INT(db_vals+(m++)) = (int)acc_env.tv.tv_usec; i++; } else if(acc_time_mode==2) { - VAL_DOUBLE(db_vals+(m++)) = ((double)(acc_env.tv.tv_sec * 1000) - + (acc_env.tv.tv_usec / 1000)) / 1000; + dtime = (double)acc_env.tv.tv_usec; + dtime = (dtime / 1000000) + (double)acc_env.tv.tv_sec; + VAL_DOUBLE(db_vals+(m++)) = dtime; i++; } else if(acc_time_mode==3 || acc_time_mode==4) { if(acc_time_mode==3) { diff --git a/modules/acc_radius/README b/modules/acc_radius/README index 3454f7b82..6ff33180d 100644 --- a/modules/acc_radius/README +++ b/modules/acc_radius/README @@ -16,7 +16,7 @@ Daniel-Constantin Mierla asipto.com - Copyright 2002, 2003 FhG FOKUS + Copyright © 2002, 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -128,7 +128,7 @@ Chapter 1. Admin Guide If the parameter is set to empty string, the RADIUS accounting support will be disabled (even if compiled). - Default value is "NULL". + Default value is “NULL”. Example 1.1. radius_config example ... @@ -204,11 +204,11 @@ modparam("acc_radius", "rad_time_mode", 1) 4.1. acc_rad_request(comment) -4.1. acc_rad_request(comment) +4.1. acc_rad_request(comment) Like acc_log_request of acc module, acc_rad_request reports on a SIP request event. It reports to radius server as configured in - "radius_config". + “radius_config”. Meaning of the parameters is as follows: * comment - Comment to be appended. diff --git a/modules/acc_radius/acc_radius_mod.c b/modules/acc_radius/acc_radius_mod.c index 382033990..e7cc62f55 100644 --- a/modules/acc_radius/acc_radius_mod.c +++ b/modules/acc_radius/acc_radius_mod.c @@ -1,5 +1,5 @@ /* - * Accounting module + * Radius Accounting module * * Copyright (C) 2001-2003 FhG Fokus * diff --git a/modules/acc_radius/acc_radius_mod.h b/modules/acc_radius/acc_radius_mod.h index 16e48d516..b050b5b37 100644 --- a/modules/acc_radius/acc_radius_mod.h +++ b/modules/acc_radius/acc_radius_mod.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * RADIUS Accounting module * * Copyright (C) 2001-2003 FhG Fokus @@ -21,8 +19,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * History: - * --------- */ /*! \file diff --git a/modules/acc_radius/doc/acc_radius_admin.xml b/modules/acc_radius/doc/acc_radius_admin.xml index e4402deb5..21860b3d0 100644 --- a/modules/acc_radius/doc/acc_radius_admin.xml +++ b/modules/acc_radius/doc/acc_radius_admin.xml @@ -11,20 +11,20 @@ - + &adminguide; - +
Overview - ACC_RADIUS module is used to account transaction information to + ACC_RADIUS module is used to account transaction information to RADIUS server. It binds to ACC module API and uses the same accounting mechanisms as for other backends. Therefore you need this module just to send accounting data to a RADIUS server - for more documentation regarding accounting, see the ACC - readme. + readme.
@@ -33,7 +33,7 @@
&kamailio; Modules - The module depends on the following modules (in the other words + The module depends on the following modules (in the other words the listed modules must be loaded before this module): @@ -45,7 +45,7 @@
External Libraries or Applications - The following libraries or applications must be installed + The following libraries or applications must be installed before running &kamailio; with this module loaded: @@ -61,8 +61,8 @@ - freeradius-client library can be used after - setting FREERADIUS variable in source code with + freeradius-client library can be used after + setting FREERADIUS variable in source code with 'export FREERADIUS=1' before compile. @@ -79,14 +79,14 @@
Parameters -
+
<varname>radius_config</varname> (string) - This parameter is radius specific. Path to - radius client configuration file, set the referred config file - correctly and specify there address of server, shared secret + This parameter is radius specific. Path to + radius client configuration file, set the referred config file + correctly and specify there address of server, shared secret (should equal that in /usr/local/etc/raddb/clients for - freeRadius servers) and dictionary, see etc for an example of + freeRadius servers) and dictionary, see etc for an example of config file and dictionary. @@ -105,10 +105,10 @@ modparam("acc_radius", "radius_config", "/etc/radiusclient/radiusclient.conf")
-
+
<varname>radius_flag</varname> (integer) - Request flag which needs to be set to account a + Request flag which needs to be set to account a transaction -- RADIUS specific. @@ -123,10 +123,10 @@ modparam("acc_radius", "radius_flag", 2)
-
+
<varname>radius_missed_flag</varname> (integer) - Request flag which needs to be set to account missed + Request flag which needs to be set to account missed calls -- RADIUS specific. @@ -141,7 +141,7 @@ modparam("acc_radius", "radius_missed_flag", 3)
-
+
<varname>service_type</varname> (integer) Radius service type used for accounting. @@ -158,7 +158,7 @@ modparam("acc_radius", "service_type", 16)
-
+
<varname>radius_extra</varname> (string) Extra values to be logged via RADIUS - RADIUS specific. @@ -175,10 +175,10 @@ modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
-
+
<varname>rad_time_mode</varname>(integer) - Radius Event-Timestamp for accounting. + Radius Event-Timestamp for accounting. Values can be: @@ -194,8 +194,8 @@ modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)") both radius server and client (For example: 1445590624.377372) - - + + Default value is 0 (Unix timestamp). @@ -212,14 +212,14 @@ modparam("acc_radius", "rad_time_mode", 1)
Functions -
+
<function moreinfo="none">acc_rad_request(comment)</function> - Like acc_log_request of acc module, - acc_rad_request reports on - a SIP request event. It reports to radius server as configured in + Like acc_log_request of acc module, + acc_rad_request reports on + a SIP request event. It reports to radius server as configured in radius_config. diff --git a/modules/alias_db/README b/modules/alias_db/README index 43fb90420..21e64da5e 100644 --- a/modules/alias_db/README +++ b/modules/alias_db/README @@ -14,9 +14,9 @@ Daniel-Constantin Mierla - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2008 asipto.com + Copyright © 2008 asipto.com __________________________________________________________________ Table of Contents @@ -126,7 +126,7 @@ Chapter 1. Admin Guide Database URL. - Default value is "mysql://openserro:openserro@localhost/openser". + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 1.1. Set db_url parameter ... @@ -137,7 +137,7 @@ modparam("alias_db", "db_url", "dbdriver://username:password@dbhost/dbname") Name of the column storing username. - Default value is "username". + Default value is “username”. Example 1.2. Set user_column parameter ... @@ -148,7 +148,7 @@ modparam("alias_db", "user_column", "susername") Name of the column storing user's domain. - Default value is "domain". + Default value is “domain”. Example 1.3. Set domain_column parameter ... @@ -159,7 +159,7 @@ modparam("alias_db", "domain_column", "sdomain") Name of the column storing alias username. - Default value is "alias_username". + Default value is “alias_username”. Example 1.4. Set alias_user_column parameter ... @@ -170,7 +170,7 @@ modparam("alias_db", "alias_user_column", "auser") Name of the column storing alias domain. - Default value is "alias_domain". + Default value is “alias_domain”. Example 1.5. Set alias_domain_column parameter ... @@ -183,7 +183,7 @@ modparam("alias_db", "alias_domain_column", "adomain") for alias. If set to 0, the domain from R-URI is not used, if set to 1 the domain from R-URI is used. - Default value is "0". + Default value is “0”. Example 1.6. Set use_domain parameter ... @@ -195,7 +195,7 @@ modparam("alias_db", "use_domain", 1) Specifies the prefix to be stripped from the domain in R-URI before doing the search. - Default value is "NULL". + Default value is “NULL”. Example 1.7. Set domain_prefix parameter ... @@ -207,7 +207,7 @@ modparam("alias_db", "domain_prefix", "sip.") If the alias resolves to many SIP IDs, the first is replacing the R-URI, the rest are added as branches. - Default value is "0" (0 - don't add branches; 1 - add branches). + Default value is “0” (0 - don't add branches; 1 - add branches). Example 1.8. Set append_branches parameter ... @@ -218,7 +218,7 @@ modparam("alias_db", "append_branches", 1) 4.1. alias_db_lookup(table_name) -4.1. alias_db_lookup(table_name) +4.1. alias_db_lookup(table_name) The function takes the R-URI and search to see whether it is an alias or not. If it is an alias for a local user, the R-URI is replaced with diff --git a/modules/app_java/Makefile b/modules/app_java/Makefile index f3a40aef7..c925b41fe 100644 --- a/modules/app_java/Makefile +++ b/modules/app_java/Makefile @@ -1,6 +1,8 @@ -# +# # WARNING: do not run this directly, it should be run by the master Makefile +# to generate readme file on a system without java, use DOCBUILD=yes in make command + include ../../Makefile.defs auto_gen= NAME=app_java.so @@ -24,7 +26,9 @@ LIBS += $(shell pkg-config libgcj --libs) -L$(JAVA_HOME)/lib -ljvm # At this point I don't see any universal method as explicit setting this variable at the compile phase. # -- ez ifeq ($(shell [ -d "${JAVA_HOME}" -a -f "$(JAVA_HOME)/include/jni.h" -a -f "$(JAVA_HOME)/lib/libjvm.so" ] && echo 1 || echo 0),0) - $(error Can't locate Java Development Kit. You have to specify environment JAVA_HOME to build app_java) +ifneq ($(DOCBUILD),yes) +$(error Cannot locate Java Development Kit. You have to specify environment JAVA_HOME to build app_java) +endif endif ifeq ($(OS), freebsd) diff --git a/modules/app_java/README b/modules/app_java/README index f2aff398f..540fc0601 100644 --- a/modules/app_java/README +++ b/modules/app_java/README @@ -6,7 +6,7 @@ Edited by Konstantin Mosesov - Copyright 2013, 2014 Konstantin Mosesov + Copyright © 2013, 2014 Konstantin Mosesov __________________________________________________________________ Table of Contents @@ -174,7 +174,7 @@ Chapter 1. Admin Guide The class name should have the same compiled file name. If the value is "Kamailio", then the compiled file should be named as "Kamailio.class". - Default value is "Kamailio". + Default value is “Kamailio”. Example 1.1. Set class_name parameter ... @@ -185,7 +185,7 @@ modparam("app_java", "class_name", "Kamailio") TBD. - Default value is "child_init". + Default value is “child_init”. Example 1.2. Set child_init_method parameter ... @@ -196,7 +196,7 @@ modparam("app_java", "child_init_method", "my_mod_init") Java options for Java Virtual Machine. For more info read java docs - Default value is "-Djava.compiler=NONE". + Default value is “-Djava.compiler=NONE”. Example 1.3. Set java_options parameter ... @@ -230,10 +230,10 @@ modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni 4.4. force_cmd_exec (int) This parameter forces execution a kamailio comnmand with java native - method "KamExec". # Note: this is an untested yet feature, may cause + method “KamExec”. # Note: this is an untested yet feature, may cause (but may not) a memory leaks if used from embedded languages. - Default value is "0 (off)". + Default value is “0 (off)”. Example 1.7. Set force_cmd_exec parameter ... @@ -255,9 +255,9 @@ modparam("app_java", "force_cmd_exec", 1) 5.5. java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]]) -5.1. Common requirements +5.1. Common requirements - Each function has a required parameter "method_signature". For more + Each function has a required parameter “method_signature”. For more info see Determine the signature of a method. Signature represents the variable type. The mapping between the Java type and C type is Type Chararacter diff --git a/modules/app_java/java_msgobj.c b/modules/app_java/java_msgobj.c index 0a43786fe..fc3284968 100644 --- a/modules/app_java/java_msgobj.c +++ b/modules/app_java/java_msgobj.c @@ -230,7 +230,7 @@ jobject *fill_sipmsg_object(JNIEnv *env, struct sip_msg *msg) LM_ERR("%s: Can't find symbol org.siprouter.SipMsg.add_to_branch_s\n", APP_NAME); return NULL; } - jStrParam = (*env)->NewStringUTF(env, (msg->add_to_branch_len <= 0 || msg->add_to_branch_s == NULL) ? "" : strdup(msg->add_to_branch_s)); + jStrParam = (*env)->NewStringUTF(env, (msg->add_to_branch_len <= 0) ? "" : strdup(msg->add_to_branch_s)); (*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam); if ((*env)->ExceptionCheck(env)) { diff --git a/modules/app_lua/README b/modules/app_lua/README index 576877839..d08c394bd 100644 --- a/modules/app_lua/README +++ b/modules/app_lua/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2010 Daniel-Constantin Mierla (asipto.com) + Copyright © 2010 Daniel-Constantin Mierla (asipto.com) __________________________________________________________________ Table of Contents @@ -130,7 +130,7 @@ Chapter 1. Admin Guide use lua_run(function, params) to execute a function from the script at runtime. - Default value is "null". + Default value is “null”. Example 1.1. Set load parameter ... @@ -174,7 +174,7 @@ modparam("app_lua", "load", "/usr/local/etc/kamailio/lua/myscript.lua") Note that 'sr', 'sr.hdr' and 'sr.pv' modules are always registered to Lua. - Default value is "null". + Default value is “null”. Example 1.2. Set register parameter ... @@ -186,7 +186,7 @@ modparam("app_lua", "register", "sl") If reload is 1 enables the ability to reload the scripts using the RPC app_lua.reload command. - Default value is "0 (off)". + Default value is “0 (off)”. Example 1.3. Set reload parameter ... @@ -200,7 +200,7 @@ modparam("app_lua", "reload", 1) 4.3. lua_run(function, params) 4.4. lua_runstring(script) -4.1. lua_dofile(path) +4.1. lua_dofile(path) Execute the Lua script stored in 'path'. The parameter can be a string with pseudo-variables evaluated at runtime. @@ -210,7 +210,7 @@ modparam("app_lua", "reload", 1) lua_dofile("/usr/local/etc/kamailio/lua/myscript.lua"); ... -4.2. lua_dostring(script) +4.2. lua_dostring(script) Execute the Lua script stored in parameter. The parameter can be a string with pseudo-variables. @@ -223,7 +223,7 @@ if(!lua_dostring("sr.log([[err]], [[----------- Hello World from $fU\n]])")) } ... -4.3. lua_run(function, params) +4.3. lua_run(function, params) Execute the Lua function 'func' giving params as parameters. There can be up to 3 string parameters. The function must exist in the script @@ -240,7 +240,7 @@ if(!lua_run("sr_append_fu_to_reply")) lua_run("lua_funcx", "$rU", "2"); ... -4.4. lua_runstring(script) +4.4. lua_runstring(script) Execute the Lua script stored in parameter. The parameter can be a string with pseudo-variables. The script is executed in Lua context @@ -259,7 +259,7 @@ if(!lua_runstring("sr.log([[err]], [[----------- Hello World from $fU\n]])")) 5.1. app_lua.list 5.2. app_lua.reload -5.1. app_lua.list +5.1. app_lua.list Lists the id and path for every script loaded by the load parameter. @@ -270,7 +270,7 @@ if(!lua_runstring("sr.log([[err]], [[----------- Hello World from $fU\n]])")) Example: kamcmd app_lua.lists -5.2. app_lua.reload +5.2. app_lua.reload Marks the need to reload the selected script. The actual reload is done by every working process when the next call to lua_run function is diff --git a/modules/app_mono/README b/modules/app_mono/README index a2ca72c5f..52100a42a 100644 --- a/modules/app_mono/README +++ b/modules/app_mono/README @@ -16,7 +16,7 @@ Alex Balashov - Copyright 2012 Daniel-Constantin Mierla (asipto.com) + Copyright © 2012 Daniel-Constantin Mierla (asipto.com) __________________________________________________________________ Table of Contents @@ -113,7 +113,7 @@ Chapter 1. Admin Guide Set the path to the Mono assembly to be loaded at startup. You can use mono_run(param) to execute the assembly at runtime. - Default value is "null". + Default value is “null”. Example 1.1. Set load parameter ... @@ -125,7 +125,7 @@ modparam("app_mono", "load", "/usr/local/etc/kamailio/mono/myscript.exe") 4.1. mono_exec(path [, param]) 4.2. mono_run([param]) -4.1. mono_exec(path [, param]) +4.1. mono_exec(path [, param]) Execute the managed code assembly stored in 'path'. The path can be a string with pseudo-variables evaluated at runtime. A second parameter @@ -140,7 +140,7 @@ modparam("app_mono", "load", "/usr/local/etc/kamailio/mono/myscript.exe") mono_exec("/usr/local/etc/kamailio/mono/myscript.exe"); ... -4.2. mono_run([param]) +4.2. mono_run([param]) Execute the assembly specified by 'load' module parameter. The assembly is loaded at startup, so changes to it will be effective only after diff --git a/modules/app_perl/README b/modules/app_perl/README index b8c75629e..7861bd85d 100644 --- a/modules/app_perl/README +++ b/modules/app_perl/README @@ -8,7 +8,7 @@ Edited by Bastian Friedrich - Copyright 2007 Collax GmbH + Copyright © 2007 Collax GmbH __________________________________________________________________ Table of Contents @@ -330,7 +330,7 @@ if (perl_exec("ldap_alias")) { * IPC::Shareable perl module from CPAN Although SuSE delivers a lot of perl modules, others may have to be - fetched from CPAN. Consider using the program "cpan2rpm" - which, in + fetched from CPAN. Consider using the program “cpan2rpm” - which, in turn, is available on CPAN. It creates RPM files from CPAN. 5. Parameters @@ -343,7 +343,7 @@ if (perl_exec("ldap_alias")) { 5.1. filename (string) This is the file name of your script. This may be set once only, but it - may include an arbitary number of functions and "use" as many Perl + may include an arbitary number of functions and “use” as many Perl module as necessary. Must not be empty! @@ -357,9 +357,9 @@ modparam("app_perl", "filename", "/home/test/kamailio/myperl.pl") The path to the Perl modules included (Kamailio.pm et.al). It is not absolutely crucial to set this path, as you may install the Modules in - Perl's standard path, or update the "%INC" variable from within your + Perl's standard path, or update the “%INC” variable from within your script. Using this module parameter is the standard behavior, though. - Multiple paths may be specified by separating them with a ":" + Multiple paths may be specified by separating them with a “:” character. The maximum is 10 paths. Example 1.2. Set modpath parameter @@ -404,7 +404,7 @@ modparam("app_perl", "perl_destroy_func", "my_perl_destroy") 6.1. perl_exec_simple(func, [param]) 6.2. perl_exec(func, [param]) -6.1. perl_exec_simple(func, [param]) +6.1. perl_exec_simple(func, [param]) Calls a perl function without passing it the current SIP message. May be used for very simple simple requests that do not have to fiddle with @@ -424,7 +424,7 @@ if (method=="INVITE") { }; ... -6.2. perl_exec(func, [param]) +6.2. perl_exec(func, [param]) Calls a perl function with passing it the current SIP message. The SIP message is reflected by a Perl module that gives you access to the @@ -448,7 +448,7 @@ if (perl_exec("ldapalias")) { 7.1. app_perl.set_reset_cycles 7.2. app_perl.get_reset_cycles -7.1. app_perl.set_reset_cycles +7.1. app_perl.set_reset_cycles Set the value of the reset_cycle. The command has one integer parameter. @@ -458,7 +458,7 @@ if (perl_exec("ldapalias")) { kamcmd app_perl.set_reset_cycles 20000 ... -7.2. app_perl.get_reset_cycles +7.2. app_perl.get_reset_cycles Return the value of the reset_cycle. @@ -678,7 +678,7 @@ Kamailio::log(L_INFO, "foobar"); my $ruri = $m->getRURI(); - getRURI returns a string. See "getParsedRURI()" below how to receive a + getRURI returns a string. See “getParsedRURI()” below how to receive a parsed structure. This function is valid in request messages only. @@ -1521,11 +1521,11 @@ Chapter 3. Perl samples 1.1.9. phonenumbers.pl 1.1.10. pseudovars.pl - There are a number of example scripts in the "samples/". They are + There are a number of example scripts in the “samples/”. They are documented well. Read them, it will explain a lot to you :) If you want to use any of these scripts directly in your - implementation, you can use Perl's "require" mechanism to import them + implementation, you can use Perl's “require” mechanism to import them (just remember that you need to use quotes when require'ing .pl files). 1.1. Script descriptions @@ -1562,7 +1562,7 @@ Chapter 3. Perl samples functions from within perl, and the different types of functions you can offer for Kamailio access. - "exportedfuncs" simply demonstrates that you can use the moduleFunction + “exportedfuncs” simply demonstrates that you can use the moduleFunction method to call functions offered by other modules. The results are equivalent to calling these functions from your config file. In the demonstrated case, telephone calls with a destination number beginning @@ -1572,13 +1572,13 @@ Chapter 3. Perl samples Please note that the moduleFunction method is not fully available in Kamailio 1.2. See the method's documentation for details. - "paramfunc" shows that you can pass arbitrary strings to perl + “paramfunc” shows that you can pass arbitrary strings to perl functions. Do with them whatever you want :) - "autotest" demonstrates that unknown functions in Kamailio::Message + “autotest” demonstrates that unknown functions in Kamailio::Message objects are automatically transformed into calls to module functions. - The "diefunc"s show that dying perl scripts - by "manual" dying, or + The “diefunc”s show that dying perl scripts - by "manual" dying, or because of script errors - are handled by the Kamailio package. The error message is logged through Kamailio's logging mechanism. Please note that this only works correctly if you do NOT overwrite the default @@ -1590,22 +1590,22 @@ Chapter 3. Perl samples processing SIP messages. This sample script demonstrates access to header names and values within two sample functions. - "headernames" extracts all header names and logs their names. + “headernames” extracts all header names and logs their names. - "someheaders" logs the contents of the two headers, "To" and - "WWW-Contact". As you can see, headers that occur more than once are + “someheaders” logs the contents of the two headers, “To” and + “WWW-Contact”. As you can see, headers that occur more than once are retrieved as an array, which may be accessed by Perl's array accessing methods. 1.1.6. logging.pl For debugging purposes, you probably want to write messages to the - syslog. The "logdemo" shows three ways to access the Kamailio log + syslog. The “logdemo” shows three ways to access the Kamailio log function: it is available through the Kamailio class as well as through the Kamailio::Message class. Remember that you can use exported functions from other modules. You - may thus as well use the "xlog" module and it's xlog function. + may thus as well use the “xlog” module and it's xlog function. The L_INFO, L_DBG, L_ERR, L_CRIT... constants are available through the Kamailio::Constants package. @@ -1634,7 +1634,7 @@ Chapter 3. Perl samples 1.1.10. pseudovars.pl - This script demonstrates the Perl module's "pseudoVar" method. It may + This script demonstrates the Perl module's “pseudoVar” method. It may be used to retrieve the values of current pseudo variables. You might notice that there is no particular function for setting @@ -1650,48 +1650,48 @@ Chapter 4. Frequently Asked Questions 4.1. - Are there known bugs in the Perl module? - - The Perl module does have a few shortcomings that may be regarded as - bugs. - * Missing module functions. Not all functions of other modules are - available for Perl access. The reason for this is a design property - of Kamailio. Making available more functions is work in progress. - * Perl and threads. Perl itself is, when compiled with the correct - parameters, thread safe; unfortunately, not all Perl modules are. - The DBI modules, especially (but not restricted to) DBI::ODBC are - known NOT to be thread safe. - Using DBI::ODBC -- and possibly other non-thread-safe Perl - extensions -- may result in erroneous behavior of Kamailio, - including (but not restricted to) server crashes and wrong routing. + Are there known bugs in the Perl module? + + The Perl module does have a few shortcomings that may be regarded as + bugs. + * Missing module functions. Not all functions of other modules are + available for Perl access. The reason for this is a design property + of Kamailio. Making available more functions is work in progress. + * Perl and threads. Perl itself is, when compiled with the correct + parameters, thread safe; unfortunately, not all Perl modules are. + The DBI modules, especially (but not restricted to) DBI::ODBC are + known NOT to be thread safe. + Using DBI::ODBC -- and possibly other non-thread-safe Perl + extensions -- may result in erroneous behavior of Kamailio, + including (but not restricted to) server crashes and wrong routing. 4.2. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 4.3. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 4.4. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + https://github.com/kamailio/kamailio/issues. diff --git a/modules/app_python/README b/modules/app_python/README index 243f9cc9d..cf5821b48 100644 --- a/modules/app_python/README +++ b/modules/app_python/README @@ -6,7 +6,7 @@ Edited by Maxim Sobolev - Copyright 2010 Maxim Sobolev + Copyright © 2010 Maxim Sobolev __________________________________________________________________ Table of Contents @@ -92,7 +92,7 @@ Chapter 1. Admin Guide The path to the fiel with Python code to be executed from configuration file. - Default value is "/usr/local/etc/kamailio/handler.py". + Default value is “/usr/local/etc/kamailio/handler.py”. Example 1.1. Set script_name parameter ... @@ -104,7 +104,7 @@ modparam("app_python", "script_name", "/usr/local/etc/kamailio/myscript.py") The Python function to be executed by this module when it is initialied by Kamailio. - Default value is "mod_init". + Default value is “mod_init”. Example 1.2. Set mod_init_function parameter ... @@ -116,7 +116,7 @@ modparam("app_python", "mod_init_function", "my_mod_init") The Python function to be executed by this module when a new worker process (child) is initialied by Kamailio. - Default value is "child_init". + Default value is “child_init”. Example 1.3. Set child_init_method parameter ... @@ -127,7 +127,7 @@ modparam("app_python", "child_init_method", "my_child_init") 4.1. python_exec(method [, args]) -4.1. python_exec(method [, args]) +4.1. python_exec(method [, args]) Execute the Python function with the name given by the parameter 'method'. Optionally can be provided a second string with parameters to diff --git a/modules/async/README b/modules/async/README index eb12ead3b..26db48793 100644 --- a/modules/async/README +++ b/modules/async/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2011 asipto.com + Copyright © 2011-2016 asipto.com __________________________________________________________________ Table of Contents @@ -113,7 +113,7 @@ modparam("async", "workers", 2) 4.2. async_sleep(seconds) 4.3. async_task_route(routename) -4.1. async_route(routename, seconds) +4.1. async_route(routename, seconds) Simulate a sleep of 'seconds' and then continue the processing of the SIP request with the route[routename]. In case of internal errors, the @@ -144,7 +144,7 @@ route[RESUME] { } ... -4.2. async_sleep(seconds) +4.2. async_sleep(seconds) Simulate a sleep of 'seconds' and then continue the processing of SIP request with the next action. In case of internal errors, the function @@ -163,7 +163,7 @@ send_reply("404", "Not found"); exit; ... -4.3. async_task_route(routename) +4.3. async_task_route(routename) Continue the processing of the SIP request with the route[routename] in one of the processes from core asynchronous framework. The core diff --git a/modules/async/doc/async.xml b/modules/async/doc/async.xml index e6fea0de1..6e794ad64 100644 --- a/modules/async/doc/async.xml +++ b/modules/async/doc/async.xml @@ -25,7 +25,7 @@ - 2011 + 2011-2016 asipto.com diff --git a/modules/auth/README b/modules/auth/README index 3dc63614d..b152bea41 100644 --- a/modules/auth/README +++ b/modules/auth/README @@ -15,7 +15,7 @@ Daniel-Constantin Mierla asipto.com - Copyright 2002, 2003 FhG FOKUS + Copyright © 2002, 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -612,7 +612,7 @@ modparam("auth", "force_stateless_reply", 1) to SRV records (not all SIP clients support SRV lookup), a subdomain of the master domain can be defined for SIP purposes (like sip.mydomain.net pointing to same IP address as the SRV record for - mydomain.net). By ignoring the realm_prefix "sip.", at authentication, + mydomain.net). By ignoring the realm_prefix “sip.”, at authentication, sip.example.com will be equivalent to example.com . Default value is empty string. @@ -672,7 +672,7 @@ if (has_credentials("myrealm")) { } ... -4.3. www_challenge(realm, flags) +4.3. www_challenge(realm, flags) The function challenges a user agent. It will generate a WWW-Authorize header field containing a digest challenge, it will put the header @@ -686,7 +686,7 @@ if (has_credentials("myrealm")) { * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string "". In case of REGISTER requests, the + It must not be empty string “”. In case of REGISTER requests, the To header field domain (e.g., variable $td) can be used (because this header field represents the user being registered), for all other messages From header field domain can be used (e.g., variable @@ -709,7 +709,7 @@ if (!www_authenticate("$td", "subscriber")) { } ... -4.4. proxy_challenge(realm, flags) +4.4. proxy_challenge(realm, flags) The function challenges a user agent. It will generate a Proxy-Authorize header field containing a digest challenge, it will put @@ -731,7 +731,7 @@ if (!proxy_authenticate("$fd", "subscriber")) { }; ... -4.5. auth_challenge(realm, flags) +4.5. auth_challenge(realm, flags) The function challenges a user agent for authentication. It combines the functions www_challenge() and proxy_challenge(), by calling @@ -750,7 +750,7 @@ if (!auth_check("$fd", "subscriber", "1")) { }; ... -4.6. pv_www_authenticate(realm, passwd, flags [, method]) +4.6. pv_www_authenticate(realm, passwd, flags [, method]) The function verifies credentials according to RFC2617. If the credentials are verified successfully then the function will succeed @@ -773,7 +773,7 @@ if (!auth_check("$fd", "subscriber", "1")) { * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string "". In case of REGISTER requests To + It must not be empty string “”. In case of REGISTER requests To header field domain (e.g., varibale $td) can be used (because this header field represents a user being registered), for all other messages From header field domain can be used (e.g., varibale $fd). @@ -802,7 +802,7 @@ if (!pv_www_authenticate("$td", "123abc", "0")) { }; ... -4.7. pv_proxy_authenticate(realm, passwd, flags) +4.7. pv_proxy_authenticate(realm, passwd, flags) The function verifies credentials according to RFC2617. If the credentials are verified successfully then the function will succeed @@ -825,7 +825,7 @@ if (!pv_proxy_authenticate("$fd", "$avp(password)", "0")) { }; ... -4.8. pv_auth_check(realm, passwd, flags, checks) +4.8. pv_auth_check(realm, passwd, flags, checks) The function combines the functionalities of pv_www_authenticate and pv_proxy_authenticate, first being exectuted if the SIP request is a @@ -856,7 +856,7 @@ if (!pv_auth_check("$fd", "$avp(password)", "0", "1")) { }; ... -4.9. auth_get_www_authenticate(realm, flags, pvdest) +4.9. auth_get_www_authenticate(realm, flags, pvdest) Build WWW-Authentication header and set the resulting value in 'pvdest' pseudo-variable parameter. diff --git a/modules/auth_db/README b/modules/auth_db/README index 949878d73..3697d10b6 100644 --- a/modules/auth_db/README +++ b/modules/auth_db/README @@ -24,9 +24,9 @@ Jan Janak - Copyright 2002, 2003 FhG FOKUS + Copyright © 2002, 2003 FhG FOKUS - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -154,7 +154,7 @@ Chapter 1. Admin Guide For dbtext module (which stores data in plaintext files) it is directory in which the database resides. - Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 1.1. db_url parameter usage ... @@ -166,7 +166,7 @@ modparam("auth_db", "db_url", "dbdriver://username:password@dbhost/dbname") This is the name of the column holding usernames. Default value is fine for most people. Use the parameter if you really need to change it. - Default value is "username". + Default value is “username”. Example 1.2. user_column parameter usage ... @@ -179,7 +179,7 @@ modparam("auth_db", "user_column", "user") is fine for most people. Use the parameter if you really need to change it. - Default value is "domain". + Default value is “domain”. Example 1.3. domain_column parameter usage ... @@ -194,7 +194,7 @@ modparam("auth_db", "domain_column", "domain") safe because the server doesn't need to know plaintext passwords and they cannot be obtained from HA1 strings. - Default value is "ha1". + Default value is “ha1”. Example 1.4. password_column parameter usage ... @@ -222,16 +222,16 @@ modparam("auth_db", "password_column_2", "ha1_2") HA1 string or plaintext passwords for authentification. If the parameter is set to 0 and the username parameter of credentials - contains also "@domain" (some user agents append the domain to the + contains also “@domain” (some user agents append the domain to the username parameter), then the server will use the HA1 values from the - column specified in the "password_column_2" parameter. If the username + column specified in the “password_column_2” parameter. If the username parameter doesn't contain a domain, the server will use the HA1 values - from the column given in the "password_column"parameter. + from the column given in the “password_column”parameter. If the parameter is set to 1 then the HA1 value will be calculated from - the column specified in the "password_column" parameter. + the column specified in the “password_column” parameter. - The "password_column_2"column contain also HA1 strings but they should + The “password_column_2”column contain also HA1 strings but they should be calculated including the domain in the username parameter (as opposed to password_column which (when containing HA1 strings) should always contains HA1 strings calculated without domain in username. @@ -257,7 +257,7 @@ modparam("auth_db", "calculate_ha1", 1) IMPORTANT: before turning on this parameter, be sure that the domain column in subscriber table is properly populated. - Default value is "0 (false)". + Default value is “0 (false)”. Example 1.7. use_domain parameter usage ... @@ -276,7 +276,7 @@ modparam("auth_db", "use_domain", 1) * credential = (avp_specification '=' column_name) | (column_name) * avp_specification = '$avp(' + 'i:'ID | 's:'NAME | alias + ')' - Default value of this parameter is "NULL" (no credientials loaded). + Default value of this parameter is “NULL” (no credientials loaded). Example 1.8. load_credentials parameter usage ... @@ -290,7 +290,7 @@ modparam("auth_db", "load_credentials", "$avp(i:123)=rpid;email_address") If set to 0, the module will skip checking the version for subscriber table. - Default value is "1 (check for table version)". + Default value is “1 (check for table version)”. Example 1.9. version_table parameter usage ... @@ -306,7 +306,7 @@ modparam("auth_db", "version_table", 0) 4.5. auth_check(realm, table, flags) 4.6. is_subscriber(uri, dbtable, flags) -4.1. www_authenticate(realm, table [, method]) +4.1. www_authenticate(realm, table [, method]) Name alias: www_authorize(realm, table) @@ -335,7 +335,7 @@ modparam("auth_db", "version_table", 0) * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string "". In case of REGISTER requests To + It must not be empty string “”. In case of REGISTER requests To header field domain (e.g., variable $td) can be used (because this header field represents the user being registered), for all other messages From header field domain can be used (e.g., variable $fd). @@ -354,13 +354,13 @@ if (!www_authorize("kamailio.org", "subscriber")) { }; ... -4.2. www_authorize(realm, table) +4.2. www_authorize(realm, table) It is same function as www_authenticate(realm, table). This name is kept for backward compatibility, since it was named this way first time by it actually does user authentication. -4.3. proxy_authenticate(realm, table) +4.3. proxy_authenticate(realm, table) Name alias: proxy_authorize(realm, table) @@ -377,9 +377,9 @@ if (!www_authorize("kamailio.org", "subscriber")) { * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string "". Apart of a static string, typical + It must not be empty string “”. Apart of a static string, typical value is From header field domain (e.g., variable $fd). - If an empty string "" is used then the server will generate it from + If an empty string “” is used then the server will generate it from the request. From header field domain will be used as realm. The string may contain pseudo variables. * table - Table to be used to lookup usernames and passwords (usually @@ -394,13 +394,13 @@ if (!proxy_authorize("$fd", "subscriber)) { }; ... -4.4. proxy_authorize(realm, table) +4.4. proxy_authorize(realm, table) It is same function as proxy_authenticate(realm, table). This name is kept for backward compatibility, since it was named this way first time but it actually does user authentication. -4.5. auth_check(realm, table, flags) +4.5. auth_check(realm, table, flags) The function combines the functionalities of www_authenticate and proxy_authenticate, first being exectuted if the SIP request is a @@ -416,7 +416,7 @@ if (!proxy_authorize("$fd", "subscriber)) { * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string "". Apart of a static string, typical + It must not be empty string “”. Apart of a static string, typical value is From header field domain (e.g., variable $fd). The string may contain pseudo variables. * table - Table to be used to lookup usernames and passwords (usually @@ -446,7 +446,7 @@ if (!auth_check("$fd", "subscriber", "1")) { } ... -4.6. is_subscriber(uri, dbtable, flags) +4.6. is_subscriber(uri, dbtable, flags) The function checks if there is a subscriber corresponding to the AoR in uri parameter. It uses same database connection as for diff --git a/modules/auth_diameter/README b/modules/auth_diameter/README index e5b2cfa3a..050736d88 100644 --- a/modules/auth_diameter/README +++ b/modules/auth_diameter/README @@ -8,7 +8,7 @@ Edited by Elena-Ramona Modroiu - Copyright 2003, 2004 FhG FOKUS + Copyright © 2003, 2004 FhG FOKUS __________________________________________________________________ Table of Contents @@ -137,7 +137,7 @@ Chapter 1. Admin Guide Hostname of the machine where the DIAMETER Client is running. - Default value is "localhost". + Default value is “localhost”. Example 1.2. Set diameter_client_host parameter ... @@ -148,7 +148,7 @@ modparam("auth_diameter", "diameter_client_host", "10.10.10.10") Port number where the DIAMETER Client is listening. - Default value is "3000". + Default value is “3000”. Example 1.3. Set diameter_client_port parameter ... @@ -160,7 +160,7 @@ modparam("auth_diameter", "diameter_client_port", 3000) Specifies whether the domain name part of URI is used when checking the user's privileges. - Default value is "0 (0==false and 1==true )". + Default value is “0 (0==false and 1==true )”. Example 1.4. Set use_domain parameter ... @@ -173,12 +173,12 @@ modparam("auth_diameter", "use_domain", 1) 4.2. diameter_proxy_authorize(realm) 4.3. diameter_is_user_in(who, group) -4.1. diameter_www_authorize(realm) +4.1. diameter_www_authorize(realm) SIP Server checks for authorization having a DIAMETER server in backend. If no credentials are provided inside the SIP request then a challenge is sent back to UAC. If the credentials don't match the ones - computed by DISC then "403 Forbidden" is sent back. + computed by DISC then “403 Forbidden” is sent back. Negative codes may be interpreted as follows: * -5 (generic error) - some generic error occurred and no reply was @@ -199,12 +199,12 @@ if(!diameter_www_authorize("siphub.net")) }; ... -4.2. diameter_proxy_authorize(realm) +4.2. diameter_proxy_authorize(realm) SIP Proxy checks for authorization having a DIAMETER server in backend. If no credentials are provided inside the SIP request then a challenge is sent back to UAC. If the credentials don't match the ones computed - by DISC then "403 Forbidden" is sent back. For more about the negative + by DISC then “403 Forbidden” is sent back. For more about the negative return codes, see the above function. Meaning of the parameters is as follows: @@ -221,14 +221,14 @@ if(!diameter_proxy_authorize("siphub.net")) }; ... -4.3. diameter_is_user_in(who, group) +4.3. diameter_is_user_in(who, group) The method performs group membership checking with DISC. Meaning of the parameters is as follows: * who - what header to be used to get the SIP URI that is wanted to be checked being member in a certain group. It can be: - "Request-URI", "From", "To" or "Credentials". + “Request-URI”, “From”, “To” or “Credentials”. * group - the group name where to check if the user is part of. This function can be used from REQUEST_ROUTE. diff --git a/modules/auth_identity/README b/modules/auth_identity/README index 042df572b..d9761bdbd 100644 --- a/modules/auth_identity/README +++ b/modules/auth_identity/README @@ -1,12 +1,11 @@ - SIP Authenticated Identity Module Gergely Kovacs Iptel.org - Copyright 2007 Iptel.org - _________________________________________________________________ + Copyright © 2007 Iptel.org + __________________________________________________________________ Table of Contents @@ -30,31 +29,31 @@ Gergely Kovacs 6. Functions - 6.1. auth_date_proc() + 6.1. auth_date_proc() 6.1.1. Dependencies - 6.2. auth_add_identity() + 6.2. auth_add_identity() 6.2.1. Dependencies - 6.3. vrfy_check_date() + 6.3. vrfy_check_date() 6.3.1. Dependencies - 6.4. vrfy_get_certificate() + 6.4. vrfy_get_certificate() 6.4.1. Dependencies - 6.5. vrfy_check_certificate() + 6.5. vrfy_check_certificate() 6.5.1. Dependencies - 6.6. vrfy_check_msgvalidity() + 6.6. vrfy_check_msgvalidity() 6.6.1. Dependencies - 6.7. vrfy_check_callid() + 6.7. vrfy_check_callid() 6.7.1. Dependencies @@ -64,14 +63,14 @@ Gergely Kovacs List of Examples 1.1. Set privatekey_path parameter - 1.2. Set certificate_path parameter - 1.3. Set certificate_url parameter - 1.4. Set msg_timeout parameter - 1.5. Set auth_validity_time parameter - 1.6. Set auth_validity_time parameter - 1.7. Set certificate_cache_limit parameter - 1.8. Set cainfo_path parameter - 1.9. Set accept_pem_certs parameter + 1.2. Set certificate_path parameter + 1.3. Set certificate_url parameter + 1.4. Set msg_timeout parameter + 1.5. Set auth_validity_time parameter + 1.6. Set auth_validity_time parameter + 1.7. Set certificate_cache_limit parameter + 1.8. Set cainfo_path parameter + 1.9. Set accept_pem_certs parameter Chapter 1. Admin Guide @@ -95,31 +94,31 @@ Chapter 1. Admin Guide 6. Functions - 6.1. auth_date_proc() + 6.1. auth_date_proc() 6.1.1. Dependencies - 6.2. auth_add_identity() + 6.2. auth_add_identity() 6.2.1. Dependencies - 6.3. vrfy_check_date() + 6.3. vrfy_check_date() 6.3.1. Dependencies - 6.4. vrfy_get_certificate() + 6.4. vrfy_get_certificate() 6.4.1. Dependencies - 6.5. vrfy_check_certificate() + 6.5. vrfy_check_certificate() 6.5.1. Dependencies - 6.6. vrfy_check_msgvalidity() + 6.6. vrfy_check_msgvalidity() 6.6.1. Dependencies - 6.7. vrfy_check_callid() + 6.7. vrfy_check_callid() 6.7.1. Dependencies @@ -129,17 +128,17 @@ Chapter 1. Admin Guide 1. Overview Auth Identity module provides functionalities for securely identifying - originators of SIP messages. It implements the SIP Identity standard - where a SIP proxy signs messages that is sent to other domains. This + originators of SIP messages. It implements the SIP Identity standard + where a SIP proxy signs messages that is sent to other domains. This module has two basic services: - * authorizer - authorizes a message and adds Identity and + * authorizer - authorizes a message and adds Identity and Identity-Info headers * verifier - verifies an authorized message Known limitations in this version: * authorizer and verifier support all SIP requests except for CANCEL and REGISTER - * verifier does not support the subjectAltName extension of + * verifier does not support the subjectAltName extension of certificates 2. Dependencies @@ -152,16 +151,16 @@ Chapter 1. Admin Guide * OpenSSL (version 0.9.8 or higher) for cryptographic functions * libcurl for HTTP, HTTPS functions - If you'd like to use TLS module too then use the corresponding LIB - line in auth_identity's Makefile + If you'd like to use TLS module too then use the corresponding LIB line + in auth_identity's Makefile 4. Installation And Running the Authorizer service needs to make the public key, which conveyed in - a certificate, available over HTTPS or HTTP for verifiers. The domain - the authorizer is responsible for and the domain part of the URL of - the certificate must be the same. This service needs access to the - private key too. + a certificate, available over HTTPS or HTTP for verifiers. The domain + the authorizer is responsible for and the domain part of the URL of the + certificate must be the same. This service needs access to the private + key too. 5. Parameters @@ -198,7 +197,7 @@ modparam("auth_identity","privatekey_path","/etc/ssl/private/key.pem") This parameter is required by authentication service. - Example 1.2. Set certificate_path parameter + Example 1.2. Set certificate_path parameter ... modparam("auth_identity","certificate_path","/var/www/ssl/mycert.pem") ... @@ -207,13 +206,13 @@ modparam("auth_identity","certificate_path","/var/www/ssl/mycert.pem") Note: this parameter is for authorizer service. - The url where certificate is available for other verifier services. - (value of Identity-info header) The certificate should be in DER + The url where certificate is available for other verifier services. + (value of Identity-info header) The certificate should be in DER format. This parameter is required by authentication service. - Example 1.3. Set certificate_url parameter + Example 1.3. Set certificate_url parameter ... modparam("auth_identity","certificate_url","https://foo.bar/mycert.der") ... @@ -222,13 +221,13 @@ modparam("auth_identity","certificate_url","https://foo.bar/mycert.der") Note: this parameter is for authorizer service. - If the Date header of message which is needed to be authenticated - contains a time different by more than this seconds from the current + If the Date header of message which is needed to be authenticated + contains a time different by more than this seconds from the current time noted by the authentication service then it rejects the message. This parameter is optional. The default value is "600". - Example 1.4. Set msg_timeout parameter + Example 1.4. Set msg_timeout parameter ... modparam("auth_identity","msg_timeout",600) ... @@ -237,13 +236,13 @@ modparam("auth_identity","msg_timeout",600) Note: this parameter is for verifier service. - The validity time of an authenticated message. The message will be + The validity time of an authenticated message. The message will be refused if it contains a time different by more than this seconds from the current time noted by the verification service. This parameter is optional. The default value is "3600". - Example 1.5. Set auth_validity_time parameter + Example 1.5. Set auth_validity_time parameter ... modparam("auth_identity","auth_validity_time",3600) ... @@ -252,15 +251,15 @@ modparam("auth_identity","auth_validity_time",3600) Note: this parameter is for verifier service. - The number of Call-IDs stored in order to recognize call replay - attacks. A Call-ID is stored auth_validity_time long and uses + The number of Call-IDs stored in order to recognize call replay + attacks. A Call-ID is stored auth_validity_time long and uses approximately 100 bytes memory. - This parameter is optional. The default value is "32768". (you should - increase the size of shared memory with -m command line switch if you + This parameter is optional. The default value is "32768". (you should + increase the size of shared memory with -m command line switch if you liked to store more callid than 10000) - Example 1.6. Set auth_validity_time parameter + Example 1.6. Set auth_validity_time parameter ... modparam("auth_identity","callid_cache_limit",32768) ... @@ -270,12 +269,12 @@ modparam("auth_identity","callid_cache_limit",32768) Note: this parameter is for verifier service. The number of certificates stored in order to avoid needless download. - A certificate is stored until its expiration date and uses + A certificate is stored until its expiration date and uses approximately 600 bytes memory. This parameter is optional. The default value is "4096". - Example 1.7. Set certificate_cache_limit parameter + Example 1.7. Set certificate_cache_limit parameter ... modparam("auth_identity","certificate_cache_limit",4096) ... @@ -284,13 +283,13 @@ modparam("auth_identity","certificate_cache_limit",4096) Note: this parameter is for verifier service. - A file of trusted certificates. The file should contain multiple - certificates in PEM format concatenated together. It could be useful + A file of trusted certificates. The file should contain multiple + certificates in PEM format concatenated together. It could be useful for verifying a certificate signed by a private CA. This parameter is optional. It has not got default value. - Example 1.8. Set cainfo_path parameter + Example 1.8. Set cainfo_path parameter ... modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt") ... @@ -303,38 +302,38 @@ modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt") This parameter is optional. The default value is "0". - Example 1.9. Set accept_pem_certs parameter + Example 1.9. Set accept_pem_certs parameter ... modparam("auth_identity","accept_pem_certs",1) ... 6. Functions - 6.1. auth_date_proc() + 6.1. auth_date_proc() 6.1.1. Dependencies - 6.2. auth_add_identity() + 6.2. auth_add_identity() 6.2.1. Dependencies - 6.3. vrfy_check_date() + 6.3. vrfy_check_date() 6.3.1. Dependencies - 6.4. vrfy_get_certificate() + 6.4. vrfy_get_certificate() 6.4.1. Dependencies - 6.5. vrfy_check_certificate() + 6.5. vrfy_check_certificate() 6.5.1. Dependencies - 6.6. vrfy_check_msgvalidity() + 6.6. vrfy_check_msgvalidity() 6.6.1. Dependencies - 6.7. vrfy_check_callid() + 6.7. vrfy_check_callid() 6.7.1. Dependencies @@ -342,12 +341,12 @@ modparam("auth_identity","accept_pem_certs",1) Note: this function is for authorizer service. - If a message, the auth service should authorize, contains Date header - then this function checks whether it falls in message timeout (set by - msg_timeout parameter). If there is not any Date header then the - module adds one. This function also checks whether the certificate of - the authentication service (set by certificate_path parameter) has - been expired. + If a message, the auth service should authorize, contains Date header + then this function checks whether it falls in message timeout (set by + msg_timeout parameter). If there is not any Date header then the module + adds one. This function also checks whether the certificate of the + authentication service (set by certificate_path parameter) has been + expired. 6.1.1. Dependencies @@ -357,17 +356,17 @@ modparam("auth_identity","accept_pem_certs",1) Note: this function is for authorizer service. - Assembles digest-string from the message, calculates its SHA1 hash, + Assembles digest-string from the message, calculates its SHA1 hash, encrypts it with the private key (set by privatekey_path parameter) of - the authorizer service, base64 encodes it and adds to the outgoing - message as the value of Identity header. This function also adds - Identity-Info header which contains an URI (set by certificate_url + the authorizer service, base64 encodes it and adds to the outgoing + message as the value of Identity header. This function also adds + Identity-Info header which contains an URI (set by certificate_url parameter) from which the certificate of auth service can be acquired. - Note: this function needs the final outgoing message for - authorization, so no module may modify any digest string related - headers (From, To, Call-ID, CSeq, Date, Contact) and body after - auth_add_identity()'s been called + Note: this function needs the final outgoing message for authorization, + so no module may modify any digest string related headers (From, To, + Call-ID, CSeq, Date, Contact) and body after auth_add_identity()'s been + called 6.2.1. Dependencies @@ -377,7 +376,7 @@ modparam("auth_identity","accept_pem_certs",1) Note: this function is for verifier service. - Checks Date header of the incoming message whether falls in validity + Checks Date header of the incoming message whether falls in validity time (set by auth_validity_time parameter) 6.3.1. Dependencies @@ -388,9 +387,9 @@ modparam("auth_identity","accept_pem_certs",1) Note: this function is for verifier service. - Tries to get certificate defined by the value of Identity-info header - from certificate table (which size is set by certificate_cache_limit - parameter). If the required certificate is not found there then this + Tries to get certificate defined by the value of Identity-info header + from certificate table (which size is set by certificate_cache_limit + parameter). If the required certificate is not found there then this function downloads it. 6.4.1. Dependencies @@ -401,9 +400,9 @@ modparam("auth_identity","accept_pem_certs",1) Note: this function is for verifier service. - Checks whether the downloaded certificate is valid (is not expired, - its subject and the domain part of the URL are the same) and adds it - to certificate table. + Checks whether the downloaded certificate is valid (is not expired, its + subject and the domain part of the URL are the same) and adds it to + certificate table. 6.5.1. Dependencies @@ -413,22 +412,22 @@ modparam("auth_identity","accept_pem_certs",1) Note: this function is for verifier service. - Assembles digest-string from the message, create SHA1 hash and - compares it with the decrypted value of Identity header. + Assembles digest-string from the message, create SHA1 hash and compares + it with the decrypted value of Identity header. 6.6.1. Dependencies - vrfy_get_certificate() must be called before and + vrfy_get_certificate() must be called before and vrfy_check_certificate() should be called before 6.7. vrfy_check_callid() Note: this function is for verifier service. - Checks whether the current call's been already processed in validity - time (set by auth_validity_time) to recognize call replay attacks. If + Checks whether the current call's been already processed in validity + time (set by auth_validity_time) to recognize call replay attacks. If this call (identified by Call-id, Cseq, and tag of From header triple) - has not been replayed then adds it to callid table (which size is set + has not been replayed then adds it to callid table (which size is set by callid_cache_limit parameter). 6.7.1. Dependencies diff --git a/modules/auth_identity/auth_crypt.c b/modules/auth_identity/auth_crypt.c index 1cb11ff67..de5b03dc4 100644 --- a/modules/auth_identity/auth_crypt.c +++ b/modules/auth_identity/auth_crypt.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "../../mem/mem.h" #include "../../parser/parse_uri.h" diff --git a/modules/auth_radius/README b/modules/auth_radius/README index e706e08c5..b687a5b5c 100644 --- a/modules/auth_radius/README +++ b/modules/auth_radius/README @@ -28,11 +28,11 @@ Phil Lavin - Copyright 2002, 2003 FhG FOKUS + Copyright © 2002, 2003 FhG FOKUS - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2008-2010 Juha Heinanen + Copyright © 2008-2010 Juha Heinanen __________________________________________________________________ Table of Contents @@ -62,7 +62,7 @@ Phil Lavin List of Examples - 1.1. "SIP-AVP" RADIUS AVP exmaples + 1.1. “SIP-AVP” RADIUS AVP exmaples 1.2. radius_config parameter usage 1.3. service_type parameter usage 1.4. auth_extra parameter usage @@ -120,7 +120,7 @@ Chapter 1. Admin Guide making extra queries. The additional credentials are embedded in the RADIUS reply as AVPs - "SIP-AVP". The syntax of the value is: + “SIP-AVP”. The syntax of the value is: * value = SIP_AVP_NAME SIP_AVP_VALUE * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE @@ -130,7 +130,7 @@ Chapter 1. Admin Guide The RPID value may be fetch via this mechanism. - Example 1.1. "SIP-AVP" RADIUS AVP exmaples + Example 1.1. “SIP-AVP” RADIUS AVP exmaples .... "email:joe@yahoo.com" - STRING NAME AVP (email) with STRING VALUE (joe@yahoo.com) @@ -179,7 +179,7 @@ Chapter 1. Admin Guide This is the location of the configuration file of radius client libraries. - Default value is "/usr/local/etc/radiusclient-ng/radiusclient.conf". + Default value is “/usr/local/etc/radiusclient-ng/radiusclient.conf”. Example 1.2. radius_config parameter usage modparam("auth_radius", "radius_config", "/etc/radiusclient.conf") @@ -190,7 +190,7 @@ modparam("auth_radius", "radius_config", "/etc/radiusclient.conf") default should be fine for most people. See your radius client include files for numbers to be put in this parameter if you need to change it. - Default value is "15". + Default value is “15”. Example 1.3. service_type parameter usage modparam("auth_radius", "service_type", 15) @@ -219,7 +219,7 @@ modparam("auth_radius", "auth_extra", "Acct-Session-Id=$ci") authentication. At the time of this writing, certain versions of Linksys WRT54GL are known to do that. - Default value is "-1". + Default value is “-1”. Example 1.5. use_ruri_flag parameter usage modparam("auth_radius", "use_ruri_flag", 22) diff --git a/modules/auth_radius/authorize.c b/modules/auth_radius/authorize.c index f9c45dd71..19b81225d 100644 --- a/modules/auth_radius/authorize.c +++ b/modules/auth_radius/authorize.c @@ -80,7 +80,7 @@ static inline int authorize(struct sip_msg* _msg, pv_elem_t* _realm, pv_spec_t * _uri_user, hdr_types_t _hftype) { int res; - auth_result_t ret; + auth_cfg_result_t ret; struct hdr_field* h; auth_body_t* cred; str *uri_user; diff --git a/modules/auth_xkeys/README b/modules/auth_xkeys/README index c2cd6aa5a..71050b31f 100644 --- a/modules/auth_xkeys/README +++ b/modules/auth_xkeys/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2015 asipto.com + Copyright © 2015 asipto.com __________________________________________________________________ Table of Contents @@ -141,7 +141,7 @@ modparam("auth_xkeys", "xkey", "id=abc;name=xyz;value=secret;expires=72000") 4.1. auth_xkeys_add(hdr, kid, alg, data) 4.2. auth_xkeys_check(hdr, kid, alg, data) -4.1. auth_xkeys_add(hdr, kid, alg, data) +4.1. auth_xkeys_add(hdr, kid, alg, data) Add a header computed with the first key in the group kid, hasing with algorithm alg over the content of parameter data. The parameters can @@ -156,7 +156,7 @@ modparam("auth_xkeys", "xkey", "id=abc;name=xyz;value=secret;expires=72000") auth_xkeys_add("X-My-Key", "abc", "sha256", "$Ri:$fu:$ru:$hdr(CSeq)"); ... -4.2. auth_xkeys_check(hdr, kid, alg, data) +4.2. auth_xkeys_check(hdr, kid, alg, data) Check if the value of header hdr matches the value computed with the first key in the group kid, hasing with algorithm alg over the content diff --git a/modules/avp/README b/modules/avp/README index e3855ba0e..2885c1cab 100644 --- a/modules/avp/README +++ b/modules/avp/README @@ -10,7 +10,7 @@ Michal Matyska iptel - Copyright 2004, 2005, 2006 FhG FOKUS, iptelorg GmbH + Copyright © 2004, 2005, 2006 FhG FOKUS, iptelorg GmbH __________________________________________________________________ Table of Contents diff --git a/modules/avpops/README b/modules/avpops/README index 889cdc62d..5e6d0c976 100644 --- a/modules/avpops/README +++ b/modules/avpops/README @@ -10,7 +10,7 @@ Ramona-Elena Modroiu - Copyright 2004, 2005 Voice Sistem SRL + Copyright © 2004, 2005 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -242,7 +242,7 @@ modparam("avpops","use_domain",1) Name of column containing the uuid (unique user id). - Default value is "uuid". + Default value is “uuid”. Example 1.5. Set uuid_column parameter ... @@ -253,7 +253,7 @@ modparam("avpops","uuid_column","uuid") Name of column containing the username. - Default value is "username". + Default value is “username”. Example 1.6. Set username_column parameter ... @@ -264,7 +264,7 @@ modparam("avpops","username_column","username") Name of column containing the domain name. - Default value is "domain". + Default value is “domain”. Example 1.7. Set domain_column parameter ... @@ -275,7 +275,7 @@ modparam("avpops","domain_column","domain") Name of column containing the attribute name (AVP name). - Default value is "attribute". + Default value is “attribute”. Example 1.8. Set attribute_column parameter ... @@ -286,7 +286,7 @@ modparam("avpops","attribute_column","attribute") Name of column containing the AVP value. - Default value is "value". + Default value is “value”. Example 1.9. Set value_column parameter ... @@ -297,7 +297,7 @@ modparam("avpops","value_column","value") Name of integer column containing the AVP type. - Default value is "type". + Default value is “type”. Possible column values are * 0 - AVP with string name and string value @@ -325,7 +325,7 @@ modparam("avpops","type_column","type") + 'value_type='('integer'|'string') + 'table='string - Default value is "NULL". + Default value is “NULL”. Example 1.11. Set db_scheme parameter ... @@ -349,7 +349,7 @@ modparam("avpops","db_scheme", 5.12. is_avp_set(name) 5.13. avp_print() -5.1. avp_db_load(source,name) +5.1. avp_db_load(source,name) Loads from DB into memory the AVPs corresponding to the given source. If given, it sets the script flags for loaded AVPs. It returns true if @@ -387,7 +387,7 @@ avp_db_load("$uuid","$avp(s:404fwd)/fwd_table"); avp_db_load("$ru","$avp(i1:123)/$some_scheme"); ... -5.2. avp_db_store(source,name) +5.2. avp_db_store(source,name) Stores to DB the AVPs corresponding to the given source. @@ -403,7 +403,7 @@ avp_db_store("$tu","$avp(i:678)"); avp_db_store("$ru/username","$avp(email)"); ... -5.3. avp_db_delete(source,name) +5.3. avp_db_delete(source,name) Deletes from DB the AVPs corresponding to the given source. @@ -420,7 +420,7 @@ avp_db_delete("$ru/username","$avp(email)"); avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table"); ... -5.4. avp_db_query(query[,dest]) +5.4. avp_db_query(query[,dest]) Make a database query and store the result in AVPs. This command is deprecated, please use the more flexible and advanced sqlops module @@ -436,8 +436,8 @@ avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table"); used in the query makes you vulnerable to SQL injection, e.g. make it possible for an outside attacker to alter your database content. * dest - a list with AVP names where to store the result. The format - is "$avp(name1);$avp(name2);...". If this parameter is ommited, the - result is stored in "$avp(i:1);$avp(i:2);...". If the result gives + is “$avp(name1);$avp(name2);...”. If this parameter is ommited, the + result is stored in “$avp(i:1);$avp(i:2);...”. If the result gives many rows, then multiple AVPs with corresponding name will be added. The value type of the AVP (string or integer) will be derived from the type of the columns. Please note that only this @@ -460,7 +460,7 @@ avp_db_query("select password, ha1 from subscriber where username='$tu'", avp_db_query("delete from subscriber"); ... -5.5. avp_delete(name) +5.5. avp_delete(name) Deletes from memory the AVPs with name or, if empty, all AVPs. @@ -482,7 +482,7 @@ avp_delete("i"); avp_delete("a3"); ... -5.6. avp_pushto(destination,name) +5.6. avp_pushto(destination,name) Pushes the value of AVP(s) into the SIP message. @@ -512,7 +512,7 @@ avp_pushto("$du","$avp(i:679)"); avp_pushto("$br","$avp(i:680)"); ... -5.7. avp_check(name,op_value) +5.7. avp_check(name,op_value) Checks the value of the AVP(s) against an operator and value. @@ -567,7 +567,7 @@ $var(id)=2; avp_check("$xavp(op=>foo[*])","fm/$xavp(op=>fm[$var(id)])/g"); ... -5.8. avp_copy(old_name,new_name) +5.8. avp_copy(old_name,new_name) Copy / move an avp under a new name. @@ -588,7 +588,7 @@ avp_copy("$avp(i:678)", "$avp(s:345)/g"); avp_copy("$avp(old)","$avp(new)/gd"); ... -5.9. avp_printf(dest, format) +5.9. avp_printf(dest, format) NOTE: since Kamailio 1.3.0 the function has been moved to core and it is an alias to pv_printf(). @@ -612,7 +612,7 @@ avp_copy("$avp(old)","$avp(new)/gd"); avp_printf("$avp(i:20)", "This is a $rm request with call-id $hdr(call-id)"); ... -5.10. avp_subst(avps, subst) +5.10. avp_subst(avps, subst) Perl/sed-like subst applied to AVPs having string value. @@ -654,7 +654,7 @@ avp_subst("$avp(i:678)/$avp(i:679)/g", "/(.*)@(.*)/\1@$rd/"); after the first src_avp is processed, it will be added in avp list and next processing will use it. -5.11. avp_op(name,op_value) +5.11. avp_op(name,op_value) Different integer operations with avps. @@ -686,7 +686,7 @@ avp_op("$avp(i:678)", "add/i:345/g"); avp_op("$avp(number)","sub/$avp(number2)/d"); ... -5.12. is_avp_set(name) +5.12. is_avp_set(name) Check if any AVP with name is set. @@ -705,7 +705,7 @@ if(is_avp_set("$avp(i:678)")) log("AVP with integer id 678 exists\n"); ... -5.13. avp_print() +5.13. avp_print() Prints the list with all the AVPs from memory. This is only a helper/debug function. diff --git a/modules/benchmark/README b/modules/benchmark/README index a2193de37..dfa34d8f5 100644 --- a/modules/benchmark/README +++ b/modules/benchmark/README @@ -15,9 +15,9 @@ Bastian Friedrich - Copyright 2007 Collax GmbH + Copyright © 2007 Collax GmbH - Copyright 2007 Voice System SRL + Copyright © 2007 Voice System SRL __________________________________________________________________ Table of Contents @@ -151,7 +151,7 @@ Chapter 1. Admin Guide that feature is implemented. * 1 - Globally enable benchmarking - Default value is "0". + Default value is “0”. Example 1.1. Set enable parameter ... @@ -164,7 +164,7 @@ modparam("benchmark", "enable", 1) function, but only every n'th call. n is defined through this variable. A sensible granularity seems to be 100. - Default value is "1". + Default value is “1”. Example 1.2. Set granularity parameter ... @@ -184,7 +184,7 @@ modparam("benchmark", "granularity", 500) * 2 - L_INFO * 3 - L_DBG - Default value is "3" (L_INFO). + Default value is “3” (L_INFO). Example 1.3. Set loglevel parameter ... @@ -198,16 +198,16 @@ modparam("benchmark", "loglevel", 4) 4.1. bm_start_timer(name) 4.2. bm_log_timer(name) -4.1. bm_start_timer(name) +4.1. bm_start_timer(name) - Start timer "name". A later call to "bm_log_timer()" logs this timer.. + Start timer “name”. A later call to “bm_log_timer()” logs this timer.. Example 1.4. bm_start_timer usage ... bm_start_timer("test"); ... -4.2. bm_log_timer(name) +4.2. bm_log_timer(name) This function logs the timer with the given ID. The following data are logged: @@ -215,7 +215,7 @@ bm_start_timer("test"); equals the granularity variable. * Last sum is the accumulated duration in the current logging - interval (i.e. for the last "granularity" calls). + interval (i.e. for the last “granularity” calls). * Last min is the minimum duration between start/log_timer calls during the last interval. @@ -318,18 +318,18 @@ Chapter 2. Developer Guide 1.2. bm_start(id) 1.3. bm_log(id) -1.1. bm_register(name, mode, id) +1.1. bm_register(name, mode, id) This function register a new timer and/or returns the internal ID associated with the timer. mode controls the creation of new timer if not found. id is to be used by start and log timer functions. -1.2. bm_start(id) +1.2. bm_start(id) This function equals the user-exported function bm_start_timer. The id is passed as an integer, though. -1.3. bm_log(id) +1.3. bm_log(id) This function equals the user-exported function bm_log_timer. The id is passed as an integer, though. diff --git a/modules/blst/README b/modules/blst/README index dc25cd65e..87e6aba63 100644 --- a/modules/blst/README +++ b/modules/blst/README @@ -1,12 +1,11 @@ - Blst Module - Blacklist Management Andrei Pelinescu-Onciul iptelorg GmbH - Copyright 2007 iptelorg GmbH - _________________________________________________________________ + Copyright © 2007 iptelorg GmbH + __________________________________________________________________ Table of Contents @@ -15,14 +14,14 @@ Andrei Pelinescu-Onciul 1. Overview 2. Functions - 2.1. blst_add([timeout]) - 2.2. blst_add_retry_after(min, max) - 2.3. blst_del() - 2.4. blst_is_blacklisted() - 2.5. blst_set_ignore([flags]) - 2.6. blst_rpl_set_ignore([flags]) - 2.7. blst_clear_ignore([flags]) - 2.8. blst_rpl_clear_ignore([flags]) + 2.1. blst_add([timeout]) + 2.2. blst_add_retry_after(min, max) + 2.3. blst_del() + 2.4. blst_is_blacklisted() + 2.5. blst_set_ignore([flags]) + 2.6. blst_rpl_set_ignore([flags]) + 2.7. blst_clear_ignore([flags]) + 2.8. blst_rpl_clear_ignore([flags]) List of Examples @@ -40,14 +39,14 @@ Chapter 1. Admin Guide 1. Overview 2. Functions - 2.1. blst_add([timeout]) - 2.2. blst_add_retry_after(min, max) - 2.3. blst_del() - 2.4. blst_is_blacklisted() - 2.5. blst_set_ignore([flags]) - 2.6. blst_rpl_set_ignore([flags]) - 2.7. blst_clear_ignore([flags]) - 2.8. blst_rpl_clear_ignore([flags]) + 2.1. blst_add([timeout]) + 2.2. blst_add_retry_after(min, max) + 2.3. blst_del() + 2.4. blst_is_blacklisted() + 2.5. blst_set_ignore([flags]) + 2.6. blst_rpl_set_ignore([flags]) + 2.7. blst_clear_ignore([flags]) + 2.8. blst_rpl_clear_ignore([flags]) 1. Overview @@ -55,19 +54,19 @@ Chapter 1. Admin Guide 2. Functions - 2.1. blst_add([timeout]) - 2.2. blst_add_retry_after(min, max) - 2.3. blst_del() - 2.4. blst_is_blacklisted() - 2.5. blst_set_ignore([flags]) - 2.6. blst_rpl_set_ignore([flags]) - 2.7. blst_clear_ignore([flags]) - 2.8. blst_rpl_clear_ignore([flags]) + 2.1. blst_add([timeout]) + 2.2. blst_add_retry_after(min, max) + 2.3. blst_del() + 2.4. blst_is_blacklisted() + 2.5. blst_set_ignore([flags]) + 2.6. blst_rpl_set_ignore([flags]) + 2.7. blst_clear_ignore([flags]) + 2.8. blst_rpl_clear_ignore([flags]) 2.1. blst_add([timeout]) - Adds the source of the current message to the blacklist for timeout - seconds. If timeout is missing or 0 it uses the default blacklist + Adds the source of the current message to the blacklist for timeout + seconds. If timeout is missing or 0 it uses the default blacklist timeout (dst_blacklist_expire). Example 1.1. blst_add usage @@ -80,11 +79,11 @@ else 2.2. blst_add_retry_after(min, max) - Adds the source of the current message to the blacklist for the time - interval specified in the Retry-After header. If the Retry-After - header is missing, it will fail (returns false). If the Retry-After - value is less than min, then min seconds will be used instead. If the - Retry-After value is greater than max, then max seconds will be used + Adds the source of the current message to the blacklist for the time + interval specified in the Retry-After header. If the Retry-After header + is missing, it will fail (returns false). If the Retry-After value is + less than min, then min seconds will be used instead. If the + Retry-After value is greater than max, then max seconds will be used instead. Example 1.2. blst_add_retry_after usage @@ -98,8 +97,8 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds 2.3. blst_del() - Removes the source of the current message from the blacklist. If the - address is not present in the blacklist at the time of the call it + Removes the source of the current message from the blacklist. If the + address is not present in the blacklist at the time of the call it returns false. Example 1.3. blst_del usage @@ -121,24 +120,24 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds 2.5. blst_set_ignore([flags]) - Set errors that will not be taken into account when deciding whether - to blacklist a destination for the current message or a local reply to - the current message. + Set errors that will not be taken into account when deciding whether to + blacklist a destination for the current message or a local reply to the + current message. - blst_set_ignore(..) works for forwarding the current message and - blst_rpl_set_ignore(...) works for local replies to the current + blst_set_ignore(..) works for forwarding the current message and + blst_rpl_set_ignore(...) works for local replies to the current message. - The variants of these functions with no parameters will ignore + The variants of these functions with no parameters will ignore everything (equivalent to passing 0xff). - The flags are stored internally as a bitmask, and are applied by + The flags are stored internally as a bitmask, and are applied by bitwise ANDing them together. The following flags are available: * 0x02 - generic send error (send denied/ failed). * 0x04 - connect failed (TCP, TLS or SCTP). * 0x08 - ICMP error (not currently used). * 0x10 - SIP transaction timeout. - * 0x20 - 503 reply (statefull mode only). For more details see + * 0x20 - 503 reply (statefull mode only). For more details see tmblst_503. Note @@ -156,7 +155,7 @@ Note 2.7. blst_clear_ignore([flags]) - Clears blacklist ignore flags previously set by the corresponding + Clears blacklist ignore flags previously set by the corresponding blst_set_ignore(...) or blst_rpl_set_ignore(...) functions. See also blst_set_ignore. diff --git a/modules/call_control/README b/modules/call_control/README index 28f5f1fe9..9444eef1b 100644 --- a/modules/call_control/README +++ b/modules/call_control/README @@ -10,7 +10,7 @@ Dan Pascu - Copyright (c) 2005-2008 Dan Pascu + Copyright © 2005-2008 Dan Pascu __________________________________________________________________ Table of Contents @@ -178,7 +178,7 @@ Chapter 1. Admin Guide return a code indicating that there is no limit associated with the call, allowing the use of the same configuration without changes. - Default value is "0". + Default value is “0”. Example 1.1. Setting the disable parameter ... @@ -190,7 +190,7 @@ modparam("call_control", "disable", 1) The path to the filesystem socket where the callcontrol application listens for commands from the module. - Default value is "/var/run/callcontrol/socket". + Default value is “/var/run/callcontrol/socket”. Example 1.2. Setting the socket_name parameter ... @@ -202,7 +202,7 @@ modparam("call_control", "socket_name", "/var/run/callcontrol/socket") How long time (in milliseconds) to wait for an answer from the callcontrol application. - Default value is "500" ms. + Default value is “500” ms. Example 1.3. Setting the socket_timeout parameter ... @@ -228,7 +228,7 @@ modparam("call_control", "socket_timeout", 500) call based on caller's SIP URI, caller's SIP domain or caller's IP address (whichever yields a rate forst, in this order). - Default value is "$avp(s:signaling_ip)". + Default value is “$avp(s:signaling_ip)”. Example 1.4. Setting the signaling_ip_avp parameter ... @@ -244,7 +244,7 @@ modparam("call_control", "signaling_ip_avp", "$avp(s:signaling_ip)") have a different, canonical form in the rating engine computation than it has in the ruri. - Default value is "$avp(s:can_uri)". + Default value is “$avp(s:can_uri)”. Example 1.5. Setting the canonical_uri_avp parameter ... @@ -258,7 +258,7 @@ modparam("call_control", "canonical_uri_avp", "$avp(s:can_uri)") by the rating engine as the billing party when finding the rates to apply to a given call, otherwise, the caller's URI taken from the From field will be used. When set, this AVP should contain a value in the - form "user@domain" (no sip: prefix should be used). + form “user@domain” (no sip: prefix should be used). This is useful when a destination diverts a call, thus becoming the new caller. In this case the billing party is the diverter and this AVP @@ -268,7 +268,7 @@ modparam("call_control", "canonical_uri_avp", "$avp(s:can_uri)") because B is the billing party in the call not A after the call was diverted. - Default value is "805". + Default value is “805”. Example 1.6. Setting the diverter_avp_id parameter ... diff --git a/modules/call_control/call_control.c b/modules/call_control/call_control.c index 62af9244f..5450e0055 100644 --- a/modules/call_control/call_control.c +++ b/modules/call_control/call_control.c @@ -985,7 +985,7 @@ __dialog_ended(struct dlg_cell *dlg, int type, struct dlg_cb_params *_params) if( !msg || msg == FAKED_REPLY) msg = _params->req; call_control_stop(msg, dlg->callid); - *_params->param = (void*)CCInactive; + *_params->param = NULL; } } diff --git a/modules/carrierroute/README b/modules/carrierroute/README index 586b01f17..ff3361339 100644 --- a/modules/carrierroute/README +++ b/modules/carrierroute/README @@ -35,7 +35,9 @@ Lucian Balaceanu 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) - 3.11. match_mode (integer) + 3.11. db_load_description (integer) + 3.12. match_mode (integer) + 3.13. avoid_failed_destinations (integer) 4. Functions @@ -112,21 +114,23 @@ Lucian Balaceanu 1.8. Set use_domain parameter 1.9. Set fallback_default parameter 1.10. Set fetch_rows parameter - 1.11. Set match_mode parameter - 1.12. cr_replace_host usage - 1.13. cr_deactivate_host usage - 1.14. cr_activate_host usage - 1.15. cr_add_host usage - 1.16. cr_delete_host usage - 1.17. Configuration example - Routing to default tree - 1.18. Configuration example - Routing to user tree - 1.19. Configuration example - module configuration - 1.20. Example database content - carrierroute table - 1.21. Example database content - simple carrierfailureroute table - 1.22. Example database content - more complex carrierfailureroute table - 1.23. Example database content - carrier_name table - 1.24. Example database content - domain_name table - 1.25. Necessary extensions for the user table + 1.11. Unset db_load_description parameter + 1.12. Set match_mode parameter + 1.13. Set avoid_failed_destinations parameter + 1.14. cr_replace_host usage + 1.15. cr_deactivate_host usage + 1.16. cr_activate_host usage + 1.17. cr_add_host usage + 1.18. cr_delete_host usage + 1.19. Configuration example - Routing to default tree + 1.20. Configuration example - Routing to user tree + 1.21. Configuration example - module configuration + 1.22. Example database content - carrierroute table + 1.23. Example database content - simple carrierfailureroute table + 1.24. Example database content - more complex carrierfailureroute table + 1.25. Example database content - carrier_name table + 1.26. Example database content - domain_name table + 1.27. Necessary extensions for the user table 2.1. Set db_url parameter 2.2. Set carrierroute_table parameter 2.3. Set carrierroute_id_col parameter @@ -180,7 +184,9 @@ Chapter 1. Admin Guide 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) - 3.11. match_mode (integer) + 3.11. db_load_description (integer) + 3.12. match_mode (integer) + 3.13. avoid_failed_destinations (integer) 4. Functions @@ -299,7 +305,9 @@ Chapter 1. Admin Guide 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) - 3.11. match_mode (integer) + 3.11. db_load_description (integer) + 3.12. match_mode (integer) + 3.13. avoid_failed_destinations (integer) 3.1. subscriber_table (string) @@ -425,7 +433,20 @@ modparam("carrierroute", "fallback_default", 1) modparam("carrierroute", "fetch_rows", 3000) ... -3.11. match_mode (integer) +3.11. db_load_description (integer) + + Toggle on/off loading in memory the description column in the + carrierroute/carrierfailureroute database tables. This reduces the + shared memory used by the module. + + Default value is “1”. + + Example 1.11. Unset db_load_description parameter +... +modparam("carrierroute", "db_load_description", 0) +... + +3.12. match_mode (integer) The number of individual characters that are used for matching. Valid values are 10 or 128. When you specifiy 10, only digits will be used @@ -436,11 +457,24 @@ modparam("carrierroute", "fetch_rows", 3000) Default value is “10”. - Example 1.11. Set match_mode parameter + Example 1.12. Set match_mode parameter ... modparam("carrierroute", "match_mode", 10) ... +3.13. avoid_failed_destinations (integer) + + Integer parameter to toggle on/off the possibility that in the + failurerouting cases destinations that previously failed are avoided. + Possible values are 0 (off), 1 (on). Also see cr_route section. + + Default value is “1”. + + Example 1.13. Set avoid_failed_destinations parameter +... +modparam("carrierroute", "avoid_failed_destinations", 0) +... + 4. Functions 4.1. cr_user_carrier(user, domain, dstavp) @@ -500,10 +534,12 @@ descavp) This is useful if you need some additional informations that belongs to each gw, like the destination or the number of channels. - The function pays special attention to the failurerouting cases, so - that any destination that has failed to provide a successful response - will not be reused in a subsequent call of cr_route. This situation can - appear when different route domains contain a set of common gateways. + Depending on the value of the avoid_failed_destinations module + parameter, the function pays special attention to the failurerouting + cases, so that any destination that has failed to provide a successful + response will not be reused in a subsequent call of cr_route. This + situation can appear when different route domains contain a set of + common gateways. This function is only usable with rewrite_user and prefix_matching containing a valid string. This string needs to be numerical if the @@ -648,7 +684,7 @@ dstavp) Use the "null" prefix to specify an empty prefix. - Example 1.12. cr_replace_host usage + Example 1.14. cr_replace_host usage ... kamctl fifo cr_replace_host "-d proxy -p 49 -h proxy1 -t proxy2" ... @@ -669,7 +705,7 @@ kamctl fifo cr_replace_host "-d proxy -p 49 -h proxy1 -t proxy2" Use the "null" prefix to specify an empty prefix. - Example 1.13. cr_deactivate_host usage + Example 1.15. cr_deactivate_host usage ... kamctl fifo cr_deactivate_host "-d proxy -p 49 -h proxy1" ... @@ -684,7 +720,7 @@ kamctl fifo cr_deactivate_host "-d proxy -p 49 -h proxy1" Use the "null" prefix to specify an empty prefix. - Example 1.14. cr_activate_host usage + Example 1.16. cr_activate_host usage ... kamctl fifo cr_activate_host "-d proxy -p 49 -h proxy1" ... @@ -704,7 +740,7 @@ kamctl fifo cr_activate_host "-d proxy -p 49 -h proxy1" Use the "null" prefix to specify an empty prefix. - Example 1.15. cr_add_host usage + Example 1.17. cr_add_host usage ... kamctl fifo cr_add_host "-d proxy -p 49 -h proxy1 -w 0.25" ... @@ -725,14 +761,14 @@ kamctl fifo cr_add_host "-d proxy -p 49 -h proxy1 -w 0.25" Use the "null" prefix to specify an empty prefix. - Example 1.16. cr_delete_host usage + Example 1.18. cr_delete_host usage ... kamctl fifo cr_delete_host "-d proxy -p 49 -h proxy1 -w 0.25" ... 6. Configuration examples - Example 1.17. Configuration example - Routing to default tree + Example 1.19. Configuration example - Routing to default tree ... route { # route calls based on hash over callid @@ -766,7 +802,7 @@ failure_route[2] { # further processing } - Example 1.18. Configuration example - Routing to user tree + Example 1.20. Configuration example - Routing to user tree ... route[1] { cr_user_carrier("$fU", "$fd", "$avp(s:carrier)"); @@ -808,7 +844,7 @@ failure_route[1] { } ... - Example 1.19. Configuration example - module configuration + Example 1.21. Configuration example - module configuration The following config file specifies within the default carrier two domains, each with an prefix that contains two hosts. It is not @@ -891,7 +927,7 @@ domain register { 7.2. Database examples - Example 1.20. Example database content - carrierroute table + Example 1.22. Example database content - carrierroute table ... +----+---------+--------+-------------+-------+------+---------------+ | id | carrier | domain | scan_prefix | flags | prob | rewrite_host | @@ -928,7 +964,7 @@ domain register { flags are not set, the other two rules are used. The “strip”, “mask” and “comment” colums are omitted for brevity. - Example 1.21. Example database content - simple carrierfailureroute + Example 1.23. Example database content - simple carrierfailureroute table ... +----+---------+--------+---------------+------------+-------------+ @@ -950,7 +986,7 @@ domain register { entry in the carrierroute table, otherwise the module will not load the routing data. - Example 1.22. Example database content - more complex + Example 1.24. Example database content - more complex carrierfailureroute table ... +----+---------+-----------+------------+--------+-----+-------------+ @@ -977,7 +1013,7 @@ domain register { that holds domain entries for this routing rules. Not all table colums are show here for brevity. - Example 1.23. Example database content - carrier_name table + Example 1.25. Example database content - carrier_name table ... +----+----------+ | id | carrier | @@ -990,7 +1026,7 @@ domain register { This table contains the mapping of the carrier id to actual names. - Example 1.24. Example database content - domain_name table + Example 1.26. Example database content - domain_name table ... +----+----------+ | id | domain | @@ -1010,7 +1046,7 @@ domain register { specified as modul parameter) to choose the actual carrier for the users. - Example 1.25. Necessary extensions for the user table + Example 1.27. Necessary extensions for the user table Suggested changes: ... diff --git a/modules/cdp/README b/modules/cdp/README index 882b00412..1eec91da5 100644 --- a/modules/cdp/README +++ b/modules/cdp/README @@ -12,9 +12,9 @@ Edited by Richard Good - Copyright 2006 FhG Fokus + Copyright © 2006 FhG Fokus - Copyright 2012 Smile Communications + Copyright © 2012 Smile Communications __________________________________________________________________ Table of Contents @@ -32,6 +32,7 @@ Richard Good 4.1. config_file (string) 4.2. latency_threshold (int) + 4.3. workerq_length_threshold_percentage (int) 5. RPC Commands @@ -121,7 +122,8 @@ Richard Good 1.1. Set config_file parameter 1.2. Set latency_threshold parameter - 1.3. DiameterPeer.xml example + 1.3. Set workerq_length_threshold_percentage parameter + 1.4. DiameterPeer.xml example Chapter 1. Admin Guide @@ -138,6 +140,7 @@ Chapter 1. Admin Guide 4.1. config_file (string) 4.2. latency_threshold (int) + 4.3. workerq_length_threshold_percentage (int) 5. RPC Commands @@ -203,12 +206,13 @@ Chapter 1. Admin Guide 4.1. config_file (string) 4.2. latency_threshold (int) + 4.3. workerq_length_threshold_percentage (int) 4.1. config_file (string) This is the location of the XML configuration file. - Default value is "DiameterPeer.xml". + Default value is “DiameterPeer.xml”. Example 1.1. Set config_file parameter ... @@ -220,13 +224,26 @@ modparam("cdp", "config_file", "/etc/kamailio/diametercfg.xml") The time in ms above which a log error is wrtten to log file for long CDP transactions. - Default value is "500". + Default value is “500”. Example 1.2. Set latency_threshold parameter ... modparam("cdp", "latency_threshold", 1000) ... +4.3. workerq_length_threshold_percentage (int) + + The threshold of the length of the worker queue as a percentage of the + maximum queue size - when exceeded a warning is written to the log + file. 0 means disabled + + Default value is “0”. + + Example 1.3. Set workerq_length_threshold_percentage parameter +... +modparam("cdp", "workerq_length_threshold_percentage", 25) +... + 5. RPC Commands 5.1. cdp.disable_peer @@ -252,7 +269,7 @@ modparam("cdp", "latency_threshold", 1000) This is an example CDP configuration file. The location of this file is configured as a CDP parameter (config_file) - See section 4.1 Above - Example 1.3. DiameterPeer.xml example + Example 1.4. DiameterPeer.xml example anonymous bind) + Default value: “” (empty string --> anonymous bind) Example 1.3. ldap_bind_dn example @@ -358,7 +358,7 @@ ldap_bind_dn = "cn=root,dc=example,dc=com"; Authentication password used to bind to LDAP server (SIMPLE_AUTH). Empty string enables anonymous bind. - Default value: "" (empty string --> anonymous bind) + Default value: “” (empty string --> anonymous bind) Example 1.4. ldap_bind_password example @@ -451,7 +451,7 @@ modparam("ldap", "config_file", "/usr/local/etc/kamailio/ldap.ini") ldap_url An LDAP URL defining the LDAP search operation (refer to - Section 1.2, "LDAP URLs" for a description of the LDAP URL + Section 1.2, “LDAP URLs” for a description of the LDAP URL format). The hostport part must be one of the LDAP session names declared in the LDAP configuration script. @@ -915,7 +915,7 @@ typedef int (*ldap_url_search_t)(char* _ldap_url, Function arguments: char* _ldap_url - LDAP URL as described in Section 1.2, "LDAP URLs". + LDAP URL as described in Section 1.2, “LDAP URLs”. int* _result_count The function stores the number of returned LDAP entries in @@ -1024,7 +1024,7 @@ typedef int (*ldap_str2scope_t)(char* scope_str); 2.7. ldap_rfc4515_escape Applies escaping rules described in Section 5.5, - "ldap_filter_url_encode(string, avp_spec)". + “ldap_filter_url_encode(string, avp_spec)”. typedef int (*ldap_rfc4515_escape_t)(str *sin, str *sout, int url_encode); Function arguments: diff --git a/modules/log_custom/README b/modules/log_custom/README index 411566826..8e93b3c57 100644 --- a/modules/log_custom/README +++ b/modules/log_custom/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2015 asipto.com + Copyright © 2015 asipto.com __________________________________________________________________ Table of Contents @@ -93,7 +93,7 @@ loadmodule "log_custom.so" 4.1. log_udp(text) -4.1. log_udp(text) +4.1. log_udp(text) Send the text to the address specified in core parameter log_engine_data. It is provided as sample function mainly for testing, diff --git a/modules/log_custom/log_custom_mod.c b/modules/log_custom/log_custom_mod.c index b66ec1071..7f61bcf1b 100644 --- a/modules/log_custom/log_custom_mod.c +++ b/modules/log_custom/log_custom_mod.c @@ -126,7 +126,7 @@ static int mod_init(void) } /** - * @brief Initialize async module children + * @brief Initialize module children */ static int child_init(int rank) { @@ -142,6 +142,7 @@ static int child_init(int rank) return -1; } } + LM_DBG("setting udp-send custom logging function\n"); km_log_func_set(&_lc_core_log_udp); _lc_log_udp = 1; @@ -189,8 +190,8 @@ void _lc_core_log_udp(int lpriority, const char *format, ...) va_start(arglist, format); n = 0; - n += snprintf(obuf+n, 1024-n, "(%d) ", my_pid()); - n += vsnprintf(obuf+n, 1024-n, format, arglist); + n += snprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, "(%d) ", my_pid()); + n += vsnprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, format, arglist); va_end(arglist); udp_send(&_lc_udp_dst, obuf, n); } diff --git a/modules/malloc_test/README b/modules/malloc_test/README index 517102fa3..305bcae7e 100644 --- a/modules/malloc_test/README +++ b/modules/malloc_test/README @@ -1,12 +1,11 @@ - The malloc_test Module Andrei Pelinescu-Onciul iptelorg GmbH - Copyright 2010 iptelorg GmbH - _________________________________________________________________ + Copyright © 2010 iptelorg GmbH + __________________________________________________________________ Table of Contents @@ -27,9 +26,9 @@ Andrei Pelinescu-Onciul 4.1. mt.mem_alloc size [unit] 4.2. mt.mem_free [size] [unit] 4.3. mt.mem_used [unit] - 4.4. mt.mem_rnd_alloc min max total [unit] + 4.4. mt.mem_rnd_alloc min max total [unit] 4.5. mt.mem_test_start min max total min_int max_int - total_time [unit] + total_time [unit] 4.6. mt.mem_test_stop id 4.7. mt.mem_test_destroy id @@ -38,8 +37,8 @@ Andrei Pelinescu-Onciul List of Examples - 1.1. Set check_content in the config file - 1.2. Set check_content at runtime via sercmd + 1.1. Set check_content in the config file + 1.2. Set check_content at runtime via sercmd 1.3. men_alloc usage 1.4. mem_free usage 1.5. mt.mem_alloc usage @@ -71,9 +70,9 @@ Chapter 1. Admin Guide 4.1. mt.mem_alloc size [unit] 4.2. mt.mem_free [size] [unit] 4.3. mt.mem_used [unit] - 4.4. mt.mem_rnd_alloc min max total [unit] + 4.4. mt.mem_rnd_alloc min max total [unit] 4.5. mt.mem_test_start min max total min_int max_int total_time - [unit] + [unit] 4.6. mt.mem_test_stop id 4.7. mt.mem_test_destroy id @@ -82,8 +81,8 @@ Chapter 1. Admin Guide 1. Overview - This is a debugging/test module. It implements functions (both script - and rpcs) that can be used to stress the memory allocator or force + This is a debugging/test module. It implements functions (both script + and rpcs) that can be used to stress the memory allocator or force memory leaks. Warning @@ -96,7 +95,7 @@ Warning 2.1. check_content - When doing the tests, check also for the possibility of the memory + When doing the tests, check also for the possibility of the memory being overwritten. When activated, the allocated memory will be filled with a special pattern, that will be checked on free. @@ -104,10 +103,10 @@ Warning It can be changed also at runtime, via the rpc interface. - Example 1.1. Set check_content in the config file + Example 1.1. Set check_content in the config file modparam("malloc_test", "check_content", 1) - Example 1.2. Set check_content at runtime via sercmd + Example 1.2. Set check_content at runtime via sercmd $ kamcmd cfg.set_now_int malloc_test check_content 1 3. Functions @@ -121,7 +120,7 @@ $ kamcmd cfg.set_now_int malloc_test check_content 1 Note - This is a debugging function for simulating memory leaks or stressing + This is a debugging function for simulating memory leaks or stressing the memory allocator. It should not be used in production setups Example 1.3. men_alloc usage @@ -135,7 +134,7 @@ mem_alloc(1048576); # 1MB Note - This is a debugging function for simulating memory leaks or stressing + This is a debugging function for simulating memory leaks or stressing the memory allocator. It should not be used in production setups Example 1.4. mem_free usage @@ -148,9 +147,8 @@ mem_free(); 4.1. mt.mem_alloc size [unit] 4.2. mt.mem_free [size] [unit] 4.3. mt.mem_used [unit] - 4.4. mt.mem_rnd_alloc min max total [unit] + 4.4. mt.mem_rnd_alloc min max total [unit] 4.5. mt.mem_test_start min max total min_int max_int total_time [unit] - 4.6. mt.mem_test_stop id 4.7. mt.mem_test_destroy id 4.8. mt.mem_test_destroy_all id @@ -158,7 +156,7 @@ mem_free(); 4.1. mt.mem_alloc size [unit] - Allocates the specified number of bytes. unit is optional and can be + Allocates the specified number of bytes. unit is optional and can be one of: * b - bytes * k - KB @@ -170,7 +168,7 @@ mem_free(); 4.2. mt.mem_free [size] [unit] - Frees at least size bytes from the memory allocated by other + Frees at least size bytes from the memory allocated by other malloc_test functions (e.g. mt.mem_alloc). size is optional. If missing, everything will be freed. @@ -186,7 +184,7 @@ mem_free(); 4.3. mt.mem_used [unit] - Returns/displays how many bytes are allocated. The default unit is + Returns/displays how many bytes are allocated. The default unit is bytes (for all the possible units see above). unit is optional and can be one of: @@ -201,8 +199,8 @@ mem_free(); 4.4. mt.mem_rnd_alloc min max total [unit] - Allocates total_size memory, in pieces of random size between min .. - max (inclusive). unit is optional and represents the unit for all the + Allocates total_size memory, in pieces of random size between min .. + max (inclusive). unit is optional and represents the unit for all the given sizes (see above). Example 1.8. mt.mem_rnd_alloc usage @@ -210,12 +208,12 @@ mem_free(); 4.5. mt.mem_test_start min max total min_int max_int total_time [unit] - Starts a malloc test that will take total_time to execute. Memory - allocations will be performed at intervals randomly chosen between - min_int and max_int (in ms). Each allocation will have a randomly + Starts a malloc test that will take total_time to execute. Memory + allocations will be performed at intervals randomly chosen between + min_int and max_int (in ms). Each allocation will have a randomly chosen size between min and max unit bytes. After total unit bytes are - allocated, everything is released/freed again and the allocations are - restarted. All the times are expressed in milliseconds. unit is + allocated, everything is released/freed again and the allocations are + restarted. All the times are expressed in milliseconds. unit is optional and represents the unit for all the given sizes (see above). Several tests can be run in parallel. @@ -235,8 +233,8 @@ mem_free(); 4.7. mt.mem_test_destroy id - Destroys the test indentified by id (besides stopping it, it also - frees all the data, including the statistics). + Destroys the test indentified by id (besides stopping it, it also frees + all the data, including the statistics). Example 1.11. mt.mem_test_destroy usage $ kamcmd mt.mem_test_destroy 1 @@ -250,10 +248,10 @@ mem_free(); 4.9. mt.mem_test_list [id] [unit] - Returns/displays data about the test identified by id, or if no id is + Returns/displays data about the test identified by id, or if no id is specified, it lists all the tests (running or stopped). - unit is optional. The default is is bytes (for all the possible units + unit is optional. The default is is bytes (for all the possible units see above). Example 1.13. mt.mem_test_list usage diff --git a/modules/mangler/README b/modules/mangler/README index 5ec562209..f023ecde9 100644 --- a/modules/mangler/README +++ b/modules/mangler/README @@ -4,7 +4,7 @@ Gabriel Vasile FhG FOKUS - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -86,7 +86,7 @@ modparam("mangler", "contact_flds_separator", "-") 3.4. decode_contact() 3.5. decode_contact_header() -3.1. sdp_mangle_ip(pattern, newip) +3.1. sdp_mangle_ip(pattern, newip) Changes IP addresses inside SDP document in lines describing connections like c=IN IP4 . Currently this function only changes IP4 @@ -107,7 +107,7 @@ modparam("mangler", "contact_flds_separator", "-") sdp_mangle_ip("10.0.0.0/8","193.175.135.38"); ... -3.2. sdp_mangle_port(offset) +3.2. sdp_mangle_port(offset) Changes ports in SDP document in lines starting a media section like "m=audio 13451". @@ -123,7 +123,7 @@ sdp_mangle_ip("10.0.0.0/8","193.175.135.38"); sdp_mangle_port("-12000"); ... -3.3. encode_contact(encoding_prefix) +3.3. encode_contact(encoding_prefix) This function will encode URIs inside the "Contact" header in the following manner "sip:username:password@ip:port;transport=protocol" @@ -142,7 +142,7 @@ sdp_mangle_port("-12000"); if (src_ip == 10.0.0.0/8) encode_contact("enc_prefix","193.175.135.38"); ... -3.4. decode_contact() +3.4. decode_contact() This function will decode the URI in first line in packets which come with encoded URI in the following manner @@ -160,7 +160,7 @@ if (src_ip == 10.0.0.0/8) encode_contact("enc_prefix","193.175.135.38"); if (uri =~ "^enc*") { decode_contact(); } ... -3.5. decode_contact_header() +3.5. decode_contact_header() This function will decode URIs inside the "Contact" header in the same manner as decode_contact(). The difference is that no dst_uri is set diff --git a/modules/matrix/README b/modules/matrix/README index 69e50899d..93b357d84 100644 --- a/modules/matrix/README +++ b/modules/matrix/README @@ -11,7 +11,7 @@ Henning Westerholt 1&1 Internet AG - Copyright 2008 1&1 Internet AG + Copyright © 2008 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -139,7 +139,7 @@ Chapter 1. Admin Guide The URL for the database connection. - Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 1.1. Set db_url parameter ... @@ -150,7 +150,7 @@ modparam("matrix", "db_url", "mysql://kamailioro:kamailioro@localhost/kamailio") The name of the table containing the matrix data. - Default value is "matrix". + Default value is “matrix”. Example 1.2. Set matrix_table parameter ... @@ -161,7 +161,7 @@ modparam("matrix", "matrix_table", "matrix") The name of the column containing the first row in the matrix. - Default value is "first". + Default value is “first”. Example 1.3. Set matrix_first_col parameter ... @@ -172,7 +172,7 @@ modparam("matrix", "matrix_first_col", "first") The name of the column containing the second row in the matrix. - Default value is "second". + Default value is “second”. Example 1.4. Set matrix_second_col parameter ... @@ -183,7 +183,7 @@ modparam("matrix", "matrix_second_col", "second") The name of the column containing the result ID to be used. - Default value is "res". + Default value is “res”. Example 1.5. Set matrix_res_col parameter ... @@ -194,7 +194,7 @@ modparam("matrix", "matrix_res_col", "res") 4.1. matrix (string first, string second, string dstavp) -4.1. matrix (string first, string second, string dstavp) +4.1. matrix (string first, string second, string dstavp) Looks up the desired result ID in the matrix for the given column and value and saves the result in dstavp. Returns false if the cell is not @@ -213,7 +213,7 @@ cr_route("$avp(route_tree)", "$rd", "$rU", "$rU", "call_id"); 5.1. reload_matrix -5.1. reload_matrix +5.1. reload_matrix Reloads the internal matrix representation from the database. This is necessary after entries in the database have been changed. @@ -264,7 +264,7 @@ Chapter 2. Module parameter for database access. URL to the database containing the data. - Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 2.1. Set db_url parameter ... @@ -275,7 +275,7 @@ modparam("matrix", "db_url", "dbdriver://username:password@dbhost/dbname") Name of the matrix table for the matrix module. - Default value is "matrix". + Default value is “matrix”. Example 2.2. Set matrix_table parameter ... diff --git a/modules/maxfwd/README b/modules/maxfwd/README index f381e66fb..e18aa9b61 100644 --- a/modules/maxfwd/README +++ b/modules/maxfwd/README @@ -8,7 +8,7 @@ Edited by Bogdan-Andrei Iancu - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -99,7 +99,7 @@ Chapter 1. Admin Guide Set an upper limit for the max-forward value in the outgoing requests. If the header is present, the decremented value is not allowed to exceed this max_limits - if it does, the header value will by decreased - to "max_limit". + to “max_limit”. Note: This check is done when calling the maxfwd_process() function. @@ -107,7 +107,7 @@ Chapter 1. Admin Guide MAX-FORWARDS value allowed by RFC 3261. The value can be changed at runtime. - Default value is "70". + Default value is “70”. Example 1.1. Set max_limit parameter ... @@ -123,10 +123,10 @@ modparam("maxfwd", "max_limit", 32) 4.5. maxfwd_at_least(max_value) 4.6. mf_lowlimit(max_value) -4.1. maxfwd_process(max_value) +4.1. maxfwd_process(max_value) If no Max-Forward header is present in the received request, a header - will be added having the original value equal with "max_value". If a + will be added having the original value equal with “max_value”. If a Max-Forward header is already present, its value will be decremented (if not 0). The parameter can be a variable. @@ -139,8 +139,8 @@ modparam("maxfwd", "max_limit", 32) decremented). * -2 (false) - error during processing. - The return code may be extensivly tested via script variable "retcode" - (or "$?"). + The return code may be extensivly tested via script variable “retcode” + (or “$?”). Meaning of the parameters is as follows: * max_value - Value to be added if there is no Max-Forwards header @@ -158,30 +158,30 @@ if (!maxfwd_process("10") && $retcode==-1) { }; ... -4.2. mf_process_maxfwd_header(max_value) +4.2. mf_process_maxfwd_header(max_value) Same as maxfwd_process(max_value). -4.3. process_maxfwd(max_value) +4.3. process_maxfwd(max_value) Same as maxfwd_process(max_value). -4.4. is_maxfwd_lt(max_value) +4.4. is_maxfwd_lt(max_value) - Checks if the Max-Forward header value is less then the "max_value" + Checks if the Max-Forward header value is less then the “max_value” parameter value. It considers also the value of the new inserted header (if locally added). The parameter can be a variable. Retuning codes: * 1 (true) - header was found or set and its value is stricly less - than "max_value". + than “max_value”. * -1 (false) - the header was found or set and its value is greater - or equal to "max_value". + or equal to “max_value”. * -2 (false) - header was not found or not set. * -3 (false) - error during processing. - The return code may be extensivly tested via script variable "retcode" - (or "$?"). + The return code may be extensivly tested via script variable “retcode” + (or “$?”). Meaning of the parameters is as follows: * max_value - value to check the Max-Forward.value against (as less @@ -197,10 +197,10 @@ if ( is_maxfwd_lt("1") ) { }; ... -4.5. maxfwd_at_least(max_value) +4.5. maxfwd_at_least(max_value) Same as is_maxfwd_lt(max_value). -4.6. mf_lowlimit(max_value) +4.6. mf_lowlimit(max_value) Same as is_maxfwd_lt(max_value). diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c index 3bca16d16..df338b915 100644 --- a/modules/mediaproxy/mediaproxy.c +++ b/modules/mediaproxy/mediaproxy.c @@ -1926,7 +1926,7 @@ __dialog_ended(struct dlg_cell *dlg, int type, struct dlg_cb_params *_params) { if ((int)(long)*_params->param == MPActive) { end_media_session(dlg->callid, dlg->tag[DLG_CALLER_LEG], dlg->tag[DLG_CALLEE_LEG]); - *_params->param = MPInactive; + *_params->param = NULL; } } diff --git a/modules/mi_datagram/README b/modules/mi_datagram/README index b041f7e35..6930a61d7 100644 --- a/modules/mi_datagram/README +++ b/modules/mi_datagram/README @@ -8,7 +8,7 @@ Edited by Andreea-Ancuta Onofrei - Copyright 2007 Voice Sistem SRL + Copyright © 2007 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -194,7 +194,7 @@ modparam("mi_datagram", "socket_timeout", 2000) Strings to be used for line indentation. As the MI data structure is tree oriendeted, the depth level will printed as identation. - Default value is ""\t" (TAB)". + Default value is “"\t" (TAB)”. Example 1.7. Set reply_ident parameter ... @@ -207,8 +207,8 @@ modparam("mi_datagram", "reply_ident", " ") 6. Example - This is an example showing the DATAGRAM format for the "get_statistics - dialog: tm:" MI commad: response. + This is an example showing the DATAGRAM format for the “get_statistics + dialog: tm:” MI commad: response. Example 1.8. DATAGRAM request :get_statistics:\n @@ -225,44 +225,44 @@ Chapter 2. Frequently Asked Questions 2.1. - Both UNIX and UDP type of socket can be created simultaneusly? + Both UNIX and UDP type of socket can be created simultaneusly? - This version supports only one kind of socket at a time. If there are - more than one value set for socket_name the last one will take effect. + This version supports only one kind of socket at a time. If there are + more than one value set for socket_name the last one will take effect. 2.2. - Is there a limit in the datagram request's size? + Is there a limit in the datagram request's size? - The maximum length of a datagram request or reply is 65457 bytes. + The maximum length of a datagram request or reply is 65457 bytes. 2.3. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 2.4. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 2.5. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + https://github.com/kamailio/kamailio/issues. diff --git a/modules/mi_fifo/README b/modules/mi_fifo/README index a9a83036d..be41e7768 100644 --- a/modules/mi_fifo/README +++ b/modules/mi_fifo/README @@ -8,7 +8,7 @@ Edited by Bogdan-Andrei Iancu - Copyright 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -166,7 +166,7 @@ modparam("mi_fifo", "fifo_user", "root") Directory to be used for creating the reply FIFO files. - Default value is "/tmp/" + Default value is “/tmp/” Example 1.5. Set reply_dir parameter ... @@ -178,7 +178,7 @@ modparam("mi_fifo", "reply_dir", "/home/kamailio/tmp/") Strings to be used for line indentation. As the MI data structure is tree oriented, the depth level will be printed as indentation. - Default value is ""\t" (TAB)". + Default value is “"\t" (TAB)”. Example 1.6. Set reply_indent parameter ... @@ -191,8 +191,8 @@ modparam("mi_fifo", "reply_indent", " ") 6. Example - This is an example showing the FIFO format for the "get_statistics - dialog: tm:" MI command response. + This is an example showing the FIFO format for the “get_statistics + dialog: tm:” MI command response. Example 1.7. FIFO request :get_statistics:reply_fifo\n diff --git a/modules/mi_rpc/README b/modules/mi_rpc/README index 693fb8790..56a2685c9 100644 --- a/modules/mi_rpc/README +++ b/modules/mi_rpc/README @@ -11,7 +11,7 @@ Daniel-Constantin Mierla - Copyright 2009 http://www.asipto.com + Copyright © 2009 http://www.asipto.com __________________________________________________________________ Table of Contents @@ -112,7 +112,7 @@ modparam("mi_rpc","rpc_url","tcp:localhost:2046") 5.1. mi mi_dg mi_fifo mi_xmlrpc -5.1. mi mi_dg mi_fifo mi_xmlrpc +5.1. mi mi_dg mi_fifo mi_xmlrpc Execute a MI command. diff --git a/modules/mi_xmlrpc/README b/modules/mi_xmlrpc/README index 27eddbd4f..0749f5ba4 100644 --- a/modules/mi_xmlrpc/README +++ b/modules/mi_xmlrpc/README @@ -12,7 +12,7 @@ Edited by Juha Heinanen - Copyright 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -120,7 +120,7 @@ Chapter 1. Admin Guide If libxmlrpc-c3[-dev] package is not available on your system, you may check if packages for your OS are not available on the - "xmlrpc-c"project ( http://xmlrpc-c.sourceforge.net/). Otherwise you + “xmlrpc-c”project ( http://xmlrpc-c.sourceforge.net/). Otherwise you need to install the library and devel headers from the sources. 4. Parameters @@ -190,8 +190,8 @@ modparam("mi_xmlrpc", "buffer_size", 8192) 6. Example - This is an example showing the xmlrpc format for the "get_statistics - dialog: tm:" MI commad: response. + This is an example showing the xmlrpc format for the “get_statistics + dialog: tm:” MI commad: response. Example 1.5. XMLRPC request POST /RPC2 HTTP/1.0 diff --git a/modules/misc_radius/README b/modules/misc_radius/README index 7136e76bc..62685c59a 100644 --- a/modules/misc_radius/README +++ b/modules/misc_radius/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2004-2008 Juha Heinanen + Copyright © 2004-2008 Juha Heinanen __________________________________________________________________ Table of Contents @@ -47,7 +47,7 @@ Daniel-Constantin Mierla List of Examples - 1.1. "SIP-AVP" RADIUS AVP exmaples + 1.1. “SIP-AVP” RADIUS AVP exmaples 1.2. radius_config parameter usage 1.3. caller_service_type parameter usage 1.4. callee_service_type parameter usage @@ -113,7 +113,7 @@ Chapter 1. Admin Guide * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE - Example 1.1. "SIP-AVP" RADIUS AVP exmaples + Example 1.1. “SIP-AVP” RADIUS AVP exmaples .... "email:joe@yahoo.com" -> STRING NAME AVP (email) with STRING VALUE (joe@yahoo.com) @@ -126,7 +126,7 @@ Chapter 1. Admin Guide .... Unlike in old avp_radius module, functions radius_load_calle[re]_avps() - do not prefix string names of AVPs by string "caller_" or "callee_" + do not prefix string names of AVPs by string “caller_” or “callee_” depending if caller's or callee's attributes were loaded. If you need these prefixes, make your RADIUS server to prepend them into attribute names when it constructs reply items. @@ -177,7 +177,7 @@ Chapter 1. Admin Guide This is the location of the configuration file of radius client libraries. - Default value is "/usr/local/etc/radiusclient-ng/radiusclient.conf". + Default value is “/usr/local/etc/radiusclient-ng/radiusclient.conf”. Example 1.2. radius_config parameter usage ... @@ -188,7 +188,7 @@ modparam("misc_radius", "radius_config", "/etc/radiusclient.conf") This is the value of the Service-Type radius attribute to be used, when caller's attributes are loaded. - Default value is dictionary value of "SIP-Caller-AVPs" Service-Type. + Default value is dictionary value of “SIP-Caller-AVPs” Service-Type. Example 1.3. caller_service_type parameter usage ... @@ -199,7 +199,7 @@ modparam("misc_radius", "caller_service_type", 18) This is the value of the Service-Type radius attribute to be used, when callee's attributes are loaded. - Default value is dictionary value of "SIP-Callee-AVPs" Service-Type. + Default value is dictionary value of “SIP-Callee-AVPs” Service-Type. Example 1.4. callee_service_type parameter usage ... @@ -210,7 +210,7 @@ modparam("misc_radius", "callee_service_type", 19) This is the value of Service-Type RADIUS attribute to be used, when radius_is_user_in() function is called. - Default value is dictionary value of "Group-Check" Service-Type. + Default value is dictionary value of “Group-Check” Service-Type. Example 1.5. group_service_type parameter usage ... @@ -221,7 +221,7 @@ modparam("misc_radius", "group_service_type", 20) This is the value of Service-Type RADIUS attribute to be used, when radius_does_uri[_user]_exist() function is called. - Default value is dictionary value of "Call-Check" Service-Type. + Default value is dictionary value of “Call-Check” Service-Type. Example 1.6. uri_service_type parameter usage ... @@ -302,7 +302,7 @@ modparam("misc_radius", "use_sip_uri_host", 1) as AVPs in radius_load_caller_avps and radius_load_callee_avps with name as radius attribute name and value as radius attribute value. - Default value is "0". + Default value is “0”. Example 1.12. common_response parameter usage ... @@ -344,7 +344,7 @@ eout#161 next-hop-ip:h323/0001111@myvoip-gate.kamailio.org" 4.1. radius_load_caller_avps(caller) The functions loads caller's attributes from radius and stores them - into AVPs. Parameter "caller" is a string that may contain pseudo + into AVPs. Parameter “caller” is a string that may contain pseudo variables. It indicates the user, whose attributes are loaded. This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. @@ -359,7 +359,7 @@ radius_load_caller_avps("$au@$ar"); # take caller from Authorization 4.2. radius_load_callee_avps(callee) The functions loads callee's attributes from radius and stores them - into AVPs. Parameter "callee" is a string that may contain pseudo + into AVPs. Parameter “callee” is a string that may contain pseudo variables. It indicates the user, whose attributes are loaded. This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. diff --git a/modules/misc_radius/functions.c b/modules/misc_radius/functions.c index fb9ec784c..e171468a7 100644 --- a/modules/misc_radius/functions.c +++ b/modules/misc_radius/functions.c @@ -44,7 +44,7 @@ static inline int extract_avp(VALUE_PAIR* vp, unsigned short *flags, char *end; /* empty? */ - if (vp->lvalue==0 || vp->strvalue==0) + if (vp->lvalue==0) goto error; p = vp->strvalue; diff --git a/modules/mohqueue/README b/modules/mohqueue/README index ab9cf1e23..8094ed0ce 100644 --- a/modules/mohqueue/README +++ b/modules/mohqueue/README @@ -136,8 +136,8 @@ Chapter 1. Admin Guide Example 1.1. Set db_url: ... -modparam ("mohqueue", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio -") +modparam ("mohqueue", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio" +) ... 3.2. db_qtable and db_ctable (str) diff --git a/modules/mqueue/README b/modules/mqueue/README index 952e90043..e4a4cec0e 100644 --- a/modules/mqueue/README +++ b/modules/mqueue/README @@ -17,7 +17,7 @@ Alex Balashov Evariste Systems - Copyright 2010 Elena-Ramona Modroiu (asipto.com) + Copyright © 2010 Elena-Ramona Modroiu (asipto.com) __________________________________________________________________ Table of Contents @@ -109,7 +109,7 @@ Chapter 1. Admin Guide Definition of a memory queue - Default value is "none". + Default value is “none”. Value must be a list of parameters: attr=value;... The attribute 'name' is mandatory, defining the name of the queue. Optional attribute 'size' @@ -132,7 +132,7 @@ modparam("mqueue", "mqueue", "name=qaz") 4.3. mq_pv_free(queue) 4.4. mq_size(queue) -4.1. mq_add(queue, key, value) +4.1. mq_add(queue, key, value) Add a new item (key, value) in the queue. If max size of queue is exceeded, the oldest one is removed. @@ -142,7 +142,7 @@ modparam("mqueue", "mqueue", "name=qaz") mq_add("myq", "$rU", "call from $fU"); ... -4.2. mq_fetch(queue) +4.2. mq_fetch(queue) Take oldest item from queue and fill $mqk(queue) and $mqv(queue) pseudo variables. @@ -158,7 +158,7 @@ while(mq_fetch("myq")) } ... -4.3. mq_pv_free(queue) +4.3. mq_pv_free(queue) Free the item fetched in pseudo-variables. It is optional, a new fetch frees the previous values. @@ -168,7 +168,7 @@ while(mq_fetch("myq")) mq_pv_free("myq"); ... -4.4. mq_size(queue) +4.4. mq_size(queue) Returns the current number of elements in the mqueue. diff --git a/modules/msilo/README b/modules/msilo/README index 06e8fbf27..5d4ff2146 100644 --- a/modules/msilo/README +++ b/modules/msilo/README @@ -20,9 +20,9 @@ Juha Heinanen - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS - Copyright 2009 Juha Heinanen + Copyright © 2009 Juha Heinanen __________________________________________________________________ Table of Contents @@ -87,36 +87,36 @@ Juha Heinanen List of Examples - 1.1. Set the "db_url" parameter - 1.2. Set the "db_table" parameter - 1.3. Set the "sc_mid" parameter - 1.4. Set the "sc_from" parameter - 1.5. Set the "sc_to" parameter - 1.6. Set the "sc_uri_user" parameter - 1.7. Set the "sc_uri_host" parameter - 1.8. Set the "sc_body" parameter - 1.9. Set the "sc_ctype" parameter - 1.10. Set the "sc_exp_time" parameter - 1.11. Set the "sc_inc_time" parameter - 1.12. Set the "sc_snd_time" parameter - 1.13. Set the "from_address" parameter - 1.14. Set the "contact_hdr" parameter - 1.15. Set the "extra_hdrs" parameter - 1.16. Set the "offline_message" parameter - 1.17. Set the "content_type_hdr" parameter - 1.18. Set the "reminder" parameter - 1.19. Set the "outbound_proxy" parameter - 1.20. Set the "expire_time" parameter - 1.21. Set the "check_time" parameter - 1.22. Set the "send_time" parameter - 1.23. Set the "clean_period" parameter - 1.24. Set the "use_contact" parameter - 1.25. Set the "snd_time_avp" parameter - 1.26. Set the "add_date" parameter - 1.27. Set the "max_messages" parameter - 1.28. Set the "add_contact" parameter - 1.29. Set the "extra_hdrs_avp" parameter - 1.30. Set the "skip_notification_flag" parameter + 1.1. Set the “db_url” parameter + 1.2. Set the “db_table” parameter + 1.3. Set the “sc_mid” parameter + 1.4. Set the “sc_from” parameter + 1.5. Set the “sc_to” parameter + 1.6. Set the “sc_uri_user” parameter + 1.7. Set the “sc_uri_host” parameter + 1.8. Set the “sc_body” parameter + 1.9. Set the “sc_ctype” parameter + 1.10. Set the “sc_exp_time” parameter + 1.11. Set the “sc_inc_time” parameter + 1.12. Set the “sc_snd_time” parameter + 1.13. Set the “from_address” parameter + 1.14. Set the “contact_hdr” parameter + 1.15. Set the “extra_hdrs” parameter + 1.16. Set the “offline_message” parameter + 1.17. Set the “content_type_hdr” parameter + 1.18. Set the “reminder” parameter + 1.19. Set the “outbound_proxy” parameter + 1.20. Set the “expire_time” parameter + 1.21. Set the “check_time” parameter + 1.22. Set the “send_time” parameter + 1.23. Set the “clean_period” parameter + 1.24. Set the “use_contact” parameter + 1.25. Set the “snd_time_avp” parameter + 1.26. Set the “add_date” parameter + 1.27. Set the “max_messages” parameter + 1.28. Set the “add_contact” parameter + 1.29. Set the “extra_hdrs_avp” parameter + 1.30. Set the “skip_notification_flag” parameter 1.31. m_store usage 1.32. m_dump usage 1.33. Kamailio config script - sample msilo usage @@ -188,12 +188,12 @@ Chapter 1. Admin Guide them when the user comes back online. It can also send reminders and auto-expire messages. - For each message, the modules stores "Request-URI" ("R-URI") only if it - is a complete address of record ("username@hostname"), URI from "To" - header, URI from "From" header, incoming time, expiration time, content - type and body of the message. If "R-URI" is not an address of record + For each message, the modules stores “Request-URI” (“R-URI”) only if it + is a complete address of record (“username@hostname”), URI from “To” + header, URI from “From” header, incoming time, expiration time, content + type and body of the message. If “R-URI” is not an address of record (it might be the contact address for current SIP session) the URI from - "To" header will be used as R-URI. + “To” header will be used as R-URI. When the expiration time is passed, the message is discarded from database. Expiration time is computed based on incoming time and one of @@ -205,7 +205,7 @@ Chapter 1. Admin Guide be deleted. It may happen that the SIP user registering use a SIP User Agent that - has no support for MESSAGE requests. In this case the "failure_route" + has no support for MESSAGE requests. In this case the “failure_route” should be used to re-store the undelivered requests. Another functionality provided by the MSILO module is to send messages @@ -222,7 +222,7 @@ Chapter 1. Admin Guide The following modules must be loaded before this module: * database module - mysql, dbtext or other module that implements the - "db" interface and provides support for storing/receiving data + “db” interface and provides support for storing/receiving data to/from a database system. * TM--transaction module-- used to send SIP requests. @@ -269,9 +269,9 @@ Chapter 1. Admin Guide Database URL. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. - Example 1.1. Set the "db_url" parameter + Example 1.1. Set the “db_url” parameter ... modparam("msilo", "db_url", "mysql://user:passwd@host.com/dbname") ... @@ -280,9 +280,9 @@ modparam("msilo", "db_url", "mysql://user:passwd@host.com/dbname") The name of table where to store the messages. - Default value is "silo". + Default value is “silo”. - Example 1.2. Set the "db_table" parameter + Example 1.2. Set the “db_table” parameter ... modparam("msilo", "db_table", "silo") ... @@ -291,9 +291,9 @@ modparam("msilo", "db_table", "silo") The name of the column in silo table used to store the message id. - Default value is "mid". + Default value is “mid”. - Example 1.3. Set the "sc_mid" parameter + Example 1.3. Set the “sc_mid” parameter ... modparam("msilo", "sc_mid", "other_mid") ... @@ -302,9 +302,9 @@ modparam("msilo", "sc_mid", "other_mid") The name of the column in silo table, storing the source address. - Default value is "src_addr". + Default value is “src_addr”. - Example 1.4. Set the "sc_from" parameter + Example 1.4. Set the “sc_from” parameter ... modparam("msilo", "sc_from", "source_address") ... @@ -313,9 +313,9 @@ modparam("msilo", "sc_from", "source_address") The name of the column in silo table, storing the destination address. - Default value is "dst_addr". + Default value is “dst_addr”. - Example 1.5. Set the "sc_to" parameter + Example 1.5. Set the “sc_to” parameter ... modparam("msilo", "sc_to", "destination_address") ... @@ -324,9 +324,9 @@ modparam("msilo", "sc_to", "destination_address") The name of the column in silo table, storing the user name. - Default value is "username". + Default value is “username”. - Example 1.6. Set the "sc_uri_user" parameter + Example 1.6. Set the “sc_uri_user” parameter ... modparam("msilo", "sc_uri_user", "user") ... @@ -335,9 +335,9 @@ modparam("msilo", "sc_uri_user", "user") The name of the column in silo table, storing the domain. - Default value is "domain". + Default value is “domain”. - Example 1.7. Set the "sc_uri_host" parameter + Example 1.7. Set the “sc_uri_host” parameter ... modparam("msilo", "sc_uri_host", "domain") ... @@ -346,9 +346,9 @@ modparam("msilo", "sc_uri_host", "domain") The name of the column storing the message body in silo table. - Default value is "body". + Default value is “body”. - Example 1.8. Set the "sc_body" parameter + Example 1.8. Set the “sc_body” parameter ... modparam("msilo", "sc_body", "message_body") ... @@ -357,9 +357,9 @@ modparam("msilo", "sc_body", "message_body") The name of the column in silo table, storing content type. - Default value is "ctype". + Default value is “ctype”. - Example 1.9. Set the "sc_ctype" parameter + Example 1.9. Set the “sc_ctype” parameter ... modparam("msilo", "sc_ctype", "content_type") ... @@ -369,9 +369,9 @@ modparam("msilo", "sc_ctype", "content_type") The name of the column in silo table, storing the expire time of the message. - Default value is "exp_time". + Default value is “exp_time”. - Example 1.10. Set the "sc_exp_time" parameter + Example 1.10. Set the “sc_exp_time” parameter ... modparam("msilo", "sc_exp_time", "expire_time") ... @@ -381,9 +381,9 @@ modparam("msilo", "sc_exp_time", "expire_time") The name of the column in silo table, storing the incoming time of the message. - Default value is "inc_time". + Default value is “inc_time”. - Example 1.11. Set the "sc_inc_time" parameter + Example 1.11. Set the “sc_inc_time” parameter ... modparam("msilo", "sc_inc_time", "incoming_time") ... @@ -393,9 +393,9 @@ modparam("msilo", "sc_inc_time", "incoming_time") The name of the column in silo table, storing the send time for the reminder. - Default value is "snd_time". + Default value is “snd_time”. - Example 1.12. Set the "sc_snd_time" parameter + Example 1.12. Set the “sc_snd_time” parameter ... modparam("msilo", "sc_snd_time", "send_reminder_time") ... @@ -407,9 +407,9 @@ modparam("msilo", "sc_snd_time", "send_reminder_time") user goes online. If the parameter is not set, the module will not send any notification. This parameter may contain pseudo-variables. - Default value is "NULL". + Default value is “NULL”. - Example 1.13. Set the "from_address" parameter + Example 1.13. Set the “from_address” parameter ... modparam("msilo", "from_address", "sip:registrar@example.org") modparam("msilo", "from_address", "sip:$rU@example.org") @@ -417,13 +417,13 @@ modparam("msilo", "from_address", "sip:$rU@example.org") 3.14. contact_hdr (string) - The value of the "Contact" header (including header name and ending + The value of the “Contact” header (including header name and ending \r\n) to be added in notification messages. It can contain pseudo-variables. - Default value is "NULL". + Default value is “NULL”. - Example 1.14. Set the "contact_hdr" parameter + Example 1.14. Set the “contact_hdr” parameter ... modparam("msilo", "contact_hdr", "Contact: \r\n") ... @@ -433,9 +433,9 @@ modparam("msilo", "contact_hdr", "Contact: \r\n") Extra headers (each ending with \r\n) to be added in messages sent from silo by m_dump. It can contain pseudo-variables. - Default value is "NULL". + Default value is “NULL”. - Example 1.15. Set the "extra_hdrs" parameter + Example 1.15. Set the “extra_hdrs” parameter ... modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n") ... @@ -444,9 +444,9 @@ modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n") The body of the notification message. It can contain pseudo-variables. - Default value is "NULL". + Default value is “NULL”. - Example 1.16. Set the "offline_message" parameter + Example 1.16. Set the “offline_message” parameter ... modparam("msilo", "offline_message", "*** User $rU is offline!") modparam("msilo", "offline_message", "I am offline!") @@ -458,9 +458,9 @@ modparam("msilo", "offline_message", "I am offline!") \r\n) to be added in notification messages. It must reflect what the 'offline_message' contains. It can contain pseudo-variables. - Default value is "NULL". + Default value is “NULL”. - Example 1.17. Set the "content_type_hdr" parameter + Example 1.17. Set the “content_type_hdr” parameter ... modparam("msilo", "content_type_hdr", "Content-Type: text/plain\r\n") modparam("msilo", "content_type_hdr", "Content-Type: text/html\r\n") @@ -471,9 +471,9 @@ modparam("msilo", "content_type_hdr", "Content-Type: text/html\r\n") The SIP address used to send reminder messages. If this value is not set, the reminder feature is disabled. - Default value is "NULL". + Default value is “NULL”. - Example 1.18. Set the "reminder" parameter + Example 1.18. Set the “reminder” parameter ... modparam("msilo", "reminder", "sip:registrar@example.org") ... @@ -485,9 +485,9 @@ modparam("msilo", "reminder", "sip:registrar@example.org") separate Kamailio instance for msilo processing. If not set, the message will be sent to the address in destination URI. - Default value is "NULL". + Default value is “NULL”. - Example 1.19. Set the "outbound_proxy" parameter + Example 1.19. Set the “outbound_proxy” parameter ... modparam("msilo", "outbound_proxy", "sip:kamailio.org;transport=tcp") ... @@ -497,9 +497,9 @@ modparam("msilo", "outbound_proxy", "sip:kamailio.org;transport=tcp") Expire time of stored messages - seconds. When this time passed, the message is silently discarded from database. - Default value is "259200 (72 hours = 3 days)". + Default value is “259200 (72 hours = 3 days)”. - Example 1.20. Set the "expire_time" parameter + Example 1.20. Set the “expire_time” parameter ... modparam("msilo", "expire_time", 36000) ... @@ -510,9 +510,9 @@ modparam("msilo", "expire_time", 36000) module keeps each request send by itself for a new online user and if the reply is 2xx then the message is deleted from database. - Default value is "30". + Default value is “30”. - Example 1.21. Set the "check_time" parameter + Example 1.21. Set the “check_time” parameter ... modparam("msilo", "check_time", 10) ... @@ -525,33 +525,33 @@ modparam("msilo", "check_time", 10) If the value is 0, the reminder feature is disabled. - Default value is "0". + Default value is “0”. - Example 1.22. Set the "send_time" parameter + Example 1.22. Set the “send_time” parameter ... modparam("msilo", "send_time", 60) ... 3.23. clean_period (int) - Number of "check_time" cycles when to check if there are expired + Number of “check_time” cycles when to check if there are expired messages in database. - Default value is "5". + Default value is “5”. - Example 1.23. Set the "clean_period" parameter + Example 1.23. Set the “clean_period” parameter ... modparam("msilo", "clean_period", 3) ... 3.24. use_contact (int) - Turns on/off the usage of the "Contact" address to send notification + Turns on/off the usage of the “Contact” address to send notification back to sender whose message is stored by MSILO. - Default value is "1 (0 = off, 1 = on)". + Default value is “1 (0 = off, 1 = on)”. - Example 1.24. Set the "use_contact" parameter + Example 1.24. Set the “use_contact” parameter ... modparam("msilo", "use_contact", 0) ... @@ -563,12 +563,12 @@ modparam("msilo", "use_contact", 0) If the parameter is not set, the module does not look for this AVP. If the value is set to a valid AVP name, then the module expects in the - AVP to be a time value in format "YYYYMMDDHHMMSS" (e.g., + AVP to be a time value in format “YYYYMMDDHHMMSS” (e.g., 20060101201500). - Default value is "null". + Default value is “null”. - Example 1.25. Set the "snd_time_avp" parameter + Example 1.25. Set the “snd_time_avp” parameter ... modparam("msilo", "snd_time_avp", "$avp(i:123)") ... @@ -577,9 +577,9 @@ modparam("msilo", "snd_time_avp", "$avp(i:123)") Whether to add as prefix the date when the message was stored. - Default value is "1" (1==on/0==off). + Default value is “1” (1==on/0==off). - Example 1.26. Set the "add_date" parameter + Example 1.26. Set the “add_date” parameter ... modparam("msilo", "add_date", 0) ... @@ -591,7 +591,7 @@ modparam("msilo", "add_date", 0) Default value is 0. - Example 1.27. Set the "max_messages" parameter + Example 1.27. Set the “max_messages” parameter ... modparam("msilo", "max_messages", 0) ... @@ -601,9 +601,9 @@ modparam("msilo", "max_messages", 0) Wheter to add contact header to generated messages. The contact address is the From URI. - Default value is "0" (1==on; 0==off as per RFC3428). + Default value is “0” (1==on; 0==off as per RFC3428). - Example 1.28. Set the "add_contact" parameter + Example 1.28. Set the “add_contact” parameter ... modparam("msilo", "add_contact", 1) ... @@ -617,9 +617,9 @@ modparam("msilo", "add_contact", 1) If the parameter is not set, m_store() does not look for extra headers from any AVP. - Default value is "null". + Default value is “null”. - Example 1.29. Set the "extra_hdrs_avp" parameter + Example 1.29. Set the “extra_hdrs_avp” parameter ... modparam("msilo", "extra_hdrs_avp", "$avp(msilo_extra_hdrs)") ... @@ -629,9 +629,9 @@ modparam("msilo", "extra_hdrs_avp", "$avp(msilo_extra_hdrs)") Flag to mark the message for which no notification should be sent back to sender when storing in msilo. Valid value is in between 0 and 31. - Default value is "-1" (feature disabled). + Default value is “-1” (feature disabled). - Example 1.30. Set the "skip_notification_flag" parameter + Example 1.30. Set the “skip_notification_flag” parameter ... modparam("msilo", "skip_notification_flag", 18) ... @@ -650,7 +650,7 @@ m_store(...); be called when the request type is MESSAGE and the destination user is offline or his UA does not support MESSAGE requests). If the user is registered with a UA which does not support MESSAGE requests you should - not use mode="0" if you have changed the request uri with the contact + not use mode=“0” if you have changed the request uri with the contact address of user's UA. Meaning of the parameters is as follows: @@ -670,7 +670,7 @@ m_store("$tu"); The method sends stored messages for the SIP user that has registerered to the contact address in the registration. The method should be called - when a REGISTER request is received and the "Expire" header has a value + when a REGISTER request is received and the “Expire” header has a value greater than zero. Meaning of the parameters is as follows: diff --git a/modules/msrp/README b/modules/msrp/README index e9e882b80..6d336de8b 100644 --- a/modules/msrp/README +++ b/modules/msrp/README @@ -16,7 +16,7 @@ Alex Balashov - Copyright 2012 asipto.com + Copyright © 2012 asipto.com __________________________________________________________________ Table of Contents @@ -179,7 +179,7 @@ Chapter 1. Admin Guide 3.1. sipmsg (int) If set to 1, the module will build a SIP message from MSRP frame - headers, providing it to "event_route[msrp:frame-in]". All the config + headers, providing it to “event_route[msrp:frame-in]”. All the config file functions (apart from SIP request relay) that can be used in a request route block can be used in the MSRP event_route. @@ -216,7 +216,7 @@ modparam("msrp", "timer_interval", 90) 3.4. auth_min_expires (int) - The minimum value accepted for the "Expires" header in AUTH requests. + The minimum value accepted for the “Expires” header in AUTH requests. Default value is '60'. @@ -227,7 +227,7 @@ modparam("msrp", "auth_min_expiresl", 90) 3.5. auth_max_expires (int) - The maximum value accepted for "Expires" header in AUTH requests. + The maximum value accepted for “Expires” header in AUTH requests. Default value is '3600'. @@ -259,7 +259,7 @@ modparam("msrp", "use_path_addr", "msrp.kamailio.org:5061") 4.8. msrp_cmap_save() 4.9. msrp_cmap_lookup() -4.1. msrp_relay() +4.1. msrp_relay() Relay MSRP frame according to the To-Path. This function has to be executed for each MSRP request or reply that has to be forwarded. Note @@ -275,7 +275,7 @@ event_route[msrp:frame-in] { } ... -4.2. msrp_reply(code, text [, hdrs]) +4.2. msrp_reply(code, text [, hdrs]) Send a reply for the current MSRP request, adding optional headers. @@ -290,7 +290,7 @@ event_route[msrp:frame-in] { } ... -4.3. msrp_is_request() +4.3. msrp_is_request() Return true if the MSRP frame is a request. @@ -307,7 +307,7 @@ event_route[msrp:frame-in] { } ... -4.4. msrp_is_reply() +4.4. msrp_is_reply() Return true if the MSRP frame is a reply. @@ -324,7 +324,7 @@ event_route[msrp:frame-in] { } ... -4.5. msrp_set_dst(addr, sock) +4.5. msrp_set_dst(addr, sock) Set destination attributes: addr - target address as MSRP URI; sock - local socket to be used (format 'proto:ip:port'). @@ -342,7 +342,7 @@ event_route[msrp:frame-in] { } ... -4.6. msrp_relay_flags(flags) +4.6. msrp_relay_flags(flags) Set transport layer sending flags for forwarding current MSRP frame; flags - a bitmask of flags - 1 (don't create a new connection), 2 @@ -361,7 +361,7 @@ event_route[msrp:frame-in] { } ... -4.7. msrp_reply_flags(flags) +4.7. msrp_reply_flags(flags) Set transport layer sending flags for replies to the current MSRP frame; flags - a bitmask of flags - 1 (don't create a new connection), @@ -380,7 +380,7 @@ event_route[msrp:frame-in] { } ... -4.8. msrp_cmap_save() +4.8. msrp_cmap_save() Save details of a MSRP connection upon AUTH request inside the internal map table, indexed by session id. @@ -396,7 +396,7 @@ event_route[msrp:frame-in] { } ... -4.9. msrp_cmap_lookup() +4.9. msrp_cmap_lookup() Lookup MSRP connection details for current session id. @@ -432,7 +432,7 @@ event_route[msrp:frame-in] { 6.1. msrp.cmaplist -6.1. msrp.cmaplist +6.1. msrp.cmaplist List active MSRP connections. diff --git a/modules/mtree/README b/modules/mtree/README index 2f62e82ec..4d801b8b1 100644 --- a/modules/mtree/README +++ b/modules/mtree/README @@ -14,13 +14,15 @@ Juha Heinanen tutpro.com +Edited by + Juha Heinanen - Copyright 2010 Daniel-Constantin Mierla (asipto.com) + Copyright © 2010 Daniel-Constantin Mierla (asipto.com) - Copyright 2011 Juha Heinanen + Copyright © 2011 Juha Heinanen __________________________________________________________________ Table of Contents @@ -175,7 +177,7 @@ Chapter 1. Admin Guide URL of the database server to be used. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.1. Set db_url parameter ... @@ -187,7 +189,7 @@ modparam("mtree", "db_url", "dbdriver://username:password@dbhost/dbname") Name of database table where data for trees is stored. It is ignored if a 'mtree' parameter is defined. - Default value is "mtrees". + Default value is “mtrees”. Example 1.2. Set db_table parameter ... @@ -222,7 +224,7 @@ modparam("mtree", "db_table", "mymtrees") This parameter can be set many times to add more trees in memory. - Default value is "none". + Default value is “none”. Example 1.3. Set mtree parameter ... @@ -236,7 +238,7 @@ modparam("mtree", "mtree", Name of 'tname' column. - Default value is "tname". + Default value is “tname”. Example 1.4. Set tname_column parameter ... @@ -247,7 +249,7 @@ modparam("mtree", "tname_column", "name") Name of 'tprefix' column. - Default value is "tprefix". + Default value is “tprefix”. Example 1.5. Set tprefix_column parameter ... @@ -258,7 +260,7 @@ modparam("mtree", "tprefix_column", "prefix") Name of 'tvalue' column. - Default value is "tvalue". + Default value is “tvalue”. Example 1.6. Set tvalue_column parameter ... @@ -280,7 +282,7 @@ modparam("mtree", "fetch_rows", 4000) The list with characters allowed in prefix. - Default value is "0123456789". + Default value is “0123456789”. Example 1.8. Set char_list parameter ... @@ -292,7 +294,7 @@ modparam("mtree", "char_list", "0123456789*+") The PV spec where to store the matched value. It can be any writable PV. - Default value is "$avp(s:tvalue)". + Default value is “$avp(s:tvalue)”. Example 1.9. Set pv_value parameter ... @@ -304,7 +306,7 @@ modparam("mtree", "pv_value", "$var(mtval)") The AVP where to store the matched values when mtree is of type 0 or 2 and mode of mt_match() call has value 2. - Default value is "$avp(s:tvalues)". + Default value is “$avp(s:tvalues)”. Example 1.10. Set pv_values parameter ... @@ -349,7 +351,7 @@ modparam("mtree", "mt_allow_duplicates", 1) 4.1. mt_match(mtree, pv, mode) -4.1. mt_match(mtree, pv, mode) +4.1. mt_match(mtree, pv, mode) Match 'pv' value against 'mtree'. If 'mtree' type is 0 or 2 and value of 'mode' is NOT 2, sets a value of the longest matching prefix to @@ -373,7 +375,7 @@ mt_match("mytree", "$rU", "0"); 5.3. mt_summary 5.4. mt_match -5.1. mt_list +5.1. mt_list List content of a tree. @@ -387,7 +389,7 @@ mt_match("mytree", "$rU", "0"); _mtname_ _empty_line_ -5.2. mt_reload +5.2. mt_reload Reload mtree from database. @@ -402,7 +404,7 @@ mt_match("mytree", "$rU", "0"); _mtname_ _empty_line_ -5.3. mt_summary +5.3. mt_summary List usage summary for all trees. @@ -414,7 +416,7 @@ mt_match("mytree", "$rU", "0"); :mt_summary:_reply_fifo_file_ _empty_line_ -5.4. mt_match +5.4. mt_match Match prefix value against mtree. @@ -438,7 +440,7 @@ mt_match("mytree", "$rU", "0"); 6.2. mtree.reload 6.3. mtree.match -6.1. mtree.summary +6.1. mtree.summary List usage summary for all trees or for the tree whose name is given as parameter. @@ -446,7 +448,7 @@ mt_match("mytree", "$rU", "0"); Parameters: * _mtree_ - (optional) the name of the tree. -6.2. mtree.reload +6.2. mtree.reload Reload mtree from database to memory. @@ -454,7 +456,7 @@ mt_match("mytree", "$rU", "0"); * _mtree_ - name of mtree or empty string meaning all mtrees -6.3. mtree.match +6.3. mtree.match Match prefix value against mtree diff --git a/modules/nat_traversal/README b/modules/nat_traversal/README index 63a0a51ad..9b37228d6 100644 --- a/modules/nat_traversal/README +++ b/modules/nat_traversal/README @@ -10,7 +10,7 @@ Dan Pascu - Copyright 2008 Dan Pascu + Copyright © 2008 Dan Pascu __________________________________________________________________ Table of Contents @@ -407,7 +407,7 @@ Chapter 1. Admin Guide each endpoint will receive exactly one keepalive message. A negative value or zero will disable the keepalive functionality. - Default value is "60". + Default value is “60”. Example 1.1. Setting the keepalive_interval parameter ... @@ -420,7 +420,7 @@ modparam("nat_traversal", "keepalive_interval", 90) for this purpose are NOTIFY and OPTIONS. NOTIFY generates smaller replies from user agents, but they are almost entirely negative replies. Apparently almost none of the user agents understand that the - purpose of the NOTIFY with a "keep-alive" event is to keep NAT open, + purpose of the NOTIFY with a “keep-alive” event is to keep NAT open, even though many user agents send such NOTIFY requests themselves. However this does not affect the result at all, since the purpose is to trigger a response from the user agent behind NAT, positive or negative @@ -435,7 +435,7 @@ modparam("nat_traversal", "keepalive_interval", 90) times bigger than negative replies or replies to NOTIFY requests. For this reason the default value for the used method is NOTIFY. - Default value is "NOTIFY". + Default value is “NOTIFY”. Example 1.2. Setting the keepalive_method parameter ... @@ -450,7 +450,7 @@ modparam("nat_traversal", "keepalive_method", "OPTIONS") keepalive message, which is the same interface on which the request that triggered keepalive functionality arrived. - Default value is "sip:keepalive@proxy_ip" with proxy_ip being the + Default value is “sip:keepalive@proxy_ip” with proxy_ip being the actual IP of the outgoing interface. Example 1.3. Setting the keepalive_from parameter @@ -489,7 +489,7 @@ MyHeader: some_value\r\n") case it will store it in the Kamailio working directory, or an absolute path. - Default value is undefined "keepalive_state". + Default value is undefined “keepalive_state”. Example 1.5. Setting the keepalive_state_file parameter ... @@ -503,7 +503,7 @@ tate") 5.2. fix_contact() 5.3. nat_keepalive() -5.1. client_nat_test(type) +5.1. client_nat_test(type) Check if the client is behind NAT. What tests are performed is specified by the type parameter which is an integer given by the sum of @@ -533,7 +533,7 @@ if (client_nat_test("3")) { } ... -5.2. fix_contact() +5.2. fix_contact() Will replace the IP and port in the Contact header with the IP and port the SIP message was received from. Usually called after a succesful @@ -549,7 +549,7 @@ if (client_nat_test("3")) { } ... -5.3. nat_keepalive() +5.3. nat_keepalive() Trigger keepalive functionality for the source address of the request. When called it only sets some internal flags, which will trigger later diff --git a/modules/nat_traversal/nat_traversal.c b/modules/nat_traversal/nat_traversal.c index 0acdd1725..fb1dd3073 100644 --- a/modules/nat_traversal/nat_traversal.c +++ b/modules/nat_traversal/nat_traversal.c @@ -1508,6 +1508,8 @@ ClientNatTest(struct sip_msg *msg, unsigned int tests) #define FROM_PREFIX "sip:keepalive@" +#define MAX_BRANCHID 9999999 +#define MIN_BRANCHID 1000000 static void send_keepalive(NAT_Contact *contact) @@ -1536,7 +1538,7 @@ send_keepalive(NAT_Contact *contact) len = snprintf(buffer, sizeof(buffer), "%s %s SIP/2.0\r\n" - "Via: SIP/2.0/UDP %.*s:%d;branch=0\r\n" + "Via: SIP/2.0/UDP %.*s:%d;branch=z9hG4bK%ld\r\n" "From: %s;tag=%x\r\n" "To: %s\r\n" "Call-ID: %s-%x-%x@%.*s\r\n" @@ -1546,6 +1548,7 @@ send_keepalive(NAT_Contact *contact) keepalive_params.method, contact->uri, contact->socket->address_str.len, contact->socket->address_str.s, contact->socket->port_no, + (long)(rand()/(float)RAND_MAX * (MAX_BRANCHID-MIN_BRANCHID) + MIN_BRANCHID), from_uri, keepalive_params.from_tag++, contact->uri, keepalive_params.callid_prefix, keepalive_params.callid_counter++, get_ticks(), diff --git a/modules/nathelper/README b/modules/nathelper/README index b44037f6b..f2f01402b 100644 --- a/modules/nathelper/README +++ b/modules/nathelper/README @@ -24,13 +24,13 @@ Edited by Ovidiu Sas - Copyright 2003-2008 Sippy Software, Inc. + Copyright © 2003-2008 Sippy Software, Inc. - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2009 TuTPro Inc. + Copyright © 2009 TuTPro Inc. - Copyright 2010 VoIPEmbedded Inc. + Copyright © 2010 VoIPEmbedded Inc. __________________________________________________________________ Table of Contents @@ -177,14 +177,14 @@ Chapter 1. Admin Guide connections. In particular, it helps symmetric UAs that don't advertise they are symmetric and are not able to determine their public address. - The function fix_nated_contact() rewrites the "Contact" header field + The function fix_nated_contact() rewrites the “Contact” header field with request's source address:port pair. The function fix_nated_sdp() adds the active direction indication to SDP (flag 0x01) and updates the source IP address too (flag 0x02). The function fix_nated_register() exports exports the request's source address:port into an AVP to be - used during save() and should be used for "REGISTER" requests. + used during save() and should be used for “REGISTER” requests. - Note: fix_nated_contact changes the "Contact" header, thus it breaks + Note: fix_nated_contact changes the “Contact” header, thus it breaks the RFC. Although usually this is not an issue, it may cause problems with strict SIP clients. An alternative is to use add_contact_alias() that together with the handle_ruri_alias() is standards conforming and @@ -248,7 +248,7 @@ Chapter 1. Admin Guide Socket to be used when sending NAT pings for UDP communication. If no one specified, the OS will choose a socket. - Default value is "NULL". + Default value is “NULL”. Example 1.1. Set force_socket parameter ... @@ -275,7 +275,7 @@ modparam("nathelper", "natping_interval", 10) 4.3. ping_nated_only (integer) - If this variable is set then only contacts that have "behind_NAT" flag + If this variable is set then only contacts that have “behind_NAT” flag in user location database set will get ping. Default value is 0. @@ -320,7 +320,7 @@ modparam("nathelper", "natping_socket", "192.168.1.1:5006") Note You must set this parameter if you use fix_nated_register. In such case - you must set the parameter with same name in the "registrar" module to + you must set the parameter with same name in the “registrar” module to same value. Default value is "NULL" (disabled). @@ -350,7 +350,7 @@ modparam("nathelper", "sipping_bflag", 7) feature, you have to set this parameter. The SIP request pinging will be used only for requests marked so. - Default value is "NULL". + Default value is “NULL”. Example 1.8. Set sipping_from parameter ... @@ -362,7 +362,7 @@ modparam("nathelper", "sipping_from", "sip:pinger@siphub.net") The parameter sets the SIP method to be used in generating the SIP requests for NAT ping purposes. - Default value is "OPTIONS". + Default value is “OPTIONS”. Example 1.9. Set sipping_method parameter ... @@ -394,7 +394,7 @@ Note The string must be a complete SDP line, including the EOH (\r\n). - Default value is "a=nortpproxy:yes\r\n". + Default value is “a=nortpproxy:yes\r\n”. Example 1.11. Set nortpproxy_str parameter ... @@ -413,7 +413,7 @@ modparam("nathelper", "nortpproxy_str", "a=sdpmangled:yes\r\n") Keepalives are sent stateless, not using TM module. The value of this parameter has to be few times higher than natping_interval. - Default value is "0" (feature disabled). + Default value is “0” (feature disabled). Example 1.12. Set keepalive_timeout parameter ... @@ -425,7 +425,7 @@ modparam("nathelper", "keepalive_timeout", 120) Enable sending UDP pings (keepalives) using raw socket from Path address. - Default value is "0" (feature disabled). + Default value is “0” (feature disabled). Example 1.13. Set udpping_from_path parameter ... @@ -437,7 +437,7 @@ modparam("nathelper", "udpping_from_path", 1) The parameter controls if oldmediaip field should be appended to the SDP. - Default value is "1" (feature enabled). + Default value is “1” (feature enabled). Example 1.14. Set append_sdp_oldmediaip parameter ... @@ -456,9 +456,9 @@ modparam("nathelper", "append_sdp_oldmediaip", 1) 5.8. handle_ruri_alias() 5.9. set_contact_alias() -5.1. fix_nated_contact() +5.1. fix_nated_contact() - Rewrites the "Contact" header to contain the request's source + Rewrites the “Contact” header to contain the request's source address:port. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, @@ -469,20 +469,20 @@ modparam("nathelper", "append_sdp_oldmediaip", 1) if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();}; ... -5.2. fix_nated_sdp(flags [, ip_address]) +5.2. fix_nated_sdp(flags [, ip_address]) Alters the SDP information in orer to facilitate NAT traversal. What - changes to be performed may be controled via the "flags" parameter. + changes to be performed may be controled via the “flags” parameter. Return value is -1 if error occurred, 1 if ip's were replaced, 2 if no ip's were replaced. Meaning of the parameters is as follows: * flags - the value may be a bitwise OR of the following flags: - + 0x01 - adds "a=direction:active" SDP line; + + 0x01 - adds “a=direction:active” SDP line; + 0x02 - rewrite media IP address (c=) with source address of the message or the provided IP address (the provide IP address take precedence over the source address). - + 0x04 - adds "a=nortpproxy:yes" SDP line; + + 0x04 - adds “a=nortpproxy:yes” SDP line; + 0x08 - rewrite IP from origin description (o=) with source address of the message or the provided IP address (the provide IP address take precedence over the source address). @@ -499,9 +499,9 @@ if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();}; if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");}; ... -5.3. add_rcv_param([flag]), +5.3. add_rcv_param([flag]), - Add a received parameter to the "Contact" header fields or the Contact + Add a received parameter to the “Contact” header fields or the Contact URI. The parameter will contain the URI created from the source IP, port, and protocol of the packet containing the SIP message. The parameter can be then processed by another registrar. This is useful, @@ -523,14 +523,14 @@ add_rcv_param(); # add the parameter to the Contact header add_rcv_param("1"); # add the parameter to the Contact URI ... -5.4. fix_nated_register() +5.4. fix_nated_register() The function creates a URI consisting of the source IP, port, and protocol and stores the URI in an Attribute-Value-Pair. The URI will be appended as "received" parameter to Contact in 200 OK and registrar will store it in the received cloumn in the location table. - Note: You have to set the "received_avp" parameter of the nathelper + Note: You have to set the “received_avp” parameter of the nathelper module and the registrar module (both module parameters must have the same value) to use this function. @@ -541,26 +541,26 @@ add_rcv_param("1"); # add the parameter to the Contact URI fix_nated_register(); ... -5.5. nat_uac_test(flags) +5.5. nat_uac_test(flags) Tries to guess if client's request originated behind a nat. The parameter determines what heuristics is used. Meaning of the flags is as follows: - * 1 - The "Contact" header field is searched for occurrence of + * 1 - The “Contact” header field is searched for occurrence of RFC1918 or RFC6598 addresses. - * 2 - the "received" test is used: address in the "Via" header is + * 2 - the "received" test is used: address in the “Via” header is compared against source IP address of signaling - * 4 - The Top Most "Via" is searched for occurrence of RFC1918 or + * 4 - The Top Most “Via” is searched for occurrence of RFC1918 or RFC6598 addresses * 8 - The SDP is searched for occurrence of RFC1918 or RFC6598 addresses * 16 - Test if the source port is different from the port in the - "Via" header + “Via” header * 32 - Test if the source IP address of signaling is a RFC1918 or RFC6598 address * 64 - Test if the source connection of signaling is a WebSocket - * 128 - Test if the "Contact" header URI port differs from the source + * 128 - Test if the “Contact” header URI port differs from the source port of the request (Warning: this is might be legal or even intended combination in non NATted scenarios) @@ -577,7 +577,7 @@ if(nat_uac_test("19")) { } ... -5.6. is_rfc1918(ip_address) +5.6. is_rfc1918(ip_address) Determines if the address in the parameter is an rfc1918 or rfc6598 address. The parameter allows pseudo-variables usage. @@ -591,11 +591,11 @@ if(is_rfc1918("$rd")) { } ... -5.7. add_contact_alias([ip_addr, port, proto]) +5.7. add_contact_alias([ip_addr, port, proto]) - Adds an ";alias=ip~port~transport" parameter to the contact URI + Adds an “;alias=ip~port~transport” parameter to the contact URI containing either received ip, port, and transport protocol or those - given as parameters. If called without parameters, ";alias" parameter + given as parameters. If called without parameters, “;alias” parameter is only added if received ip and port differ from those in contact URI. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, @@ -612,17 +612,17 @@ if(is_rfc1918("$rd")) { }; ... -5.8. handle_ruri_alias() +5.8. handle_ruri_alias() - Checks if the Request URI has an "alias" parameter and if so, removes - it and sets the "$du" based on its value. Note that this means that - routing of request is based on ";alias" parameter value of the Request + Checks if the Request URI has an “alias” parameter and if so, removes + it and sets the “$du” based on its value. Note that this means that + routing of request is based on “;alias” parameter value of the Request URI rather than the Request URI itself. If you call handle_ruri_alias() on a request, make sure that you screen the alias parameter value of Request URI the same way as you would screen the Request URI itself. - Returns 1 if ";alias" parameter was found and "$du" was set and the - "$ru" rewritten, 2 if the alias parameter was not found and nothing was + Returns 1 if “;alias” parameter was found and “$du” was set and the + “$ru” rewritten, 2 if the alias parameter was not found and nothing was done, or -1 in case of error. This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, and @@ -647,9 +647,9 @@ if(is_rfc1918("$rd")) { }; ... -5.9. set_contact_alias() +5.9. set_contact_alias() - Adds an ";alias=ip~port~transport" parameter to the contact URI + Adds an “;alias=ip~port~transport” parameter to the contact URI containing the received ip, port, and transport protocol. The new contact URI is immediately visible to other modules in the way the fix_nated_contact() does it. @@ -730,45 +730,45 @@ $c2 = @nathelper.rewrite_contact[1].nameaddr.uri; Chapter 2. Frequently Asked Questions - 2.1. What happend with "rtpproxy_disable" parameter? + 2.1. What happend with “rtpproxy_disable” parameter? 2.2. Where can I find more about Kamailio? 2.3. Where can I post a question about this module? 2.4. How can I report a bug? 2.1. - What happend with "rtpproxy_disable" parameter? + What happend with “rtpproxy_disable” parameter? - It was removed as it became obsolete - now "rtpproxy_sock" can take - empty value to disable the rtpproxy functionality. + It was removed as it became obsolete - now “rtpproxy_sock” can take + empty value to disable the rtpproxy functionality. 2.2. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 2.3. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 2.4. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + https://github.com/kamailio/kamailio/issues. diff --git a/modules/nathelper/sip_pinger.h b/modules/nathelper/sip_pinger.h index 7cd5e0ced..5166a750b 100644 --- a/modules/nathelper/sip_pinger.h +++ b/modules/nathelper/sip_pinger.h @@ -116,6 +116,9 @@ static inline char* build_sipping(str *curi, struct socket_info* s, str *path, str *ruid, unsigned int aorhash, int *len_p) { #define s_len(_s) (sizeof(_s)-1) +#define MAX_BRANCHID 9999999 +#define MIN_BRANCHID 1000000 +#define LEN_BRANCHID 7 /* NOTE: this must be sync with the MX and MIN values !! */ static char buf[MAX_SIPPING_SIZE]; char *p; int len; @@ -135,7 +138,7 @@ static inline char* build_sipping(str *curi, struct socket_info* s, str *path, if ( sipping_method.len + 1 + curi->len + s_len(" SIP/2.0"CRLF) + s_len("Via: SIP/2.0/UDP ") + vaddr.len + ((s->address.af==AF_INET6)?2:0) + - 1 + vport.len + s_len(";branch=0") + + 1 + vport.len + s_len(";branch=z9hG4bK") + LEN_BRANCHID + (path->len ? (s_len(CRLF"Route: ") + path->len) : 0) + s_len(CRLF"From: ") + sipping_from.len + s_len(";tag=") + ruid->len + 1 + 8 + 1 + 8 + @@ -164,13 +167,16 @@ static inline char* build_sipping(str *curi, struct socket_info* s, str *path, } *(p++) = ':'; append_str( p, vport.s, vport.len); + append_fix( p, ";branch=z9hG4bK"); + int2bstr( + (long)(rand()/(float)RAND_MAX * (MAX_BRANCHID-MIN_BRANCHID) + MIN_BRANCHID), + p+LEN_BRANCHID-INT2STR_MAX_LEN+1, NULL); + p += LEN_BRANCHID; if (path->len) { - append_fix( p, ";branch=0"CRLF"Route: "); + append_fix( p, CRLF"Route: "); append_str( p, path->s, path->len); - append_fix( p, CRLF"From: "); - } else { - append_fix( p, ";branch=0"CRLF"From: "); } + append_fix( p, CRLF"From: "); append_str( p, sipping_from.s, sipping_from.len); append_fix( p, ";tag="); append_str( p, ruid->s, ruid->len); diff --git a/modules/ndb_cassandra/README b/modules/ndb_cassandra/README index 63779d762..3cc451ced 100644 --- a/modules/ndb_cassandra/README +++ b/modules/ndb_cassandra/README @@ -10,7 +10,7 @@ Luis Martin Gil - Copyright 2013 www.indigital.net + Copyright © 2013 www.indigital.net __________________________________________________________________ Table of Contents @@ -108,7 +108,7 @@ modparam("ndb_cassandra", "port", 9160) 4.1. cass_insert(keyspace, column_family, key, column, value) 4.2. cass_retrieve(keyspace, column_family, key, column, value) -4.1. cass_insert(keyspace, column_family, key, column, value) +4.1. cass_insert(keyspace, column_family, key, column, value) Inserts the value for the given key, column, column_family and keyspace. There must be an existing keyspace called 'keyspace' with a @@ -118,7 +118,7 @@ modparam("ndb_cassandra", "port", 9160) * ret < 0, error * ret > 0, success -4.2. cass_retrieve(keyspace, column_family, key, column, value) +4.2. cass_retrieve(keyspace, column_family, key, column, value) Retrieves the value for the given key, column, column_family and keyspace. There must be an existing keyspace called 'keyspace' with a diff --git a/modules/ndb_mongodb/README b/modules/ndb_mongodb/README index 01b1ce5de..e9a97023b 100644 --- a/modules/ndb_mongodb/README +++ b/modules/ndb_mongodb/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright © 2014 asipto.com + Copyright 2014 asipto.com __________________________________________________________________ Table of Contents @@ -98,6 +98,8 @@ Chapter 1. Admin Guide running Kamailio with this module loaded: * mongo-c-driver - available at https://github.com/mongodb/mongo-c-driver + Note: if you use tls module, use at least mongo-c-driver v1.2.1 - + there were reports of issues inside earlier versions of the driver. 3. Parameters @@ -133,7 +135,7 @@ modparam("ndb_mongodb", "server", "name=mgs2;uri='mongodb://127.0.0.2/kamailio'" 4.5. mongodb_next(replyid) 4.6. mongodb_free(replyid) -4.1. mongodb_cmd(srvname, dbname, cname, command, replyid) +4.1. mongodb_cmd(srvname, dbname, cname, command, replyid) Send a valid command to MongoDB server identified by srvname. The reply will be stored in a local container identified by replyid. All the @@ -165,7 +167,7 @@ if(mongodb_cmd("mgs1", "kamailio", "acc", "{ \"collStats\": \"acc\" }", "mgr1")) } ... -4.2. mongodb_cmd_simple(srvname, dbname, cname, command, replyid) +4.2. mongodb_cmd_simple(srvname, dbname, cname, command, replyid) Send a valid command to MongoDB server identified by srvname. The reply will be stored in a local container identified by replyid. All the @@ -191,7 +193,7 @@ mgr1")) { } ... -4.3. mongodb_find(srvname, dbname, cname, command, replyid) +4.3. mongodb_find(srvname, dbname, cname, command, replyid) Send a find command to MongoDB server identified by srvname. The reply will be stored in a local container identified by replyid. All the @@ -220,7 +222,7 @@ if(mongodb_find("mgs1", "kamailio", "acc", "{ \"src_user\" : \"111\" }", "mgr1") } ... -4.4. mongodb_find_one(srvname, dbname, cname, command, replyid) +4.4. mongodb_find_one(srvname, dbname, cname, command, replyid) Similar to mongodb_find(...), but it stops searching after first match, returning the result with one object - faster when expecting to have a @@ -237,7 +239,7 @@ if(mongodb_find_one("mgs1", "kamailio", "subscriber", "{ \"username\" : \"111\" } ... -4.5. mongodb_next(replyid) +4.5. mongodb_next(replyid) Moves to next document in a MongoDB reply. This function can be used after a succesful mongodb_cmd() or mongodb_find(). It returns true if @@ -256,7 +258,7 @@ if(mongodb_find("mgs1", "kamailio", "acc", "{ \"src_user\" : \"111\" }", "mgr1") mongodb_free("mgr1"); ... -4.6. mongodb_free(replyid) +4.6. mongodb_free(replyid) Frees data in a previous reply from memory. After this function call, accessing to a freed replyid returns null value. diff --git a/modules/ndb_mongodb/doc/ndb_mongodb_admin.xml b/modules/ndb_mongodb/doc/ndb_mongodb_admin.xml index ec4347464..d6e5a3c3f 100644 --- a/modules/ndb_mongodb/doc/ndb_mongodb_admin.xml +++ b/modules/ndb_mongodb/doc/ndb_mongodb_admin.xml @@ -52,6 +52,10 @@ mongo-c-driver - available at https://github.com/mongodb/mongo-c-driver + + Note: if you use tls module, use at least mongo-c-driver v1.2.1 + - there were reports of issues inside earlier versions of the driver. + diff --git a/modules/ndb_redis/README b/modules/ndb_redis/README index 96a336364..846c9ba16 100644 --- a/modules/ndb_redis/README +++ b/modules/ndb_redis/README @@ -117,8 +117,8 @@ Chapter 1. Admin Guide Example 1.1. Set server parameter ... modparam("ndb_redis", "server", "name=srvN;addr=127.0.0.1;port=6379;db=1") -modparam("ndb_redis", "server", "name=srvX;addr=127.0.0.2;port=6379;db=4;pass=m -ypassword") +modparam("ndb_redis", "server", "name=srvX;addr=127.0.0.2;port=6379;db=4;pass=my +password") # Unix domain socket modparam("ndb_redis", "server", "name=srvY;unix=/tmp/redis.sock;db=3") diff --git a/modules/nosip/README b/modules/nosip/README index 864cd3a98..bf7e0ef77 100644 --- a/modules/nosip/README +++ b/modules/nosip/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2014 asipto.com + Copyright © 2014 asipto.com __________________________________________________________________ Table of Contents @@ -126,7 +126,7 @@ modparam("nosip", "msg_skip", "^GET ") 4.1. event_route[nosip:msg] -4.1. event_route[nosip:msg] +4.1. event_route[nosip:msg] Event route block to be executed when a non-sip message is received by a SIP worker process. diff --git a/modules/p_usrloc/README b/modules/p_usrloc/README index e64cad7e4..13970df44 100644 --- a/modules/p_usrloc/README +++ b/modules/p_usrloc/README @@ -10,7 +10,7 @@ Patric Marschall 1&1 Internet AG - Copyright 2007 1&1 Internet AG + Copyright © 2007 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -281,7 +281,7 @@ Warning The url to the master database where errors are written to. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio" + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio” Example 1.1. Set write_db_url parameter ... @@ -307,7 +307,7 @@ modparam("p_usrloc", "read_db_url", "mysql://user:passwd@localhost/db") Specifies the table where the information about the distributed databases is stored. - Default value is "locdb". + Default value is “locdb”. Example 1.3. Set reg_db_table parameter ... @@ -318,7 +318,7 @@ modparam("p_usrloc", "reg_db_table", "locdb") Specifies the column where the id of a distributed database is stored. - Default value is "id". + Default value is “id”. Example 1.4. Set id_column parameter ... @@ -332,7 +332,7 @@ modparam("p_usrloc", "id_column", "id") least two databases available, the databases above the second are ignored. - Default value is "no". + Default value is “no”. Example 1.5. Set num_column parameter ... @@ -344,7 +344,7 @@ modparam("p_usrloc", "num_column", "nr") Specifies the column where the url of the distributed database is stored. - Default value is "url". + Default value is “url”. Example 1.6. Set url_column parameter ... @@ -356,7 +356,7 @@ modparam("p_usrloc", "url_column", "url") Specifies the column where the status of the distributed database is stored. - Default value is "status". + Default value is “status”. Example 1.7. Set status_column parameter ... @@ -369,7 +369,7 @@ modparam("p_usrloc", "status_column", "status") is stored. This field is set to the current time when a databases is turned off or turned on. - Default value is "failover". + Default value is “failover”. Example 1.8. Set failover_time_column parameter ... @@ -384,7 +384,7 @@ modparam("p_usrloc", "failover_time_column", "fail") stored in two databases and it takes the spare the complete expire time to be up to date, it is not very useful. - Default value is "spare". + Default value is “spare”. Example 1.9. Set spare_flag_column parameter ... @@ -397,7 +397,7 @@ modparam("p_usrloc", "spare_flag_column", "spare") stored. Each call to db_handle_error increases the error counter. After exceeding the error threshold, the database's status is set to off. - Default value is "errors". + Default value is “errors”. Example 1.10. Set error_column parameter ... @@ -411,7 +411,7 @@ modparam("p_usrloc", "error_column", "error") is only useful when using spares and prevents the module from taking a spare which shares the same risk as the broken database. - Default value is "rg". + Default value is “rg”. Example 1.11. Set risk_group_column parameter ... @@ -425,7 +425,7 @@ modparam("p_usrloc", "risk_group_column", "rg") equal or greater than the contact expiration time of the registrar module. - Default value is "3600". + Default value is “3600”. Example 1.12. Set expire_time parameter ... @@ -436,7 +436,7 @@ modparam("p_usrloc", "expire_time", "3600") Specifies the error value on which a database shall be turned of. - Default value is "50". + Default value is “50”. Example 1.13. Set db_err_threshold parameter ... @@ -450,7 +450,7 @@ modparam("p_usrloc", "db_err_threshold", "50") * 2 - Try to find a spare, if none found, just turn off the broken database - Default value is "1". + Default value is “1”. Example 1.14. Set failover_level parameter ... @@ -465,7 +465,7 @@ modparam("p_usrloc", "failover_level", "1") to provide a writeable master database, otherwise this check stays disabled. - Default value is "10". + Default value is “10”. Example 1.15. Set db_retry_interval parameter ... @@ -478,7 +478,7 @@ modparam("p_usrloc", "db_retry_interval", "10") data consistency. Keep in mind that this will probably decrease performance. - Default value is "0". + Default value is “0”. Example 1.16. Set db_use_transactions parameter ... @@ -492,7 +492,7 @@ modparam("p_usrloc", "db_use_transactions", "0") activate transaction the db_use_transactions parameter must be also set. - Default value is "READ UNCOMMITED". + Default value is “READ UNCOMMITED”. Example 1.17. Set db_transaction_level parameter ... @@ -504,7 +504,7 @@ modparam("p_usrloc", "db_transaction_level", "READ UNCOMMITED") Sets the write access to the master database. If set to 0, no write operations are permitted on the master database. - Default value is "0". + Default value is “0”. Example 1.18. Set write_on_master_db parameter ... @@ -516,7 +516,7 @@ modparam("p_usrloc", "write_on_master_db", "0") Sets the write access to the distributed databases. If set to 0, no write operations are permitted on the databases. - Default value is "0". + Default value is “0”. Example 1.19. Set write_on_db parameter ... @@ -528,7 +528,7 @@ modparam("p_usrloc", "write_on_db", "0") Specifies the period (in seconds) after a database connection expires. Usage of a too small value will probably decrease the performance. - Default value is "300". + Default value is “300”. Example 1.20. Set connection_expires parameter ... @@ -541,7 +541,7 @@ modparam("p_usrloc", "connection_expires", "300") the moment the only way is to use the CRC32 algorithm to compute the location ID. Any integer value is fine. - Default value is "0". + Default value is “0”. Example 1.21. Set alg_location parameter ... @@ -554,7 +554,7 @@ modparam("p_usrloc", "alg_location", 1) single. For example, if you have a location table that is large and needs to be partitioned, and a smaller table cfa that is ok to be on only the master db(so there is no need to have it distributed), you can - set this parameter to "location=cluster,cfa=single". This means that a + set this parameter to “location=cluster,cfa=single”. This means that a call to lookup(location) @@ -564,7 +564,7 @@ lookup(cfa) will be done on only the master database (as with usrloc module) - Default value is "location=cluster,cfa=single". + Default value is “location=cluster,cfa=single”. Example 1.22. Set domain_db parameter ... @@ -577,7 +577,7 @@ modparam("p_usrloc", "domain_db", "location=cluster,cfa=single") definition, the type is configured by using this parameter. Accepted values are single and cluster. - Default value is "single". + Default value is “single”. Example 1.23. Set default_db_type parameter ... @@ -590,7 +590,7 @@ modparam("p_usrloc", "default_db_type", "cluster") value. If it is set to 0, the old style using aor, contact and call-id is done. - Default value is "1". + Default value is “1”. Example 1.24. Set db_ops_ruid parameter ... @@ -603,7 +603,7 @@ modparam("p_usrloc", "db_ops_ruid", 0) UPDATE DB operations. It is recommended to set this parameter if you use Cassandra as a DB backend. - Default value is "0". + Default value is “0”. Example 1.25. Set db_update_as_insert parameter ... @@ -615,7 +615,7 @@ modparam("usrloc", "db_update_as_insert", 1) The URL of the default database for Location domains (for domains that are single). This must be configured if they are use. - Default value is "DEFAULT_DB_URL". + Default value is “DEFAULT_DB_URL”. Example 1.26. Set default_db_type parameter ... @@ -702,16 +702,16 @@ modparam("p_usrloc", "db_mode", 2) The module supports the decativation of redundant databases for maintenance reasons. This can be done by setting the status column of - the respective database in the p_usrloc to the value "2". This setting + the respective database in the p_usrloc to the value “2”. This setting is autodetected from all modules on the server cluster. Changes in the locdb table are periodically polled with help of a timer process. After one minute the all read and write traffic is removed from the deactivated database, and maintenance can be done. In order to activate the database again, after the maintenance has been - finished, the respective status column needs to be set to "0". This is + finished, the respective status column needs to be set to “0”. This is autodetected as well, the first module that noticed the change will set - the status column to "1" and setting the failover column to the current + the status column to “1” and setting the failover column to the current time and date. Write requests are now transfered again to the database, but no reads are done yet. @@ -757,14 +757,14 @@ Chapter 2. Developer's Guide These are the primary functions that are used to perform the SQL queries. -1. load_ul_db_api(ul_db_api_t * api) +1. load_ul_db_api(ul_db_api_t * api) Import the dbd API, setup the master database connection. Meaning of the parameters is as follows: * api - Pointer to distributed database API structure -2. int (* ul_db_insert_t) (str * table, str * first, str * second, db_key_t* +2. int (* ul_db_insert_t) (str * table, str * first, str * second, db_key_t* _k, db_val_t* _v, int _n) Lookup the first and if needed the second key, and insert the given @@ -778,7 +778,7 @@ _k, db_val_t* _v, int _n) * _v - Pointer to the inserted db values. * _n - Number of key-value pairs in _k and _v parameters. -3. int (* ul_db_update_t) (str * table, str * first, str * second, db_key_t* +3. int (* ul_db_update_t) (str * table, str * first, str * second, db_key_t* _k, db_op_t * _op, db_val_t* _v, db_key_t* _uk, db_val_t* _uv, int _n, int _un); @@ -797,7 +797,7 @@ _un); * _n - Number of key-value pairs in _k and _v parameters. * _un - Number of key-value pairs in _uk and _uv parameters. -4. int (* ul_db_insert_update_t) (str * table, str * first, str * second, +4. int (* ul_db_insert_update_t) (str * table, str * first, str * second, db_key_t* _k, db_val_t* _v, int _n) Lookup the first and if needed the second key, and insert on duplicate @@ -812,8 +812,8 @@ db_key_t* _k, db_val_t* _v, int _n) * _v - Pointer to the inserted or updated db values. * _n - Number of key-value pairs in _k and _v parameters. -5. int (* ul_db_replace_t) (str * table, str * first, str * second, db_key_t* -_k, db_val_t* _v, int _n) +5. int (* ul_db_replace_t) (str * table, str * first, str * second, +db_key_t* _k, db_val_t* _v, int _n) Lookup the first and if needed the second key, and replace the given values in the choosen databases. @@ -826,7 +826,7 @@ _k, db_val_t* _v, int _n) * _v - Pointer to the replaced db values. * _n - Number of key-value pairs in _k and _v parameters. -6. int (* ul_db_delete_t) (str * table, str * first, str * second, db_key_t* +6. int (* ul_db_delete_t) (str * table, str * first, str * second, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n) Lookup the first and if needed the second key, and delete the given @@ -841,7 +841,7 @@ _k, db_op_t* _o, db_val_t* _v, int _n) * _v - Pointer to the deleted db values. * _n - Number of key-value pairs in _k and _v parameters. -7. int (* ul_db_query_t) (str * table, str * first, str * second, db_con_t +7. int (* ul_db_query_t) (str * table, str * first, str * second, db_con_t *** _r_h, db_key_t* _k, db_op_t* _op, db_val_t* _v, db_key_t* _c, int _n, int _nc, db_key_t _o, db_res_t** _r); @@ -865,7 +865,7 @@ _nc, db_key_t _o, db_res_t** _r); * _o - Order by options for the query. * _nc - Pointer to the result set. -8. int (* ul_db_free_result_t)(db_con_t ** dbh, db_res_t * res); +8. int (* ul_db_free_result_t)(db_con_t ** dbh, db_res_t * res); Frees the given result set, . diff --git a/modules/path/README b/modules/path/README index 944a5fe97..7f52dbb2d 100644 --- a/modules/path/README +++ b/modules/path/README @@ -174,7 +174,7 @@ modparam("path", "use_received", 1) If the “outbound” module was loaded before this module, and outbound is required for this request, the header will be in the form “Path: - ”, where “flowtoken” is the RFC 5636 + ”, where “flowtoken” is the RFC 5626 flow-token that can be used to identify the source and local address and transport the request was received on, and where “1.2.3.4” is the address of the outgoing interface. diff --git a/modules/pdb/README b/modules/pdb/README index c49d968c0..081655ea6 100644 --- a/modules/pdb/README +++ b/modules/pdb/README @@ -14,7 +14,7 @@ Pawel Kuzak 1&1 Internet AG - Copyright 2009 1&1 Internet AG + Copyright © 2009 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -120,7 +120,7 @@ Chapter 1. Admin Guide This is the timeout in milliseconds for the pdb_query function. - Default value is "50". + Default value is “50”. Example 1.1. Set timeout parameter ... @@ -142,7 +142,7 @@ modparam("pdb", "server", "localhost:10001,host.name:10001,192.168.1.7:10002") 4.1. pdb_query (string query, string dstavp) -4.1. pdb_query (string query, string dstavp) +4.1. pdb_query (string query, string dstavp) Sends the query string to all configured servers and stores the answer in dstavp. If it takes more than the configured timeout, false is @@ -166,7 +166,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id"); 5.2. pdb_activate 5.3. pdb_deactivate -5.1. pdb_status +5.1. pdb_status Prints the status of the module. This can either be "active" or "deactivated". @@ -176,7 +176,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id"); kamctl fifo pdb_status ... -5.2. pdb_activate +5.2. pdb_activate Activates the module. This is the default after loading the module. @@ -185,7 +185,7 @@ kamctl fifo pdb_status kamctl fifo pdb_activate ... -5.3. pdb_deactivate +5.3. pdb_deactivate Deactivates the module. No more queries are performed until it is activated again. As long as the module is deactivated, the pdb_query diff --git a/modules/pdt/README b/modules/pdt/README index 9773bfaa0..192e44d52 100644 --- a/modules/pdt/README +++ b/modules/pdt/README @@ -11,11 +11,11 @@ Elena-Ramona Modroiu - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS - Copyright 2004 Voice Sistem SRL + Copyright © 2004 Voice Sistem SRL - Copyright 2008 Elena-Ramona Modroiu + Copyright © 2008 Elena-Ramona Modroiu __________________________________________________________________ Table of Contents @@ -181,7 +181,7 @@ sip:12391001@mydomain.com => sip:91001@alpha.org URL of the database table to be used. - Default value is "mysql://openser:openserrw@localhost/openser". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.2. Set db_url parameter ... @@ -192,7 +192,7 @@ modparam("pdt", "db_url", "dbdriver://username:password@dbhost/dbname") Table name. - Default value is "pdt". + Default value is “pdt”. Example 1.3. Set db_table parameter ... @@ -203,7 +203,7 @@ modparam("pdt", "db_table", "pdt") Name of 'sdomain' column. - Default value is "sdomain". + Default value is “sdomain”. Example 1.4. Set sdomain_column parameter ... @@ -214,7 +214,7 @@ modparam("pdt", "domain_column", "source_domain") Name of 'prefix' column. - Default value is "prefix". + Default value is “prefix”. Example 1.5. Set prefix_column parameter ... @@ -225,7 +225,7 @@ modparam("pdt", "prefix_column", "prefix") Name of 'domain' column. - Default value is "domain". + Default value is “domain”. Example 1.6. Set domain_column parameter ... @@ -262,7 +262,7 @@ modparam("pdt", "fetch_rows", 4000) The list with characters allowed in prefix. - Default value is "0123456789". + Default value is “0123456789”. Example 1.9. Set char_list parameter ... @@ -288,7 +288,7 @@ modparam("pdt", "check_domain", 0) 4.3. prefix2domain() 4.4. pd_translate(sdomain, rewrite_mode) -4.1. prefix2domain(rewrite_mode, multidomain_mode) +4.1. prefix2domain(rewrite_mode, multidomain_mode) Build a new URI if it is necessary. Returns 1 when the translation was made or there was nothing to translate (user part of the URI is empty, @@ -305,14 +305,14 @@ modparam("pdt", "check_domain", 0) of source domain. This can be achieved inserting in the database entries where sdomain has the value "*". - The "rewrite_mode" parameter specifies whether to strip or not the + The “rewrite_mode” parameter specifies whether to strip or not the prefix from user part. The possible values are: * 0: the prefix is removed along with the leading prefix. * 1: only the leading prefix is removed. * 2: the user part of the URI is not changed. * $PV : any PV holding one of the above values. - The "multidomain_mode" parameter specifies the kind of multidomain + The “multidomain_mode” parameter specifies the kind of multidomain support to use. The possible values are: * 0 : Translation of URI regardless of source domain. * 1 : Translation of URI using as source domain the domain in @@ -332,7 +332,7 @@ $var(a) = 1; prefix2domain("$var(a)", "2"); ... -4.2. prefix2domain(rewrite_mode) +4.2. prefix2domain(rewrite_mode) The same as prefix2domain(rewrite_mode, "0"), that is without multidomain support, translation of URI being done regardless of the @@ -341,14 +341,14 @@ prefix2domain("$var(a)", "2"); prefix2domain("2"); ... -4.3. prefix2domain() +4.3. prefix2domain() The same as prefix2domain("0", "0"). ... prefix2domain(); ... -4.4. pd_translate(sdomain, rewrite_mode) +4.4. pd_translate(sdomain, rewrite_mode) Translate R-URI based on source domain and longest prefix matching. Returns 1 when the translation was made or there was nothing to @@ -357,11 +357,11 @@ prefix2domain(); The translation is done based on lookup up for an entry in the database where the sdomain parameter equals the sdomain in database table. - The "sdomain" parameter specifies the source domain to be used to match + The “sdomain” parameter specifies the source domain to be used to match the longest prefix. Can be a static string or dynamic parameter with variables inside. - The "rewrite_mode" parameter specifies whether to strip or not the + The “rewrite_mode” parameter specifies whether to strip or not the prefix from user part. The possible values are: * 0: the prefix is removed along with the leading prefix. * 1: only the leading prefix is removed. @@ -389,7 +389,7 @@ pd_translate("*", "$var(a)"); changes made via these commands are applied to database and the cache is updated correspondingly. -5.1. pdt_list +5.1. pdt_list Produces a listing of the entries prefixes/domains/sdomains. @@ -413,14 +413,14 @@ pd_translate("*", "$var(a)"); _empty_line_ Examples: - * "pdt_list siph 2 ." : Lists the entries where sdomain is starting + * “pdt_list siph 2 .” : Lists the entries where sdomain is starting with 'siph', prefix is starting with '2' and domain is anything - * "pdt_list siph 2" : Lists the entries where sdomain is starting + * “pdt_list siph 2” : Lists the entries where sdomain is starting with 'siph', prefix is starting with '2' and domain is anything - * "pdt_list . 2 open" : Lists the entries where sdomain is anything, + * “pdt_list . 2 open” : Lists the entries where sdomain is anything, prefix starts with '2' and domain starts with 'open'. -5.2. pdt_reload +5.2. pdt_reload Reload all sdomain-prefix-domain records from database. diff --git a/modules/peering/verify.c b/modules/peering/verify.c index cafd12cca..743fcfe29 100644 --- a/modules/peering/verify.c +++ b/modules/peering/verify.c @@ -55,7 +55,7 @@ static inline int extract_avp(VALUE_PAIR* vp, unsigned short *flags, char *end; /* empty? */ - if (vp->lvalue==0 || vp->strvalue==0) + if (vp->lvalue==0) goto error; p = vp->strvalue; diff --git a/modules/permissions/README b/modules/permissions/README index b613bd433..15259f901 100644 --- a/modules/permissions/README +++ b/modules/permissions/README @@ -274,7 +274,7 @@ Chapter 1. Admin Guide The function for registration checking is called allow_register and the algorithm is very similar to the algorithm described in Section 1.1, - "Call Routing". The only difference is in the way how pairs are + “Call Routing”. The only difference is in the way how pairs are created. Instead of the From header field the function uses the To header field @@ -286,7 +286,7 @@ Chapter 1. Admin Guide (To, Contact 2), (To, Contact 3), and so on.. The algorithm of matching is the same as described in Section 1.1, - "Call Routing". + “Call Routing”. 1.3. URI Permissions @@ -414,7 +414,7 @@ Chapter 1. Admin Guide don't specify a full pathname then the directory in which is the main config file is located will be used. - Default value is "permissions.allow". + Default value is “permissions.allow”. Example 1.1. Set default_allow_file parameter ... @@ -427,7 +427,7 @@ modparam("permissions", "default_allow_file", "/etc/permissions.allow") no parameters. If you don't specify a full pathname then the directory in which the main config file is located will be used. - Default value is "permissions.deny". + Default value is “permissions.deny”. Example 1.2. Set default_deny_file parameter ... @@ -462,7 +462,7 @@ Note Including leading dot. - Default value is ".allow". + Default value is “.allow”. Example 1.4. Set allow_suffix parameter ... @@ -479,7 +479,7 @@ Note Including leading dot. - Default value is ".deny". + Default value is “.deny”. Example 1.5. Set deny_suffix parameter ... @@ -491,7 +491,7 @@ modparam("permissions", "deny_suffix", ".deny") This is URL of the database to be used to store rules used by allow_trusted function. - Default value is "NULL". + Default value is “NULL”. Example 1.6. Set db_url parameter ... @@ -503,7 +503,7 @@ modparam("permissions", "db_url", "dbdriver://username:password@dbhost/dbname") The name of the database table containing IP subnets and DNS domain names used by allow_address and allow_source_address functions. - Default value is "address". + Default value is “address”. Example 1.7. Set address_table parameter ... @@ -515,7 +515,7 @@ modparam("permissions", "address_table", "addr") Name of address table column containing the group identifier of the address. - Default value is "grp". + Default value is “grp”. Example 1.8. Set grp_col parameter ... @@ -527,7 +527,7 @@ modparam("permissions", "grp_col", "group_id") Name of address table column containing the IP address part of the address. - Default value is "ip_addr". + Default value is “ip_addr”. Example 1.9. Set ip_addr_col parameter ... @@ -540,7 +540,7 @@ modparam("permissions", "ip_addr_col", "ip_address") address. Possible values are 0-32 for IPv4 and 0-128 for IPv6 addresses. - Default value is "mask". + Default value is “mask”. Example 1.10. Set mask_col parameter ... @@ -551,7 +551,7 @@ modparam("permissions", "mask_col", "subnet_length") Name of address table column containing the port part of the address. - Default value is "port". + Default value is “port”. Example 1.11. Set port_col parameter ... @@ -575,7 +575,7 @@ modparam("permissions", "db_mode", 1) Name of database table containing the matching rules used by the allow_trusted function. - Default value is "trusted". + Default value is “trusted”. Example 1.13. Set trusted_table parameter ... @@ -584,10 +584,10 @@ modparam("permissions", "trusted_table", "pbx") 3.14. source_col (string) - Name of column in the "trusted" table containing the source IP address + Name of column in the “trusted” table containing the source IP address that is matched against source IP address of received request. - Default value is "src_ip". + Default value is “src_ip”. Example 1.14. Set source_col parameter ... @@ -596,13 +596,13 @@ modparam("permissions", "source_col", "source_ip_address") 3.15. proto_col (string) - Name of column in the "trusted" table containing the transport protocol + Name of column in the “trusted” table containing the transport protocol that is matched against transport protocol of the received request. - Possible values that can be stored in proto_col are "any", "udp", - "tcp", "tls", "sctp", "ws", "wss", and "none". Value "any" matches - always and value "none" never. + Possible values that can be stored in proto_col are “any”, “udp”, + “tcp”, “tls”, “sctp”, “ws”, “wss”, and “none”. Value “any” matches + always and value “none” never. - Default value is "proto". + Default value is “proto”. Example 1.15. Set proto_col parameter ... @@ -614,7 +614,7 @@ modparam("permissions", "proto_col", "transport") Name of the column trusted table containing a regular expression that is matched against the From URI. - Default value is "from_pattern". + Default value is “from_pattern”. Example 1.16. Set from_col parameter ... @@ -626,7 +626,7 @@ modparam("permissions", "from_col", "regexp") Name of the column trusted table containing a regular expression that is matched against the Request URI. - Default value is "ruri_pattern". + Default value is “ruri_pattern”. Example 1.17. Set ruri_col parameter ... @@ -635,11 +635,11 @@ modparam("permissions", "ruri_col", "regexp") 3.18. tag_col (string) - Name of the column in the "address" or "trusted" table containing a + Name of the column in the “address” or “trusted” table containing a string that is added as value to peer_tag AVP if peer_tag AVP has been defined and if the address or peer matches. - Default value is "tag". + Default value is “tag”. Example 1.18. Set tag_col parameter ... @@ -654,7 +654,7 @@ modparam("permissions", "tag_col", "peer_tag") In non-caching mode, priority order (ASC vs DESC) is determined by database. - Default value is "priority". + Default value is “priority”. Example 1.19. Set priority_col parameter ... @@ -666,7 +666,7 @@ modparam("permissions", "priority_col", "column_name") If defined, the AVP will be set as a side effect of allow_trusted call to not NULL tag column value of the matching peer. - Default value is "undefined". + Default value is “undefined”. Example 1.20. Set peer_tag_avp parameter ... @@ -675,12 +675,12 @@ modparam("permissions", "peer_tag_avp", "$avp(i:707)") 3.21. peer_tag_mode (integer) - Tag mode for allow_trusted. "0" sets only the tag of the first match. - "1" adds the tags of all matches to the avp. In addition the return + Tag mode for allow_trusted. “0” sets only the tag of the first match. + “1” adds the tags of all matches to the avp. In addition the return value of allow_trusted is the number of matches. This parameter is not used for address table matching functions. - Default value is "0". + Default value is “0”. Example 1.21. Set peer_tag_mode parameter ... @@ -691,7 +691,7 @@ modparam("permissions", "peer_tag_mode", 1) The maximum number of subnet addresses to be loaded from address table. - Default value is "512". + Default value is “512”. Example 1.22. Set max_subnets parameter ... @@ -712,10 +712,10 @@ modparam("permissions", "max_subnets", 1024) 4.10. allow_address_group(addr, port) 4.11. allow_trusted([src_ip_pvar, proto_pvar]) -4.1. allow_routing() +4.1. allow_routing() Returns true if all pairs constructed as described in Section 1.1, - "Call Routing" have appropriate permissions according to the + “Call Routing” have appropriate permissions according to the configuration files. This function uses default configuration files specified in default_allow_file and default_deny_file. @@ -728,10 +728,10 @@ if (allow_routing()) { }; ... -4.2. allow_routing(basename) +4.2. allow_routing(basename) Returns true if all pairs constructed as described in Section 1.1, - "Call Routing" have appropriate permissions according to the + “Call Routing” have appropriate permissions according to the configuration files given as parameters. Meaning of the parameters is as follows: @@ -751,10 +751,10 @@ if (allow_routing("basename")) { }; ... -4.3. allow_routing(allow_file,deny_file) +4.3. allow_routing(allow_file,deny_file) Returns true if all pairs constructed as described in Section 1.1, - "Call Routing" have appropriate permissions according to the + “Call Routing” have appropriate permissions according to the configuration files given as parameters. Meaning of the parameters is as follows: @@ -776,10 +776,10 @@ if (allow_routing("rules.allow", "rules.deny")) { }; ... -4.4. allow_register(basename) +4.4. allow_register(basename) The function returns true if all pairs constructed as described in - Section 1.2, "Registration Permissions" have appropriate permissions + Section 1.2, “Registration Permissions” have appropriate permissions according to the configuration files given as parameters. Meaning of the parameters is as follows: @@ -804,10 +804,10 @@ if (method=="REGISTER") { }; ... -4.5. allow_register(allow_file, deny_file) +4.5. allow_register(allow_file, deny_file) The function returns true if all pairs constructed as described in - Section 1.2, "Registration Permissions" have appropriate permissions + Section 1.2, “Registration Permissions” have appropriate permissions according to the configuration files given as parameters. Meaning of the parameters is as follows: @@ -834,10 +834,10 @@ if (method=="REGISTER") { }; ... -4.6. allow_uri(basename, pvar) +4.6. allow_uri(basename, pvar) - Returns true if the pair constructed as described in Section 1.3, "URI - Permissions" have appropriate permissions according to the + Returns true if the pair constructed as described in Section 1.3, “URI + Permissions” have appropriate permissions according to the configuration files specified by the parameter. Meaning of the parameter is as follows: @@ -861,7 +861,7 @@ if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(i:705) }; ... -4.7. allow_address(group_id, ip_addr_pvar, port_pvar) +4.7. allow_address(group_id, ip_addr_pvar, port_pvar) Returns true if the address and port given as values of pvar arguments belonging to a group given as group_id argument matches an IP subnet or @@ -871,8 +871,8 @@ if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(i:705) with the records from that group that are of type exact IP or subnet. If the argument is not an IP it is tried to be matched with the records that are DNS domain names. No DNS lookup is performed, only strict - matching. Cached address table entry containing port value "0" matches - any port. The "group_id" argument can be an integer string or a pseudo + matching. Cached address table entry containing port value “0” matches + any port. The “group_id” argument can be an integer string or a pseudo variable. This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. @@ -892,9 +892,9 @@ if (!allow_address("2", "$avp(dst_adr)", "$avp(dst_port)") { }; ... -4.8. allow_source_address([group_id]) +4.8. allow_source_address([group_id]) - Equal to "allow_address(group_id, "$si", "$sp")". If 'group_id' is + Equal to “allow_address(group_id, "$si", "$sp")”. If 'group_id' is missing, the function is equal to allow_address("1", "$si", "$sp"). This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. @@ -908,7 +908,7 @@ if (!allow_source_address("1")) { }; ... -4.9. allow_source_address_group() +4.9. allow_source_address_group() Checks if source address/port is found in cached address or subnet table in any group. If yes, returns that group. If not returns -1. Port @@ -925,7 +925,7 @@ if ($var(group) != -1) { }; ... -4.10. allow_address_group(addr, port) +4.10. allow_address_group(addr, port) Checks if address/port is found in cached address or subnet table in any group. If yes, returns that group. If not returns -1. Port value 0 @@ -943,13 +943,13 @@ if ($var(group) != -1) { }; ... -4.11. allow_trusted([src_ip_pvar, proto_pvar]) +4.11. allow_trusted([src_ip_pvar, proto_pvar]) Checks based either on request's source address and transport protocol or source address and transport protocol given in pvar arguments, and From URI of request if request can be trusted without authentication. - Returns "1" if a match is found as described in Section 1.5, "Trusted - Requests" and "-1" otherwise. If a match is found and peer_tag_avp has + Returns “1” if a match is found as described in Section 1.5, “Trusted + Requests” and “-1” otherwise. If a match is found and peer_tag_avp has been defined, adds a non-NULL tag column value of the matching peer to AVP peer_tag_avp. @@ -979,7 +979,7 @@ if (allow_trusted("$si", "$proto")) { 5.5. trusted_dump 5.6. allow_uri -5.1. address_reload +5.1. address_reload Causes the permissions module to re-read the contents of address database table into cache memory. The in-cache memory entries are for @@ -988,35 +988,35 @@ if (allow_trusted("$si", "$proto")) { Parameters: none -5.2. address_dump +5.2. address_dump Causes permissions module to dump contents of cache memory address table. Parameters: none -5.3. subnet_dump +5.3. subnet_dump Causes permissions module to dump contents of cache memory subnet table. Parameters: none -5.4. trusted_reload +5.4. trusted_reload Causes the permissions module to re-read the contents of trusted table into cache memory. Parameters: none -5.5. trusted_dump +5.5. trusted_dump Causes the permissions module to dump the contents of trusted table from cache memory. Parameters: none -5.6. allow_uri +5.6. allow_uri Tests if (URI, Contact) pair is allowed according to the allow/deny files. The files must already have been loaded by Kamailio. @@ -1037,7 +1037,7 @@ if (allow_trusted("$si", "$proto")) { 6.5. trustedReload 6.6. trustedDump -6.1. addressReload +6.1. addressReload Causes the permissions module to re-read the contents of address database table into cache memory. In cache memory the entries are for @@ -1046,21 +1046,21 @@ if (allow_trusted("$si", "$proto")) { Parameters: none -6.2. addressDump +6.2. addressDump Causes the permissions module to dump the contents of cache memory address table. (Not the subnet table). Parameters: none -6.3. subnetDump +6.3. subnetDump Causes permissions module to dump contents of cache memory subnet table. Parameters: none -6.4. testUri basename uri contact +6.4. testUri basename uri contact Tests if the (URI, Contact) pair is allowed according to allow/deny files. The files must already have been loaded by Kamailio. @@ -1072,14 +1072,14 @@ if (allow_trusted("$si", "$proto")) { * URI - URI to be tested * Contact - Contact to be tested -6.5. trustedReload +6.5. trustedReload Causes the permissions module to re-read the contents of the trusted database table into cache memory. Parameters: none -6.6. trustedDump +6.6. trustedDump Causes the permissions module to dump contents of the trusted database table from cache memory. diff --git a/modules/pike/README b/modules/pike/README index bb7466b32..59f068a51 100644 --- a/modules/pike/README +++ b/modules/pike/README @@ -8,7 +8,7 @@ Edited by Bogdan-Andrei Iancu - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -120,7 +120,7 @@ Chapter 1. Admin Guide IMPORTANT: a too small value may lead to performance penalties due to timer process overloading. - Default value is "2". + Default value is “2”. Example 1.1. Set sampling_time_unit parameter ... @@ -174,7 +174,7 @@ modparam("pike", "pike_log_level", -1) 4.1. pike_check_req() -4.1. pike_check_req() +4.1. pike_check_req() Process the source IP of the current request and return false if the IP was exceeding the blocking limit. @@ -200,7 +200,7 @@ if (!pike_check_req()) { exit; }; 5.1. pike_list -5.1. pike_list +5.1. pike_list Lists the nodes in the pike tree. @@ -218,7 +218,7 @@ Chapter 2. RPC calls 1. pike.top -1. pike.top +1. pike.top Pike.top behaves like a 'top' command and shows source IP addresses of incoming requestes to pike_check_req() function. @@ -253,21 +253,21 @@ tree root / \ 142 the nodes corresponding to each byte of the ip address are expanded. In order to be expended a node has to be hit for a given number of times (possible by different addresses; in the previous example, the node - "37" was expended by the 195.37.78.163 and 195.37.79.134 hits). + “37” was expended by the 195.37.78.163 and 195.37.79.134 hits). For 193.175.132.164 with x= reqs_density_per_unit: - * After first req hits -> the "193" node is built. - * After x more hits, the "175" node is build; the hits of "193" node + * After first req hits -> the “193” node is built. + * After x more hits, the “175” node is build; the hits of “193” node are split between itself and its child--both of them gone have x/2. - * And so on for node "132" and "164". - * Once "164" build the entire address can be found in the tree. "164" + * And so on for node “132” and “164”. + * Once “164” build the entire address can be found in the tree. “164” becomes a leaf. After it will be hit as a leaf for x times, it will - become "RED" (further request from this address will be blocked). + become “RED” (further request from this address will be blocked). So, to build and block this address were needed 3*x hits. Now, if reqs start coming from 193.175.132.142, the first 3 bytes are already in the tree (they are shared with the previous address), so I will need only x - hits (to build node "142" and to make it "RED") to make this address + hits (to build node “142” and to make it “RED”) to make this address also to be blocked. This is the reason for the variable number of hits necessary to block an IP. diff --git a/modules/pipelimit/README b/modules/pipelimit/README index 2cc819773..e9872ecf2 100644 --- a/modules/pipelimit/README +++ b/modules/pipelimit/README @@ -24,9 +24,9 @@ Daniel-Constantin Mierla 1. Admin Guide 1. Overview - - 1.1 Algorithms - + + 1.1. Algorithms + 2. Dependencies 2.1. Kamailio Modules @@ -88,7 +88,7 @@ Chapter 1. Admin Guide Table of Contents 1. Overview - + 1.1. Algorithms 2. Dependencies @@ -147,15 +147,15 @@ Chapter 1. Admin Guide of pipes limits in database and dynamic names. Complexity of keeping everything in a module and make it dual mode functional resulted in a new module which is focused on just traffic shaping policies. - + 1.1. Algorithms Algorithms are based from the ratelimit module, which describes the algorithms in more detail. The algorithms are used by the pipelimit module to determine if a message should be blocked. - + Tail Drop Algorithm (TAILDROP) - + This is a trivial algorithm that imposes some risks when used in conjunction with long timer intervals. At the start of each interval an internal counter is reset and incremented for each incoming message. @@ -172,7 +172,7 @@ Chapter 1. Admin Guide interval. As a negative side effect Kamailio might drop messages although the limit might not be reached within the interval. Decrease the timer interval if you encounter this. - + Network Algorithm (NETWORK) This algorithm relies on information provided by network interfaces. @@ -231,7 +231,7 @@ Chapter 1. Admin Guide have many pipes, increase this value for proper performances, but don't go too high (hash_size=10 means 1024 slots). - Default value is "6" (64 slots). + Default value is “6” (64 slots). Example 1.1. Set hash_size parameter ... @@ -242,7 +242,7 @@ modparam("pipelimit", "hash_size", 10) URL of the database server to be used. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.2. Set db_url parameter ... @@ -253,7 +253,7 @@ modparam("pipelimit", "db_url", "dbdriver://username:password@dbhost/dbname") Name of DB table where data definition for pipes is stores. - Default value is "pl_pipes". + Default value is “pl_pipes”. Example 1.3. Set plp_table_name parameter ... @@ -264,7 +264,7 @@ modparam("pipelimit", "plp_table_name", "mypipes") Name of 'pipeid' column. - Default value is "pipeid". + Default value is “pipeid”. Example 1.4. Set plp_pipeid_column parameter ... @@ -275,7 +275,7 @@ modparam("pipelimit", "plp_pipeid_column", "name") Name of 'limit' column. - Default value is "limit". + Default value is “limit”. Example 1.5. Set plp_limit_column parameter ... @@ -286,7 +286,7 @@ modparam("pipelimit", "plp_limit_column", "name") Name of 'algorithm' column. - Default value is "algorithm". + Default value is “algorithm”. Example 1.6. Set plp_algorithm_column parameter ... @@ -346,7 +346,7 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting" 4.1. pl_check(name [, algorithm, limit]) 4.2. pl_drop([ [min ], max ]) -4.1. pl_check(name [, algorithm, limit]) +4.1. pl_check(name [, algorithm, limit]) Check the current request against the 'name' pipe. @@ -415,15 +415,15 @@ with unexpected retcode=$var(check_result)\n"); ... # perform pipe match for INVITE if (is_method("INVITE")) { - $var(invlimit) = 10; - if (!pl_check("$si", "TAILDROP", "$var(invlimit)")) { - pl_drop(); - exit; - } + $var(invlimit) = 10; + if (!pl_check("$si", "TAILDROP", "$var(invlimit)")) { + pl_drop(); + exit; + } } ... -4.2. pl_drop([ [min ], max ]) +4.2. pl_drop([ [min ], max ]) For the current request, a "503 - Server Unavailable" reply is sent back. The reply may or may not have a "Retry-After" header. If no @@ -458,7 +458,7 @@ with unexpected retcode=$var(check_result)\n"); 5.5. pl_get_pid 5.6. pl_push_load -5.1. pl_stats +5.1. pl_stats Lists the parameters and variables in the pipelimit module. @@ -470,7 +470,7 @@ with unexpected retcode=$var(check_result)\n"); :pl_stats:_reply_fifo_file_ _empty_line_ -5.2. pl_set_pipe +5.2. pl_set_pipe Sets the pipe parameters for the given pipe id. @@ -488,7 +488,7 @@ with unexpected retcode=$var(check_result)\n"); 10 _empty_line_ -5.3. pl_get_pipes +5.3. pl_get_pipes Gets the list of in use pipes. @@ -500,7 +500,7 @@ with unexpected retcode=$var(check_result)\n"); :pl_get_pipes:_reply_fifo_file_ _empty_line_ -5.4. pl_set_pid +5.4. pl_set_pid Sets the PID Controller parameters for the Feedback Algorithm. @@ -518,7 +518,7 @@ with unexpected retcode=$var(check_result)\n"); 0.5 _empty_line_ -5.5. pl_get_pid +5.5. pl_get_pid Gets the list of in use PID Controller parameters. @@ -530,7 +530,7 @@ with unexpected retcode=$var(check_result)\n"); :pl_get_pid:_reply_fifo_file_ _empty_line_ -5.6. pl_push_load +5.6. pl_push_load Force the value of the load parameter. This command is useful for testing the Feedback algorithm. @@ -555,7 +555,7 @@ with unexpected retcode=$var(check_result)\n"); 6.5. pl.get_pid 6.6. pl.push_load -6.1. pl.stats +6.1. pl.stats Lists the parameters and variabiles in the pipelimit module: pipe id, pipe load and pipe couter. @@ -567,7 +567,7 @@ with unexpected retcode=$var(check_result)\n"); RPC Command Format: kamcmd pl.stats -6.2. pl.set_pipe +6.2. pl.set_pipe Sets the pipe parameters for the given pipe id. @@ -581,7 +581,7 @@ with unexpected retcode=$var(check_result)\n"); RPC Command Format: kamcmd pl.set_pipe 2 RED 10 -6.3. pl.get_pipes +6.3. pl.get_pipes Gets the list of in use pipes. @@ -592,7 +592,7 @@ with unexpected retcode=$var(check_result)\n"); RPC Command Format: kamcmd pl.get_pipes -6.4. pl.set_pid +6.4. pl.set_pid Sets the PID Controller parameters for the Feedback Algorithm. @@ -606,7 +606,7 @@ with unexpected retcode=$var(check_result)\n"); RPC Command Format: kamcmd pl.set_pid 0.5 0.5 0.5 -6.5. pl.get_pid +6.5. pl.get_pid Gets the list of in use PID Controller parameters. @@ -617,7 +617,7 @@ with unexpected retcode=$var(check_result)\n"); RPC Command Format: kamcmd pl.get_pid -6.6. pl.push_load +6.6. pl.push_load Force the value of the load parameter. This command is useful for testing the Feedback algorithm. diff --git a/modules/prefix_route/README b/modules/prefix_route/README index ba3663c76..b28d63223 100644 --- a/modules/prefix_route/README +++ b/modules/prefix_route/README @@ -1,14 +1,13 @@ - prefix_route Module Alfred E. Heggestad Telio Telecom - Copyright 2007 Alfred E. Heggestad + Copyright © 2007 Alfred E. Heggestad - Copyright 2008 Telio Telecom AS - _________________________________________________________________ + Copyright © 2008 Telio Telecom AS + __________________________________________________________________ Table of Contents @@ -64,13 +63,13 @@ Chapter 1. Admin Guide 1. Overview - The prefix_route module does routing based on a set of prefixes from - the database. The prefix rule-set is loaded from the database into a - binary tree in memory, either on startup or when issuing the - "prefix_route.reload" RPC command. When calling the "prefix_route()" - function from the ser.cfg configuration script, it will try to match - the user part of the request URI with the best matching route. If a - route is found, it will be used for further processing. If not found + The prefix_route module does routing based on a set of prefixes from + the database. The prefix rule-set is loaded from the database into a + binary tree in memory, either on startup or when issuing the + "prefix_route.reload" RPC command. When calling the "prefix_route()" + function from the ser.cfg configuration script, it will try to match + the user part of the request URI with the best matching route. If a + route is found, it will be used for further processing. If not found normal processing will continue. Development was sponsored by Telio Telecom. @@ -105,8 +104,8 @@ modparam("prefix_route", "db_table", "new_prefix_route") 2.3. exit (int) - If set, exit the execution of the configuration file when a route - block is executed upon matching a prefix. Otherwise return 1 (true). + If set, exit the execution of the configuration file when a route block + is executed upon matching a prefix. Otherwise return 1 (true). Default value is 1 (on). @@ -121,7 +120,7 @@ modparam("prefix_route", "exit", 0) 3.1. prefix_route([user]) - This function tries to find a route from the user part of the request + This function tries to find a route from the user part of the request URI (if no parameter is provided), or from the value of the parameter. The parameter can contain config variables. diff --git a/modules/presence/README b/modules/presence/README index 9d4c21932..1f80ee394 100644 --- a/modules/presence/README +++ b/modules/presence/README @@ -1132,17 +1132,16 @@ typedef struct pres_ev free_body_t* free_body; /* sometimes it is necessary that a module make changes for a body for each * active watcher (e.g. setting the "version" parameter in an XML document. - * If a module registers the aux_body_processing callback, it gets called f -or - * each watcher. It either gets the body received by the PUBLISH, or the bo -dy + * If a module registers the aux_body_processing callback, it gets called fo +r + * each watcher. It either gets the body received by the PUBLISH, or the bod +y * generated by the agg_nbody function. * The module can deceide if it makes a copy of the original body, which is - then +then * manipulated, or if it works directly in the original body. If the module - makes a - * copy of the original body, it also has to register the aux_free_body() t -o +makes a + * copy of the original body, it also has to register the aux_free_body() to * free this "per watcher" body. */ aux_body_processing_t* aux_body_processing; @@ -1319,8 +1318,8 @@ typedef char* (*pres_get_sphere_t)(str* pres_uri); Field type: ... -typedef str* (*pres_get_presentity_t)(str pres_uri, pres_ev_t *ev, str *etag, s -tr *contact); +typedef str* (*pres_get_presentity_t)(str pres_uri, pres_ev_t *ev, str *etag, st +r *contact); ... This function returns a pointer to a str containing an XML document diff --git a/modules/presence/notify.c b/modules/presence/notify.c index 7e7b0b25e..ff20bec92 100644 --- a/modules/presence/notify.c +++ b/modules/presence/notify.c @@ -659,7 +659,7 @@ str* get_p_notify_body(str pres_uri, pres_ev_t* event, str* etag, } if(pres_retrieve_order==1) { - query_str = str_priority_col; + query_str = pres_retrieve_order_by; } else { query_str = str_received_time_col; } diff --git a/modules/presence/presence.c b/modules/presence/presence.c index 1847c7238..0b50e728e 100644 --- a/modules/presence/presence.c +++ b/modules/presence/presence.c @@ -157,6 +157,7 @@ int pres_notifier_poll_rate = 10; int pres_notifier_processes = 1; str pres_xavp_cfg = {0}; int pres_retrieve_order = 0; +str pres_retrieve_order_by = str_init("priority"); int db_table_lock_type = 1; db_locking_t db_table_lock = DB_LOCKING_WRITE; @@ -218,6 +219,7 @@ static param_export_t params[]={ { "subs_remove_match", PARAM_INT, &pres_subs_remove_match}, { "xavp_cfg", PARAM_STR, &pres_xavp_cfg}, { "retrieve_order", PARAM_INT, &pres_retrieve_order}, + { "retrieve_order_by", PARAM_STR, &pres_retrieve_order_by}, { "sip_uri_match", PARAM_INT, &pres_uri_match}, {0,0,0} }; diff --git a/modules/presence/presence.h b/modules/presence/presence.h index cee305282..bd76a1389 100644 --- a/modules/presence/presence.h +++ b/modules/presence/presence.h @@ -90,6 +90,7 @@ extern int pres_notifier_poll_rate; extern int pres_notifier_processes; extern str pres_xavp_cfg; extern int pres_retrieve_order; +extern str pres_retrieve_order_by; extern int phtable_size; extern phtable_t* pres_htable; diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c index 71adc362f..8b0472bc9 100644 --- a/modules/presence/presentity.c +++ b/modules/presence/presentity.c @@ -1149,7 +1149,7 @@ char* get_sphere(str* pres_uri) } if(pres_retrieve_order==1) { - query_str = str_priority_col; + query_str = pres_retrieve_order_by; } else { query_str = str_received_time_col; } diff --git a/modules/presence_conference/pidf.c b/modules/presence_conference/pidf.c index 7af6c8252..f33943f81 100644 --- a/modules/presence_conference/pidf.c +++ b/modules/presence_conference/pidf.c @@ -34,23 +34,22 @@ /** * make strptime available * use 600 for 'Single UNIX Specification, Version 3' - * _XOPEN_SOURCE creates conflict in header definitions in Solaris */ -#ifndef __OS_solaris - #define _XOPEN_SOURCE 600 /* glibc2 on linux, bsd */ +#ifdef __OS_linux + #define _XOPEN_SOURCE 600 /* glibc2 on linux */ #define _BSD_SOURCE 1 /* needed on linux to "fix" the effect of the above define on features.h/unistd.h syscall() */ + #define _DEFAULT_SOURCE 1 /* _BSD_SOURCE is deprecated */ +#endif +#ifdef __OS_darwin #define _DARWIN_C_SOURCE 1 -#else - #define _XOPEN_SOURCE_EXTENDED 1 /* solaris */ #endif - +#ifdef __OS_solaris + #define _XOPEN_SOURCE_EXTENDED 1 +#endif #include -#undef _XOPEN_SOURCE -#undef _XOPEN_SOURCE_EXTENDED - #include #include #include diff --git a/modules/presence_dialoginfo/README b/modules/presence_dialoginfo/README index f62ebe330..3db72e9ae 100644 --- a/modules/presence_dialoginfo/README +++ b/modules/presence_dialoginfo/README @@ -38,12 +38,14 @@ Klaus Darilion 3. Parameters 3.1. force_single_dialog (int) + 3.2. force_dummy_dialog (int) 4. Functions List of Examples 1.1. Set parameter + 1.2. Set parameter Chapter 1. Admin Guide @@ -58,6 +60,7 @@ Chapter 1. Admin Guide 3. Parameters 3.1. force_single_dialog (int) + 3.2. force_dummy_dialog (int) 4. Functions @@ -189,6 +192,7 @@ alice@example server server bob@example watcher@example 3. Parameters 3.1. force_single_dialog (int) + 3.2. force_dummy_dialog (int) 3.1. force_single_dialog (int) @@ -212,6 +216,22 @@ alice@example server server bob@example watcher@example modparam("presence_dialoginfo", "force_single_dialog", 1) ... +3.2. force_dummy_dialog (int) + + By default the module returns null body if there are no bodies to + aggregate. some sip clients like Bria expect at least one dialog. you + can activate this parameter to send a dummy dialog. + + If this parameter is set and there are no dialog bodies to aggregate, + it will return a dummy dialog. + + Default value is “0”. + + Example 1.2. Set parameter +... +modparam("presence_dialoginfo", "force_dummy_dialog", 1) +... + 4. Functions None to be used in configuration file. diff --git a/modules/presence_dialoginfo/pidf.c b/modules/presence_dialoginfo/pidf.c index 23e6bd30e..51c845e5a 100644 --- a/modules/presence_dialoginfo/pidf.c +++ b/modules/presence_dialoginfo/pidf.c @@ -41,6 +41,7 @@ #define _BSD_SOURCE 1 /* needed on linux to "fix" the effect of the above define on features.h/unistd.h syscall() */ + #define _DEFAULT_SOURCE 1 /* _BSD_SOURCE is deprecated */ #elif defined __OS_solaris #define _XOPEN_SOURCE_EXTENDED 1 /* solaris */ #endif diff --git a/modules/presence_profile/README b/modules/presence_profile/README index 491fdcf32..c5f670e8f 100644 --- a/modules/presence_profile/README +++ b/modules/presence_profile/README @@ -1,12 +1,12 @@ Presence_Profile Module -Mihály Mészáros +Mihály Mészáros Edited by -Mészáros Mihály +Mészáros Mihály @@ -16,7 +16,7 @@ Alex Balashov - Copyright 2011 Mészáros Mihály + Copyright © 2011 Mészáros Mihály __________________________________________________________________ Table of Contents diff --git a/modules/presence_xml/README b/modules/presence_xml/README index 3844f0342..b5eaa361c 100644 --- a/modules/presence_xml/README +++ b/modules/presence_xml/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright 2007 Voice Sistem SRL + Copyright © 2007 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -148,7 +148,7 @@ Chapter 1. Admin Guide The database URL. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.1. Set db_url parameter ... @@ -159,7 +159,7 @@ modparam("presence_xml", "db_url", "dbdriver://username:password@dbhost/dbname") The name of the database table where XCAP documents are stored. - Default value is "xcap". + Default value is “xcap”. Example 1.2. Set xcap_table parameter ... @@ -170,7 +170,7 @@ modparam("presence_xml", "xcap_table", "xcaps") Set this parameter to disable the handling of the "presence" event. - Default value: "0". + Default value: “0”. Example 1.3. Set disable_presence parameter ... @@ -182,7 +182,7 @@ modparam("presence_xml", "disable_presence", 1) Set this parameter to disable the handling of the "presence.winfo" event. - Default value: "0". + Default value: “0”. Example 1.4. Set disable_winfo parameter ... @@ -193,7 +193,7 @@ modparam("presence_xml", "disable_winfo", 1) Set this parameter to disable the handling of the "dialog;sla" event. - Default value: "1" (0 - enabled, 1 - disabled). + Default value: “1” (0 - enabled, 1 - disabled). Example 1.5. Set disable_bla parameter ... @@ -213,7 +213,7 @@ modparam("presence_xml", "disable_bla", 1) Note: When switching from one value to another, the watchers table must be emptied. - Default value is "0". + Default value is “0”. Example 1.6. Set force_active parameter ... @@ -235,7 +235,7 @@ modparam("presence_xml", "force_active", 1) Otherwise, it uses xcap_client module to fetch documents from the XCAP servers with HTTP requests. - Default value is "0". + Default value is “0”. Example 1.7. Set integrated_xcap_server parameter ... @@ -261,7 +261,7 @@ modparam("presence_xml", "xcap_server", "xcap_server.ag.org") no connection to database. Useful when needing only to use $xml(...) pseudoc-variable. - Default value: "0" (0 - active mode, 1 - passive mode). + Default value: “0” (0 - active mode, 1 - passive mode). Example 1.9. Set passive_mode parameter ... @@ -278,7 +278,7 @@ modparam("presence_xml", "passive_mode", 1) ones defined by the RFC 3265, this parameter offers the possibility for the admin to decide which one he wishes to use. - Default value: "probation" . Since probation also accepts a retry-after + Default value: “probation” . Since probation also accepts a retry-after parameter to specify after at least how may seconds the client should reattempt to resubscribe, you can include this in the parameter also. @@ -293,7 +293,7 @@ modparam("presence_xml", "xcapauth_userdel_reason", "rejected") Set this parameter to enable simple body notify with status 'open' when presentity info is not available. - Default value: "0". + Default value: “0”. Example 1.11. Set force_dummy_presence parameter ... @@ -355,7 +355,7 @@ modparam("presence_xml", "force_dummy_presence", 1) 5. Installation - The module requires one table in Kamailio database: "xcap". The SQL + The module requires one table in Kamailio database: “xcap”. The SQL syntax to create it can be found in presence-create.sql script in the database directories in the kamailio/scripts folder. You can also find the complete database documentation on the project webpage, diff --git a/modules/presence_xml/pidf.c b/modules/presence_xml/pidf.c index fca87b379..7644f8968 100644 --- a/modules/presence_xml/pidf.c +++ b/modules/presence_xml/pidf.c @@ -42,6 +42,7 @@ #define _BSD_SOURCE 1 /* needed on linux to "fix" the effect of the above define on features.h/unistd.h syscall() */ + #define _DEFAULT_SOURCE 1 /* _BSD_SOURCE is deprecated */ #define _DARWIN_C_SOURCE 1 #else #define _XOPEN_SOURCE_EXTENDED 1 /* solaris */ diff --git a/modules/print/README b/modules/print/README index 33279796f..2ca12fd97 100644 --- a/modules/print/README +++ b/modules/print/README @@ -1,12 +1,11 @@ - Print Module Andrei Pelinescu-Onciul FhG FOKUS - Copyright 2003 FhG FOKUS - _________________________________________________________________ + Copyright © 2003 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -20,7 +19,7 @@ Andrei Pelinescu-Onciul 3. Functions - 3.1. print(txt) + 3.1. print(txt) List of Examples @@ -40,12 +39,12 @@ Chapter 1. Admin Guide 3. Functions - 3.1. print(txt) + 3.1. print(txt) 1. Overview This is an example module. It implements only one function that prints - its string parameter to stdout (it won't work if ser is started in + its string parameter to stdout (it won't work if ser is started in daemon mode). It also shows how module parameters can be declared. 2. Parameters @@ -77,7 +76,7 @@ modparam("print", "int_param", 42) 3. Functions - 3.1. print(txt) + 3.1. print(txt) 3.1. print(txt) diff --git a/modules/print_lib/README b/modules/print_lib/README index 5d93909d4..973de71b7 100644 --- a/modules/print_lib/README +++ b/modules/print_lib/README @@ -1,12 +1,11 @@ - Print_lib Module Andrei Pelinescu-Onciul FhG FOKUS - Copyright 2003 FhG FOKUS - _________________________________________________________________ + Copyright © 2003 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -15,7 +14,7 @@ Andrei Pelinescu-Onciul 1. Overview 2. Functions - 2.1. print_stderr(txt) + 2.1. print_stderr(txt) List of Examples @@ -28,18 +27,18 @@ Chapter 1. Admin Guide 1. Overview 2. Functions - 2.1. print_stderr(txt) + 2.1. print_stderr(txt) 1. Overview This is an example module. It implements only one function that prints - its string parameter to stderr (it won't work if server is started in - daemon mode). Its prupose is to show how to link to an internal - library (lib/print). + its string parameter to stderr (it won't work if server is started in + daemon mode). Its prupose is to show how to link to an internal library + (lib/print). 2. Functions - 2.1. print_stderr(txt) + 2.1. print_stderr(txt) 2.1. print_stderr(txt) diff --git a/modules/pua/README b/modules/pua/README index ed64a3bc0..59ff97fb3 100644 --- a/modules/pua/README +++ b/modules/pua/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright (c) 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -33,8 +33,9 @@ Anca-Maria Vamanu 3.8. dlginfo_increase_version (int) 3.9. reginfo_increase_version (int) 3.10. db_mode (int) - 3.11. check_remote_contact (int) - 3.12. fetch_rows (integer) + 3.11. db_table_lock_write (integer) + 3.12. check_remote_contact (int) + 3.13. fetch_rows (integer) 4. Functions @@ -67,9 +68,10 @@ Anca-Maria Vamanu 1.8. Set dlginfo_increase_version parameter 1.9. Set reginfo_increase_version parameter 1.10. Set db_mode parameter - 1.11. Set check_remote_contact parameter - 1.12. Set fetch_rows parameter - 1.13. pua_update_contact usage + 1.11. Set db_table_lock_write parameter + 1.12. Set check_remote_contact parameter + 1.13. Set fetch_rows parameter + 1.14. pua_update_contact usage 2.1. pua_api structure 2.2. pua_is_dialog usage example 2.3. register_puacb usage example @@ -97,8 +99,9 @@ Chapter 1. Admin Guide 3.8. dlginfo_increase_version (int) 3.9. reginfo_increase_version (int) 3.10. db_mode (int) - 3.11. check_remote_contact (int) - 3.12. fetch_rows (integer) + 3.11. db_table_lock_write (integer) + 3.12. check_remote_contact (int) + 3.13. fetch_rows (integer) 4. Functions @@ -166,8 +169,9 @@ Chapter 1. Admin Guide 3.8. dlginfo_increase_version (int) 3.9. reginfo_increase_version (int) 3.10. db_mode (int) - 3.11. check_remote_contact (int) - 3.12. fetch_rows (integer) + 3.11. db_table_lock_write (integer) + 3.12. check_remote_contact (int) + 3.13. fetch_rows (integer) 3.1. hash_size (int) @@ -175,7 +179,7 @@ Chapter 1. Admin Guide information. This parameter will be used as the power of 2 when computing table size. - Default value is "9". + Default value is “9”. Example 1.1. Set hash_size parameter ... @@ -186,7 +190,7 @@ modparam("pua", "hash_size", 11) Database url. - Default value is ">mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “>mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.2. Set db_url parameter ... @@ -197,7 +201,7 @@ modparam("pua", "db_url" "dbdriver://username:password@dbhost/dbname") The name of the database table. - Default value is "pua". + Default value is “pua”. Example 1.3. Set db_table parameter ... @@ -208,7 +212,7 @@ modparam("pua", "db_table", "pua") The inferior expires limit for both Publish and Subscribe. - Default value is "0". + Default value is “0”. Example 1.4. Set min_expires parameter ... @@ -220,7 +224,7 @@ modparam("pua", "min_expires", 0) The default expires value used in case this information is not provisioned. - Default value is "3600". + Default value is “3600”. Example 1.5. Set default_expires parameter ... @@ -234,7 +238,7 @@ modparam("pua", "default_expires", 3600) expired messages. Setting a value less than or equal to zero, disables updates. - Default value is "100". + Default value is “100”. Example 1.6. Set update_period parameter ... @@ -264,7 +268,7 @@ modparam("pua", "outbound_proxy", "sip:outbound.example.com") presence_dialoginfo module) it makes no sense to waste CPU resources for parsing the XML body and the parameter should be set to 0. - Default value is "0". + Default value is “0”. Example 1.8. Set dlginfo_increase_version parameter ... @@ -282,7 +286,7 @@ modparam("pua", "dlginfo_increase_version", 1) presence_reginfo module) it makes no sense to waste CPU resources for parsing the XML body and the parameter should be set to 0. - Default value is "0". + Default value is “0”. Example 1.9. Set reginfo_increase_version parameter ... @@ -296,14 +300,27 @@ modparam("pua", "reginfo_increase_version", 1) in a database, allowing scalability at the expense of speed. Mode 1 is reserved. - Default value is "0". + Default value is “0”. Example 1.10. Set db_mode parameter ... modparam("pua", "db_mode", 0) ... -3.11. check_remote_contact (int) +3.11. db_table_lock_write (integer) + + Enable (=1) or disable (=0) the Locks for table during an transaction. + Locking only the "current" table causes problems with a MySQL-Databases + in "DB-Only" mode. + + Default value is 1 (Write Lock for the Tables). + + Example 1.11. Set db_table_lock_write parameter +... +modparam("pua", "db_table_lock_write", 0) +... + +3.12. check_remote_contact (int) When sending a SUBSCRIBE check that the remote contact matches the one in the stored dialog or not. If the remote contact is checked and does @@ -313,20 +330,20 @@ modparam("pua", "db_mode", 0) anyway. Set this parameter to 0 to disable checking of remote contact for SUBSCRIBE dialog matching. - Default value is "1". + Default value is “1”. - Example 1.11. Set check_remote_contact parameter + Example 1.12. Set check_remote_contact parameter ... modparam("pua", "check_remote_contact", 0) ... -3.12. fetch_rows (integer) +3.13. fetch_rows (integer) Number of rows to be loaded in one step from database. Default value is 500. - Example 1.12. Set fetch_rows parameter + Example 1.13. Set fetch_rows parameter ... modparam("pua", "fetch_rows", 1000) ... @@ -350,7 +367,7 @@ modparam("pua", "fetch_rows", 1000) * 1 - if success. * -1 - if error. - Example 1.13. pua_update_contact usage + Example 1.14. pua_update_contact usage ... if(method=="NOTIFY") pua_update_contact(); diff --git a/modules/pua_dialoginfo/README b/modules/pua_dialoginfo/README index 9a674aa83..1b7d0e48d 100644 --- a/modules/pua_dialoginfo/README +++ b/modules/pua_dialoginfo/README @@ -19,9 +19,13 @@ Klaus Darilion IPCom - Copyright 2006 Voice Sistem SRL +Edited by + +Phil Lavin + + Copyright © 2006 Voice Sistem SRL - Copyright 2008 Klaus Darilion IPCom + Copyright © 2008 Klaus Darilion IPCom __________________________________________________________________ Table of Contents @@ -49,6 +53,7 @@ Klaus Darilion 5.9. pubruri_callee_avp (int) 5.10. pubruri_caller_dlg_var (str) 5.11. pubruri_callee_dlg_var (int) + 5.12. callee_trying (int) 6. Functions @@ -65,6 +70,7 @@ Klaus Darilion 1.9. Set pubruri_callee_avp parameter 1.10. Set pubruri_caller_avp parameter 1.11. Set pubruri_callee_dlg_var parameter + 1.12. Set callee_trying parameter Chapter 1. Admin Guide @@ -91,6 +97,7 @@ Chapter 1. Admin Guide 5.9. pubruri_callee_avp (int) 5.10. pubruri_caller_dlg_var (str) 5.11. pubruri_callee_dlg_var (int) + 5.12. callee_trying (int) 6. Functions @@ -270,13 +277,14 @@ Chapter 1. Admin Guide 5.9. pubruri_callee_avp (int) 5.10. pubruri_caller_dlg_var (str) 5.11. pubruri_callee_dlg_var (int) + 5.12. callee_trying (int) 5.1. include_callid (int) If this parameter is set, the optional call-id will be put into the dialog element. This is needed for call-pickup features. - Default value is "1". + Default value is “1”. Example 1.1. Set include_callid parameter ... @@ -288,7 +296,7 @@ modparam("pua_dialoginfo", "include_callid", 0) If this parameter is set, the local and remote tag will be put into the dialog element. This is needed for call-pickup features. - Default value is "1". + Default value is “1”. Example 1.2. Set include_tags parameter ... @@ -301,7 +309,7 @@ modparam("pua_dialoginfo", "include_tags", 0) be put into the dialog element. This is needed for call-pickup features. - Default value is "1". + Default value is “1”. Example 1.3. Set include_localremote parameter ... @@ -317,7 +325,7 @@ modparam("pua_dialoginfo", "include_localremote", 0) dialog module. If used, the value should at least be a few seconds more than the fr_inv_timer of the tm module. - Default value is "0". + Default value is “0”. Example 1.4. Set override_lifetime parameter ... @@ -336,7 +344,7 @@ modparam("pua_dialoginfo", "override_lifetime", 300) the buggy Linksys SPA962 phones. SNOM phones work well with the default setting. - Default value is "0". + Default value is “0”. Example 1.5. Set caller_confirmed parameter ... @@ -349,7 +357,7 @@ modparam("pua_dialoginfo", "caller_confirmed", 1) not set, PUBLISH requests are sent out only if their R-URI is local (according to myself). - Default value is "-1". + Default value is “-1”. Example 1.6. Set send_publish_flag parameter ... @@ -361,7 +369,7 @@ modparam("pua_dialoginfo", "send_publish_flag", 8) Get Publish R-Uri from avps (see corresponding avp params), not from reqeust to/from uri. - Default value is "0". + Default value is “0”. Example 1.7. Set use_pubruri_avps parameter ... @@ -377,7 +385,7 @@ modparam("pua_dialoginfo", "use_pubruri_avps", 1) corresponding PUBLISH-request is generated. If no AVP with the specified name exists, no caller-related PUBLISH requests are sent. - Default value is "NULL". + Default value is “NULL”. Example 1.8. Set pubruri_caller_avp parameter ... @@ -393,7 +401,7 @@ modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)") corresponding PUBLISH-request is generated. If no AVP with the specified name exists, no callee-related PUBLISH requests are sent. - Default value is "NULL". + Default value is “NULL”. Example 1.9. Set pubruri_callee_avp parameter ... @@ -407,7 +415,7 @@ modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(s:puburis_callee)") value after Kamailio restart. If not set, loaded dialogs at restart are no longer sending notifications. New dialogs are working fine. - Default value is "NULL". + Default value is “NULL”. Example 1.10. Set pubruri_caller_avp parameter ... @@ -421,11 +429,23 @@ modparam("pua_dialoginfo", "pubruri_caller_dlg_var", "pubruri_caller") value after Kamailio restart. If not set, loaded dialogs at restart are no longer sending notifications. New dialogs are working fine. - Default value is "NULL". + Default value is “NULL”. Example 1.11. Set pubruri_callee_dlg_var parameter ... modparam("pua_dialoginfo", "pubruri_callee_dlg_var", "pubruri_callee") ... +5.12. callee_trying (int) + + If this parameter is set, a "Trying" state will be sent for both the + caller and callee, rather than just the caller. + + Default value is “0”. + + Example 1.12. Set callee_trying parameter +... +modparam("pua_dialoginfo", "callee_trying", 1) +... + 6. Functions diff --git a/modules/pua_dialoginfo/dialog_publish.c b/modules/pua_dialoginfo/dialog_publish.c index 54655f6cf..6a738dc73 100644 --- a/modules/pua_dialoginfo/dialog_publish.c +++ b/modules/pua_dialoginfo/dialog_publish.c @@ -383,7 +383,7 @@ void dialog_publish_multi(char *state, struct str_list* ruris, str *entity, str str *localtarget, str *remotetarget, unsigned short do_pubruri_localcheck) { while(ruris) { - LM_INFO("CALLING dialog_publish for URI %.*s\n",ruris->s.len, ruris->s.s); + LM_DBG("CALLING dialog_publish for URI %.*s\n",ruris->s.len, ruris->s.s); dialog_publish(state,&(ruris->s),entity,peer,callid,initiator,lifetime,localtag,remotetag,localtarget,remotetarget,do_pubruri_localcheck); ruris=ruris->next; } diff --git a/modules/pua_mi/README b/modules/pua_mi/README index 6218ac4d8..997da88be 100644 --- a/modules/pua_mi/README +++ b/modules/pua_mi/README @@ -12,7 +12,7 @@ Edited by Juha Heinanen - Copyright (c) 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -93,7 +93,7 @@ Chapter 1. Admin Guide If 1, pua_publish MI command has outbound proxy parameter. - Default value is "0". + Default value is “0”. Example 1.1. Set publish_with_ob_proxy parameter ... diff --git a/modules/pua_reginfo/README b/modules/pua_reginfo/README index 0b5709f6f..49a7fbcfe 100644 --- a/modules/pua_reginfo/README +++ b/modules/pua_reginfo/README @@ -10,7 +10,7 @@ Carsten Bock - Copyright 2011 Carsten Bock, carsten@ng-voice.com, + Copyright © 2011 Carsten Bock, carsten@ng-voice.com, http://www.ng-voice.com __________________________________________________________________ @@ -121,7 +121,7 @@ Chapter 1. Admin Guide The default domain for the registered users to be used when constructing the uri for the registrar callback. - Default value is "NULL". + Default value is “NULL”. Example 1.1. Set default_domain parameter ... @@ -132,7 +132,7 @@ modparam("pua_reginfo", "default_domain", "kamailio.org") Whether or not to generate PUBLISH requests. - Default value is "1" (enabled). + Default value is “1” (enabled). Example 1.2. Set publish_reginfo parameter ... @@ -143,7 +143,7 @@ modparam("pua_reginfo", "publish_reginfo", 0) The outbound_proxy uri to be used when sending Subscribe requests. - Default value is "NULL". + Default value is “NULL”. Example 1.3. Set outbound_proxy parameter ... @@ -164,7 +164,7 @@ modparam("pua_reginfo", "server_address", "sip:reginfo@160.34.23.12") 4.1. reginfo_handle_notify(uldomain) 4.2. reginfo_subscribe(uri[, expires]) -4.1. reginfo_handle_notify(uldomain) +4.1. reginfo_handle_notify(uldomain) This function processes received "NOTIFY"-requests and updates the local registry accordingly. @@ -188,7 +188,7 @@ if(is_method("NOTIFY")) send_reply("202", "Accepted"); ... -4.2. reginfo_subscribe(uri[, expires]) +4.2. reginfo_subscribe(uri[, expires]) This function will subscribe for reginfo-information at the given server URI. diff --git a/modules/pua_usrloc/README b/modules/pua_usrloc/README index 942f2dd6a..ae48c7390 100644 --- a/modules/pua_usrloc/README +++ b/modules/pua_usrloc/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -98,7 +98,7 @@ Chapter 1. Admin Guide The default domain to use when constructing the presentity URI if it is missing from stored AOR in the usrloc table (in memory or database). - Default value is "NULL". + Default value is “NULL”. Example 1.1. Set default_domain parameter ... @@ -110,7 +110,7 @@ modparam("pua_usrloc", "default_domain", "kamailio.org") The prefix used when constructing the entity attribute to be added to a presence node in the XML PIDF document. (ex: pres:user@domain ). - Default value is "NULL". + Default value is “NULL”. Example 1.2. Set presentity_prefix parameter ... @@ -122,7 +122,7 @@ modparam("pua_usrloc", "entity_prefix", "pres") Which branch flag to be used to select the contact addresses for which to generate PUBLISH. Valid values are 0 to 31. - Default value is "-1" (disabled). + Default value is “-1” (disabled). Example 1.3. Set branch_flag parameter ... diff --git a/modules/pua_xmpp/README b/modules/pua_xmpp/README index 357764b5c..6517991a8 100644 --- a/modules/pua_xmpp/README +++ b/modules/pua_xmpp/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright 2007 Voice Sistem SRL + Copyright © 2007 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -106,7 +106,7 @@ modparam("pua_xmpp", "server_address", "sip:160.23.23.10") Functions exported to be used in configuration file. -4.1. pua_xmpp_notify() +4.1. pua_xmpp_notify() Function that handles Notify messages addressed to a user from an xmpp domain. It requires filtering after method and domain in configuration @@ -124,7 +124,7 @@ modparam("pua_xmpp", "server_address", "sip:160.23.23.10") } ... -4.2. pua_xmpp_req_winfo(request_uri, expires) +4.2. pua_xmpp_req_winfo(request_uri, expires) Function called when a Subscribe addressed to a user from a xmpp domain is received. It calls sending a Subscribe for winfo for the user, and diff --git a/modules/pua_xmpp/xmpp2simple.c b/modules/pua_xmpp/xmpp2simple.c index dffa2d03f..d5d43f268 100644 --- a/modules/pua_xmpp/xmpp2simple.c +++ b/modules/pua_xmpp/xmpp2simple.c @@ -374,7 +374,7 @@ int build_publish(xmlNodePtr pres_node, int expires) return -1; } strcpy(resource, slash+1); - slash= '\0'; + slash= NULL; } pres_uri= euri_xmpp_sip(uri); xmlFree(uri); diff --git a/modules/purple/README b/modules/purple/README index eea0de54e..41c82304a 100644 --- a/modules/purple/README +++ b/modules/purple/README @@ -77,6 +77,9 @@ Chapter 1. Admin Guide 1. Overview + Note: the module is not actively maintained and may be deprecated in + the near future. + Purple module is a multi-protocol instant-messaging gateway module which use libpurple, the library that Pidgin (ex-gaim) is based on. @@ -178,7 +181,7 @@ CREATE TABLE purplemap ( The URL to connect to database. - Default value is “mysql://openserro:openserro@localhost/openser”. + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 1.4. Set db_url parameter ... diff --git a/modules/purple/doc/purple_admin.xml b/modules/purple/doc/purple_admin.xml index 972094217..be37a1314 100644 --- a/modules/purple/doc/purple_admin.xml +++ b/modules/purple/doc/purple_admin.xml @@ -10,14 +10,18 @@ - + &adminguide; - +
Overview + + Note: the module is not actively maintained and may be deprecated + in the near future. + Purple module is a multi-protocol instant-messaging gateway module - which use libpurple, the library that Pidgin + which use libpurple, the library that Pidgin (ex-gaim) is based on. diff --git a/modules/pv/README b/modules/pv/README index 7c78e962f..91286c257 100644 --- a/modules/pv/README +++ b/modules/pv/README @@ -11,11 +11,11 @@ Daniel-Constantin Mierla - Copyright (c) 2008-2011 Daniel-Constantin Mierla (asipto.com) + Copyright © 2008-2011 Daniel-Constantin Mierla (asipto.com) - Copyright (c) 2011 Juha Heinanen + Copyright © 2011 Juha Heinanen - Copyright (c) 2013 Olle E. Johansson, Edvina AB + Copyright © 2013 Olle E. Johansson, Edvina AB __________________________________________________________________ Table of Contents @@ -157,11 +157,11 @@ Chapter 1. Admin Guide _value_ * _name_: shared variable name * _type_: type of the value - + "i": integer value - + "s": string value + + “i”: integer value + + “s”: string value * _value_: value to be set - Default value is "NULL". + Default value is “NULL”. Example 1.1. shvset parameter usage ... @@ -178,11 +178,11 @@ modparam("pv", "shvset", "pstngw=s:sip:10.10.10.10") _value_ * _name_: shared variable name * _type_: type of the value - + "i": integer value - + "s": string value + + “i”: integer value + + “s”: string value * _value_: value to be set - Default value is "NULL". + Default value is “NULL”. Example 1.2. varset parameter usage ... @@ -427,8 +427,8 @@ $var("foo") now is "foo indeed" Parameters: * _name_: shared variable name * _type_: type of the value - + "int": integer value - + "str": string value + + “int”: integer value + + “str”: string value * _value_: value to be set MI FIFO Command Format: @@ -474,8 +474,8 @@ $ kamctl fifo shv_get Parameters: * _name_: shared variable name * _type_: type of the value - + "int": integer value - + "str": string value + + “int”: integer value + + “str”: string value * _value_: value to be set 6.2. pv.shvGet diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c index d2ffa0980..5836e2328 100644 --- a/modules/pv/pv_core.c +++ b/modules/pv/pv_core.c @@ -1519,7 +1519,7 @@ int pv_get_avp(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { res->rs = avp_value.s; } else { - res->rs.s = int2str(avp_value.n, &res->rs.len); + res->rs.s = sint2str(avp_value.n, &res->rs.len); res->ri = avp_value.n; res->flags |= PV_VAL_INT|PV_TYPE_INT; } @@ -1545,7 +1545,7 @@ int pv_get_avp(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { res->rs = avp_value.s; } else { - res->rs.s = int2str(avp_value.n, &res->rs.len); + res->rs.s = sint2str(avp_value.n, &res->rs.len); } if(p-p_ini+res->rs.len+1>p_size) @@ -1580,7 +1580,7 @@ int pv_get_avp(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { res->rs = avp_value.s; } else { - res->rs.s = int2str(avp_value.n, &res->rs.len); + res->rs.s = sint2str(avp_value.n, &res->rs.len); res->ri = avp_value.n; res->flags |= PV_VAL_INT|PV_TYPE_INT; } @@ -1598,7 +1598,7 @@ int pv_get_avp(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { res->rs = avp_value.s; } else { - res->rs.s = int2str(avp_value.n, &res->rs.len); + res->rs.s = sint2str(avp_value.n, &res->rs.len); res->ri = avp_value.n; res->flags |= PV_VAL_INT|PV_TYPE_INT; } diff --git a/modules/qos/README b/modules/qos/README index 563edd73e..96fc6183f 100644 --- a/modules/qos/README +++ b/modules/qos/README @@ -8,7 +8,7 @@ Edited by Ovidiu Sas - Copyright 2008 SOMA Networks, Inc. + Copyright © 2008 SOMA Networks, Inc. __________________________________________________________________ Table of Contents @@ -127,7 +127,7 @@ Chapter 1. Admin Guide This parameter must be set or the module will not load. - Default value is "Not set!". + Default value is “Not set!”. Example 1.1. Set qos_flag parameter ... @@ -176,7 +176,7 @@ Chapter 2. Developer Guide 1.1. register_qoscb (qos, type, cb, param) -1.1. register_qoscb (qos, type, cb, param) +1.1. register_qoscb (qos, type, cb, param) Register a new callback to the qos. @@ -195,7 +195,7 @@ Chapter 2. Developer Guide + QOSCB_REMOVE_SDP - called when an existing SDP is removed - it's a per qos type. + QOSCB_TERMINATED - called when the qos is terminated. - * qos_cb cb - callback function to be called. Prototype is: "void + * qos_cb cb - callback function to be called. Prototype is: “void (qos_cb) (struct qos_ctx_st *qos, int type, struct qos_cb_params - *params); " + *params); ” * void *param - parameter to be passed to the callback function. diff --git a/modules/ratelimit/README b/modules/ratelimit/README index fe4ee8865..8a3e10d10 100644 --- a/modules/ratelimit/README +++ b/modules/ratelimit/README @@ -18,9 +18,9 @@ Edited by Hendrik Scholz - Copyright 2006 Freenet Cityline GmbH + Copyright © 2006 Freenet Cityline GmbH - Copyright 2008-2010 VoIP Embedded Inc. + Copyright © 2008-2010 VoIP Embedded Inc. __________________________________________________________________ Table of Contents @@ -131,7 +131,7 @@ Chapter 1. Admin Guide associated with its own queue and a number of queues are connected to a certain pipe (see the queue and pipe params). - Please also take a look at the "pipelimit" module, that implements the + Please also take a look at the “pipelimit” module, that implements the pipe policy with database support. Note that it doesn't implement the queues that exist in this module. @@ -280,7 +280,7 @@ modparam("ratelimit", "timer_interval", 5) The format of the queue parameter is "pipe_no:method". For each defined method, the algorithm defined by pipe number "pipe_no" will be used. - To specify a queue that accepts all methods, use "*" instead of METHOD. + To specify a queue that accepts all methods, use “*” instead of METHOD. As queues are matched against request methods, you will usually want to have this as the last queue added or other queues with specific methods will never match. At this time, glob or regexp patterns are not @@ -327,7 +327,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") 6.1. rl_check([pvar]) 6.2. rl_check_pipe([pipe_no]) -6.1. rl_check([pvar]) +6.1. rl_check([pvar]) Check the current request against the matched ratelimit algorithm. If no parameter is provided, the queue will be matched based on method @@ -374,7 +374,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") }; ... -6.2. rl_check_pipe([pipe_no]) +6.2. rl_check_pipe([pipe_no]) Check the current request against the matched ratelimit algorithm. If no parameter is provided, the queue will be matched based on method @@ -419,7 +419,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") 7.8. rl.push_load 7.9. rl.set_dbg -7.1. rl.stats +7.1. rl.stats Lists the parameters and variables in the ratelimit module. @@ -430,7 +430,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.stats -7.2. rl.set_pipe +7.2. rl.set_pipe Sets the pipe parameters for the given pipe id. @@ -444,7 +444,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.set_pipe 2 RED 10 -7.3. rl.get_pipes +7.3. rl.get_pipes Gets the list of in use pipes. @@ -455,7 +455,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.get_pipes -7.4. rl.set_queue +7.4. rl.set_queue Sets the queue parameters for the given queue id. @@ -469,7 +469,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.set_queue 3 INVITE 2 -7.5. rl.get_queues +7.5. rl.get_queues Gets the list of in use queues. @@ -480,7 +480,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.get_queues -7.6. rl.set_pid +7.6. rl.set_pid Sets the PID Controller parameters for the Feedback Algorithm. @@ -494,7 +494,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.set_pid 0.5 0.5 0.5 -7.7. rl.get_pid +7.7. rl.get_pid Gets the list of in use PID Controller parameters. @@ -505,7 +505,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.get_pid -7.8. rl.push_load +7.8. rl.push_load Force the value of the load parameter. This method is useful for testing the Feedback algorithm. @@ -519,7 +519,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.push_load 0.85 -7.9. rl.set_dbg +7.9. rl.set_dbg This function will enable/disable a WARNING debug log exposing the internal counters for each pipe (useful in monitoring the ratelimit diff --git a/modules/regex/README b/modules/regex/README index 941b43238..049499ce0 100644 --- a/modules/regex/README +++ b/modules/regex/README @@ -1,16 +1,16 @@ Regex Module -Iaki Baz Castillo +Iñaki Baz Castillo Edited by -Iaki Baz Castillo +Iñaki Baz Castillo - Copyright 2009 Iaki Baz Castillo + Copyright © 2009 Iñaki Baz Castillo __________________________________________________________________ Table of Contents @@ -142,7 +142,7 @@ Chapter 1. Admin Guide Text file containing the regular expression groups. It must be set in order to enable the group matching function. - Default value is "NULL". + Default value is “NULL”. Example 1.1. Set file parameter ... @@ -153,7 +153,7 @@ modparam("regex", "file", "/etc/kamailio/regex_groups") Max number of regular expression groups in the text file. - Default value is "20". + Default value is “20”. Example 1.2. Set max_groups parameter ... @@ -164,7 +164,7 @@ modparam("regex", "max_groups", 40) Max content size of a group in the text file. - Default value is "8192". + Default value is “8192”. Example 1.3. Set group_max_size parameter ... @@ -177,7 +177,7 @@ modparam("regex", "group_max_size", 16384) Perl's /i option, and it can be changed within a pattern by a (?i) or (?-i) option setting. - Default value is "0". + Default value is “0”. Example 1.4. Set pcre_caseless parameter ... @@ -200,7 +200,7 @@ modparam("regex", "pcre_caseless", 1) are no newlines in a subject string, or no occurrences of ^ or $ in a pattern, setting this option has no effect. - Default value is "0". + Default value is “0”. Example 1.5. Set pcre_multiline parameter ... @@ -215,7 +215,7 @@ modparam("regex", "pcre_multiline", 1) is equivalent to Perl's /s option, and it can be changed within a pattern by a (?s) or (?-s) option setting. - Default value is "0". + Default value is “0”. Example 1.6. Set pcre_dotall parameter ... @@ -232,7 +232,7 @@ modparam("regex", "pcre_dotall", 1) /x option, and it can be changed within a pattern by a (?x) or (?-x) option setting. - Default value is "0". + Default value is “0”. Example 1.7. Set pcre_extended parameter ... @@ -244,7 +244,7 @@ modparam("regex", "pcre_extended", 1) 4.1. pcre_match (string, pcre_regex) 4.2. pcre_match_group (string [, group]) -4.1. pcre_match (string, pcre_regex) +4.1. pcre_match (string, pcre_regex) Matches the given string parameter against the regular expression pcre_regex, which is compiled in runtime into a PCRE object. Returns @@ -261,24 +261,24 @@ modparam("regex", "pcre_extended", 1) This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. - Example 1.8. pcre_match usage (forcing case insensitive) + Example 1.8. pcre_match usage (forcing case insensitive) ... if (pcre_match("$ua", "(?i)^twinkle")) { xlog("L_INFO", "User-Agent matches\n"); } ... - Example 1.9. pcre_match usage (using "end of line" symbol) + Example 1.9. pcre_match usage (using "end of line" symbol) ... if (pcre_match("$rU", "^user[1234]$$")) { # Will be converted to "^user[1234]$" xlog("L_INFO", "RURI username matches\n"); } ... -4.2. pcre_match_group (string [, group]) +4.2. pcre_match_group (string [, group]) Tries to match the given string against a specific group in the text - file (see Section 6.1, "File format"). Returns TRUE if it matches, + file (see Section 6.1, “File format”). Returns TRUE if it matches, FALSE otherwise. Meaning of the parameters is as follows: @@ -290,14 +290,15 @@ if (pcre_match("$rU", "^user[1234]$$")) { # Will be converted to "^user[1234]$" This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. - Example 1.10. pcre_match_group usage + Example 1.10. pcre_match_group usage ... if (pcre_match_group("$rU", "2")) { xlog("L_INFO", "RURI username matches group 2\n"); } ... - Example 1.11. pcre_match_group usage (using a pseudo-variable as group) + Example 1.11. pcre_match_group usage (using a pseudo-variable as + group) ... $avp(i:10) = 5; # Maybe got from a DB query. if (pcre_match_group("$ua", "$avp(i:10)")) { @@ -309,7 +310,7 @@ if (pcre_match_group("$ua", "$avp(i:10)")) { 5.1. regex_reload -5.1. regex_reload +5.1. regex_reload Causes regex module to re-read the content of the text file and re-compile the regular expressions. The number of groups in the file diff --git a/modules/registrar/README b/modules/registrar/README index 3023d399a..49df0f8cf 100644 --- a/modules/registrar/README +++ b/modules/registrar/README @@ -20,7 +20,7 @@ Edited by Bogdan-Andre Iancu - Copyright (c) 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -231,8 +231,8 @@ Chapter 1. Admin Guide * off - stores the value of the Path headers into usrloc without passing it back to the UAC in the reply. * lazy - stores the Path header and passes it back to the UAC if - Path-support is indicated by the "path" param in the Supported HF. - * strict - rejects the registration with "420 Bad Extension" if + Path-support is indicated by the “path” param in the Supported HF. + * strict - rejects the registration with “420 Bad Extension” if there's a Path header but no support for it is indicated by the UAC. Otherwise it's stored and passed back to the UAC. @@ -244,8 +244,8 @@ Chapter 1. Admin Guide client's NAT). The whole process is transparent to the user, so no config changes are - required beside setting the registrar-parameters "use_path" and - "path_mode". + required beside setting the registrar-parameters “use_path” and + “path_mode”. 1.2. GRUU Support @@ -312,7 +312,7 @@ Chapter 1. Admin Guide contact parameters, this value will be used for newly created usrloc records. The parameter contains number of second to expire (for example use 3600 for one hour). If it is set to a lower value than the - "min_expires" parameter then it will be ignored. This parameter can be + “min_expires” parameter then it will be ignored. This parameter can be modified via ser config framework. A random value in a specific interval can be selected by using the default_expires_range parameter @@ -327,7 +327,7 @@ modparam("registrar", "default_expires", 1800) This parameter specifies that the expiry used for newly created usrloc records are not fixed, but a random value in the interval - "[default_expires-default_expires_range%, default_expires]". The value + “[default_expires-default_expires_range%, default_expires]”. The value is between 0 and 100 and represent the maximim percentage from expires that will be substracted when computing the value. Default is 0, meaning default_expires is left unmodified. This parameter can be @@ -356,7 +356,7 @@ res] 3.4. min_expires (integer) - The minimum expires value of a "Contact". Values lower than this + The minimum expires value of a “Contact”. Values lower than this minimum will be automatically set to the minimum. Value 0 disables the checking. This parameter can be modified via the Kamailio config framework. @@ -370,7 +370,7 @@ modparam("registrar", "min_expires", 60) 3.5. max_expires (integer) - The maximum accepted expires value of a "Contact", values higher than + The maximum accepted expires value of a “Contact”, values higher than this maximum will be automatically set to the maximum. Value 0 disables the checking. This parameter can be modified via the Kamailio config framework. @@ -384,7 +384,7 @@ modparam("registrar", "max_expires", 120) 3.6. default_q (integer) - The parameter represents default "q" value for new contacts. Because + The parameter represents default “q” value for new contacts. Because Kamailio doesn't support float parameter types, the value in the parameter is divided by 1000 and stored as float. For example, if you want default_q to be 0.38, use value 380 here. This parameter can be @@ -474,7 +474,7 @@ modparam("registrar", "received_avp", "$avp(s:rcv)") 3.12. received_param (string) The name of the parameter that will be appended to Contact URI's of 200 - OK when the received URI was set by the "nathelper" module. If the + OK when the received URI was set by the “nathelper” module. If the value is an empty string, then the parameter is not appended anymore. Default value is "received". @@ -557,7 +557,7 @@ modparam("registrar", "sock_hdr_name", "Sock-Info") Tells if the contact filtering based on supported methods should be performed during lookup. It's enabled only if it has a non zero value. - Supported methods are listed in the "Allow:" header in the REGISTER + Supported methods are listed in the “Allow:” header in the REGISTER message and stored in the location database. Default value is 0 (disabled). @@ -569,9 +569,9 @@ modparam("registrar", "method_filtering", 1) 3.18. use_path (integer) - If set to 1, the "Path:" header is handled according to the parameter + If set to 1, the “Path:” header is handled according to the parameter This parameter can be modified via Kamailio config framework. - "path_mode". + “path_mode”. Default value is 0 (disabled). @@ -588,12 +588,12 @@ modparam("registrar", "use_path", 1) the reply. * 1 - The Path header is saved into usrloc, but is only included in the reply if path support is indicated in the registration request - by the "path" option in the "Supported:" header. + by the “path” option in the “Supported:” header. * 2 - The path header is only saved into usrloc, if path support is - indicated in the registration request by the "path" option of the - "Supported" header. If no path support is indicated, the request is - rejected with "420 - Bad Extension" and the header "Unsupported: - path" is included in the reply along with the received "Path" + indicated in the registration request by the “path” option of the + “Supported” header. If no path support is indicated, the request is + rejected with “420 - Bad Extension” and the header “Unsupported: + path” is included in the reply along with the received “Path” header. This mode is the one recommended by RFC-3327. Default value is 2. @@ -605,10 +605,10 @@ modparam("registrar", "path_mode", 0) 3.20. path_use_received (integer) - If set to 1, the "received" parameter of the first Path URI of a + If set to 1, the “received” parameter of the first Path URI of a registration is set as received-uri and the NAT branch flag is set for this contact. This is useful if the registrar is placed behind a SIP - loadbalancer, which passes the nat'ed UAC address as "received" + loadbalancer, which passes the nat'ed UAC address as “received” parameter in it's Path uri. Default value is 0 (disabled). @@ -621,7 +621,7 @@ modparam("registrar", "path_use_received", 1) 3.21. path_check_local (integer) If set to 1, when performing a lookup the Path (if present) is - evaluated and if the first hop is local (according to "myself" test), + evaluated and if the first hop is local (according to “myself” test), we skip it to avoid unnecessary looping. This is useful if multiple servers are sharing a common location @@ -696,7 +696,7 @@ modparam("registrar", "xavp_rcd", "ulrcd") 3.25. gruu_enabled (integer) - If set to 1 and the "+sip.instance" parameter to Contact header of + If set to 1 and the “+sip.instance” parameter to Contact header of REGISTER is present, then the value of the parameter is saved to location and pub-gruu and temp-gruu addresses are generated. @@ -712,21 +712,21 @@ modparam("registrar", "gruu_enabled", 0) 3.26. outbound_mode (integer) If set to 0 this module will accept REGISTER requests that do not - contain a "Supported:" header with the outbound options-tag. The 200 OK + contain a “Supported:” header with the outbound options-tag. The 200 OK response to REGISTER requests that this module generates will not - contain "Require:" or "Supported:" headers with the outbound - options-tag. If the client has a "Require:" header with the outbound - options tag the REGISTER will be rejected with a "420 Bad Extension" + contain “Require:” or “Supported:” headers with the outbound + options-tag. If the client has a “Require:” header with the outbound + options tag the REGISTER will be rejected with a “420 Bad Extension” response. If set to 1 this module will accept REGISTER requests that do not - contain a "Supported:" header with the outbound options-tag and + contain a “Supported:” header with the outbound options-tag and REGISTER requests that do contain a Supported: or Requires: header with the outbound options-tag. When the client supports outbound the appropriate RFC5626 procedures will be followed. If set to 2 this module will reject REGISTER requests that do not - contain a "Supported:" header with the outbound options-tag. When the + contain a “Supported:” header with the outbound options-tag. When the client supports outbound the appropriate RFC5626 procedures will be followed. @@ -739,11 +739,11 @@ modparam("registrar", "outbound_mode", 2) 3.27. regid_mode (integer) - If set to 0 this module will ignore the "regid" contact param when + If set to 0 this module will ignore the “regid” contact param when saving REGISTER request if the request does not indicate support for outbound. - If set to 1 this module will use "regid" contact param (if present) + If set to 1 this module will use “regid” contact param (if present) when saving REGISTER request even if REGISTER request does not indicate support for outbound. @@ -756,10 +756,10 @@ modparam("registrar", "regid_mode", 1) 3.28. flow_timer (integer) - If set to 0 then this module will not add a "Flow-Timer:" header to 200 + If set to 0 then this module will not add a “Flow-Timer:” header to 200 OK responses to REGISTER requests. - If set to > 0 then this module will add a "Flow-Timer:" header + If set to > 0 then this module will add a “Flow-Timer:” header containing this value to 200 OK responses to REGISTER requests. This parameter may only be set to a value > 0 when outbound_mode is set to 1 or 2. @@ -771,7 +771,7 @@ modparam("registrar", "regid_mode", 1) useful when you have a single edge proxy/registrar or if you have an edge proxy that cannot modify responses. If you are using a separate edge proxy you should consider leaving this parameter set to 0 and - adding the "Flow-Timer:" header on the edge proxy as this allows you to + adding the “Flow-Timer:” header on the edge proxy as this allows you to keep all of the timer values for a specific flow in one configuration. Default value is 0. @@ -797,7 +797,7 @@ modparam("registrar", "flow_timer", 25) The function processes a REGISTER message. It can add, remove or modify location records (in usrloc) depending on Contact and Expires HFs in the REGISTER message. On success and when called from the - REQUEST_ROUTE, "200 OK" will be returned listing all contacts that are + REQUEST_ROUTE, “200 OK” will be returned listing all contacts that are currently in the location database. On an error, an error message will be sent with a short description in reason phrase. @@ -935,7 +935,7 @@ if (registered("location","$rz:$Au", 2)) { 4.5. add_sock_hdr(hdr_name) - Adds a new header to the current REGISTER request with "hdr_name" which + Adds a new header to the current REGISTER request with “hdr_name” which contains the description of the received socket (proto:ip:port) This makes sense only in multiple replicated servers scenarios. @@ -955,7 +955,7 @@ add_sock_hdr("Sock-Info"); The function removes contacts associated with 'uri' from the location database. If 'ruid' is provided a specific contact is removed, if 'ruid' is not provided all the current contacts are removed. If 'ruid' - is provided and the "usrloc" module is using "db_mode=3", 'uri' does + is provided and the “usrloc” module is using “db_mode=3”, 'uri' does not need to be given and can be empty string. Meaning of the parameters is as follows: @@ -1068,12 +1068,12 @@ event_route[usrloc:contact-expired] { 7.1. $ulc(profile=>attr) Access the attributes of contact addresses stored in 'profile'. It must - be used after a call of "reg_fetch_contacts()". + be used after a call of “reg_fetch_contacts()”. - The "profile" has to be one of the values used with - "reg_fetch_contacts()". + The “profile” has to be one of the values used with + “reg_fetch_contacts()”. - The "attr" can be: + The “attr” can be: * aor - address of record * domain - use location domain name * aorhash - hash id for the record @@ -1131,9 +1131,9 @@ if(reg_fetch_contacts("location", "$fu", "caller")) Chapter 2. Frequently Asked Questions - 2.1. What happend with the old "nat_flag" module parameter? - 2.2. What happend with the old "use_domain" module parameter? - 2.3. What happened with the old "save_noreply" and "save_memory" + 2.1. What happend with the old “nat_flag” module parameter? + 2.2. What happend with the old “use_domain” module parameter? + 2.3. What happened with the old “save_noreply” and “save_memory” functions? 2.4. Where can I find more about Kamailio? @@ -1143,60 +1143,60 @@ Chapter 2. Frequently Asked Questions 2.1. - What happend with the old "nat_flag" module parameter? + What happend with the old “nat_flag” module parameter? - In was removed, as the module internally loads this value from the - "USRLOC" module (see the "nat_bflag" USRLOC parameter). + In was removed, as the module internally loads this value from the + “USRLOC” module (see the “nat_bflag” USRLOC parameter). 2.2. - What happend with the old "use_domain" module parameter? + What happend with the old “use_domain” module parameter? - In was removed, as the module internally loads this option from the - "USRLOC" module. This was done in order to simplify the configuration. + In was removed, as the module internally loads this option from the + “USRLOC” module. This was done in order to simplify the configuration. 2.3. - What happened with the old "save_noreply" and "save_memory" functions? + What happened with the old “save_noreply” and “save_memory” functions? - There functions were merged into the new "save(domain,flags)" - functions. If a reply should be sent or if the DB should be updated - also is controlled via the flags. + There functions were merged into the new “save(domain,flags)” + functions. If a reply should be sent or if the DB should be updated + also is controlled via the flags. 2.4. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 2.5. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 2.6. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + https://github.com/kamailio/kamailio/issues. 2.7. - What happened to the desc_time_order parameter? + What happened to the desc_time_order parameter? - It was removed, as its functionality was migrated into usrloc module, - were there is a parameter with the same name. + It was removed, as its functionality was migrated into usrloc module, + were there is a parameter with the same name. diff --git a/modules/rls/README b/modules/rls/README index 62c9f9675..a90a2cdaa 100644 --- a/modules/rls/README +++ b/modules/rls/README @@ -223,7 +223,7 @@ Chapter 1. Admin Guide The database url. - Default value is “mysql://openser:openserrw@localhost/openser”. + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.1. Set db_url parameter ... diff --git a/modules/rr/README b/modules/rr/README index 7437b0a1f..6c01c9707 100644 --- a/modules/rr/README +++ b/modules/rr/README @@ -20,11 +20,11 @@ Edited by Bogdan-Andrei Iancu - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2011 Carsten Bock, carsten@ng-voice.com + Copyright © 2011 Carsten Bock, carsten@ng-voice.com __________________________________________________________________ Table of Contents @@ -166,8 +166,8 @@ Chapter 1. Admin Guide 3261 (see 12.1.1 UAS behavior). For this purpose, the modules offers the following functions: - * add_rr_param() - see Section 5.6, "add_rr_param(param)" - * check_route_param() - see Section 5.7, "check_route_param(re)" + * add_rr_param() - see Section 5.6, “add_rr_param(param)” + * check_route_param() - see Section 5.7, “check_route_param(re)” Example 1.1. Dialog support in RR module UAC Kamailio PROXY UAS @@ -212,9 +212,9 @@ UAC Kamailio PROXY UAS 4.1. enable_full_lr (integer) - If set to 1 then ";lr=on" instead of just ";lr" will be used. This is - to overcome problems with broken UAs which strip ";lr" parameter when - generating Route header fields from Record-Route (";lr=on" seems to + If set to 1 then “;lr=on” instead of just “;lr” will be used. This is + to overcome problems with broken UAs which strip “;lr” parameter when + generating Route header fields from Record-Route (“;lr=on” seems to help). Default value is 0 (no). @@ -277,7 +277,7 @@ modparam("rr", "enable_double_rr", 2) If set to a non 0 value (which means yes), the username part will be also added in the Record-Route URI. - This option cannot be set when the "outbound" module is loaded before + This option cannot be set when the “outbound” module is loaded before this module as outbound uses the username part of Record-Route URIs to store flow-tokens. @@ -339,11 +339,11 @@ record_route(); The function performs routing of SIP requests which contain a route set. The name is a little bit confusing, as this function also routes - requests which are in the "strict router" format. + requests which are in the “strict router” format. This function is usually used to route in-dialog requests (like ACK, BYE, reINVITE). Nevertheless also out-of-dialog requests can have a - "pre-loaded route set" and my be routed with loose_route. It also takes + “pre-loaded route set” and my be routed with loose_route. It also takes care of translating between strict-routers and loose-router. The loose_route function analyzes the Route: headers in the requests. @@ -355,7 +355,7 @@ record_route(); indicating the local proxy, then the Route: header is removed and the function returns FALSE. - When the "outbound" module was loaded before this module and the Route: + When the “outbound” module was loaded before this module and the Route: header contains a username part this function will attempt to use the username part as a flow-token for routing. If route calculation based on flow-token succeeds, function returns TRUE even if there is only one @@ -365,7 +365,7 @@ record_route(); bypass proxy authorization. The loose_routing topic is very complex. See the RFC3261 for more - details (grep for "route set" is a good starting point in this + details (grep for “route set” is a good starting point in this comprehensive RFC). Return codes: @@ -389,9 +389,9 @@ loose_route(); If any string is passed as parameter, it will be appended as URI parameter to the Record-Route header. The string must follow the - ";name=value" scheme and it may contain pseudo-variables. + “;name=value” scheme and it may contain pseudo-variables. - When the "outbound" module was loaded before this module this function + When the “outbound” module was loaded before this module this function will determine whether outbound is required for the request and generate and add a flow-token as the username part of the Record-Route-URI. @@ -433,7 +433,7 @@ remove_record_route(); the outbound interface and the 'string2' param is pointing to the inbound interface. - When the "outbound" module was loaded before this module this function + When the “outbound” module was loaded before this module this function will determine whether outbound is required for the request and generate and add a flow-token as the username part of the Record-Route-URI. @@ -452,7 +452,7 @@ record_route_preset("1.2.3.4:5090"); given. The header field will be inserted in the message before any other Record-Route header fields. - When the "outbound" module was loaded before this module this function + When the “outbound” module was loaded before this module this function will determine whether outbound is required for the request and generate and add a flow-token as the username part of the Record-Route-URI. @@ -476,14 +476,14 @@ record_route_advertised_address("1.2.3.4:5080"); 5.6. add_rr_param(param) Adds a parameter to the Record-Route URI (param must be in - ";name=value" format. The function may be called also before or after + “;name=value” format. The function may be called also before or after the record_route() or record_route_advertised_address() calls (see - Section 5.2, "record_route() and record_route(string)" or Section 5.5, - "record_route_advertised_address(address)")). + Section 5.2, “record_route() and record_route(string)” or Section 5.5, + “record_route_advertised_address(address)”)). Meaning of the parameters is as follows: * param - String containing the URI parameter to be added. It must - follow the ";name=value" scheme; it may contain pseudo-variables. + follow the “;name=value” scheme; it may contain pseudo-variables. This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and FAILURE_ROUTE. @@ -498,7 +498,7 @@ add_rr_param(";nat=yes"); The function checks if the URI parameters of the local Route header (corresponding to the local server) matches the given regular expression. It must be call after loose_route() (see Section 5.1, - "loose_route()"). + “loose_route()”). Meaning of the parameters is as follows: * re - regular expression to check against the Route URI parameters. @@ -515,20 +515,20 @@ if (check_route_param("nat=yes")) { 5.8. is_direction(dir) The function checks the flow direction of in-dialog requests. This - function uses the "ftag" prameter from the Route header, therefore the - append_fromtag (see Section 4.2, "append_fromtag (integer)" module + function uses the “ftag” prameter from the Route header, therefore the + append_fromtag (see Section 4.2, “append_fromtag (integer)” module parameter must be enabled. Also this must be called only after - loose_route() (see Section 5.1, "loose_route()"). + loose_route() (see Section 5.1, “loose_route()”). - The function returns true if the "dir" is the same with the request's + The function returns true if the “dir” is the same with the request's flow direction. - The "downstream" direction means that the request is in the same + The “downstream” direction means that the request is in the same direction as the initial request that created the dialog. Meaning of the parameters is as follows: * dir - string containing the direction to be checked. It may be - "upstream" (from callee to caller) or "downstream" (caller to + “upstream” (from callee to caller) or “downstream” (caller to callee). This function can be used from REQUEST_ROUTE. @@ -574,7 +574,7 @@ Chapter 2. Developer Guide The RR module provides an internal API to be used by other Kamailio modules. The API offers support for SIP dialog based functionalities - for more about the dialog support offered by RR module, see Section 2, - "Dialog support". + “Dialog support”. For internal(non-script) usage, the RR module offers to other module the possibility to register callback functions to be executed each time @@ -592,7 +592,7 @@ Chapter 2. Developer Guide 1.6. get_route_param( msg, name, val) 1.7. register_rrcb( callback, param) -1.1. record_route(string) +1.1. record_route(string) The function adds a new Record-Route header field. The header field will be inserted in the message before any other Record-Route header @@ -600,7 +600,7 @@ Chapter 2. Developer Guide If any string is passed as parameter, it will be appended as URI parameter to the Record-Route header. The string must follow the - ";name=value" scheme and it may contain pseudo-variables. + “;name=value” scheme and it may contain pseudo-variables. This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and FAILURE_ROUTE. @@ -610,7 +610,7 @@ Chapter 2. Developer Guide record_route(); ... -1.2. record_route_advertised_address(string) +1.2. record_route_advertised_address(string) This function will add the string into a new Record-Route header field. Don't use unless you know what you are doing. The header field will be @@ -628,24 +628,24 @@ record_route(); record_route_advertised_address("1.2.3.4:5090"); ... -1.3. add_rr_param( msg, param) +1.3. add_rr_param( msg, param) Adds a parameter to the requests's Record-Route URI (param must be in - ";name=value" format). + “;name=value” format). The function returns 0 on success. Otherwise, -1 is returned. Meaning of the parameters is as follows: - * struct sip_msg* msg - request that will has the parameter "param" + * struct sip_msg* msg - request that will has the parameter “param” added to its Record-Route header. * str* param - parameter to be added to the Record-Route header - it - must be in ";name=value" format. + must be in “;name=value” format. -1.4. check_route_param( msg, re) +1.4. check_route_param( msg, re) - The function checks for the request "msg" if the URI parameters of the + The function checks for the request “msg” if the URI parameters of the local Route header (corresponding to the local server) matches the - given regular expression "re". It must be call after the loose_route + given regular expression “re”. It must be call after the loose_route was done. The function returns 0 on success. Otherwise, -1 is returned. @@ -656,26 +656,26 @@ record_route_advertised_address("1.2.3.4:5090"); * regex_t* param - compiled regular expression to be checked against the Route header parameters. -1.5. is_direction( msg, dir) +1.5. is_direction( msg, dir) - The function checks the flow direction of the request "msg". As for - checking it's used the "ftag" Route header parameter, the - append_fromtag (see Section 4.2, "append_fromtag (integer)" module + The function checks the flow direction of the request “msg”. As for + checking it's used the “ftag” Route header parameter, the + append_fromtag (see Section 4.2, “append_fromtag (integer)” module parameter must be enables. Also this must be call only after the loose_route is done. - The function returns 0 if the "dir" is the same with the request's flow + The function returns 0 if the “dir” is the same with the request's flow direction. Otherwise, -1 is returned. Meaning of the parameters is as follows: * struct sip_msg* msg - request that will have the direction checked. * int dir - direction to be checked against. It may be - "RR_FLOW_UPSTREAM" or "RR_FLOW_DOWNSTREAM". + “RR_FLOW_UPSTREAM” or “RR_FLOW_DOWNSTREAM”. -1.6. get_route_param( msg, name, val) +1.6. get_route_param( msg, name, val) - The function search in to the "msg"'s Route header parameters the - parameter called "name" and returns its value into "val". It must be + The function search in to the “msg”'s Route header parameters the + parameter called “name” and returns its value into “val”. It must be call only after the loose_route is done. The function returns 0 if parameter was found (even if it has no @@ -688,7 +688,7 @@ record_route_advertised_address("1.2.3.4:5090"); * str *val - returns the value of the searched Route header parameter if found. It might be empty string if the parameter had no value. -1.7. register_rrcb( callback, param) +1.7. register_rrcb( callback, param) The function register a new callback (along with its parameter). The callback will be called when a loose route will be performed for the diff --git a/modules/rr/loose.c b/modules/rr/loose.c index 76204c978..1785d8c00 100644 --- a/modules/rr/loose.c +++ b/modules/rr/loose.c @@ -56,7 +56,8 @@ #define ROUTE_SUFFIX_LEN (sizeof(ROUTE_SUFFIX)-1) /*! variables used to hook the param part of the local route */ -static unsigned int routed_msg_id; +static unsigned int routed_msg_id = 0; +static int routed_msg_pid = 0; static str routed_params = {0,0}; @@ -583,6 +584,7 @@ static inline int after_strict(struct sip_msg* _m) /* reset rr handling static vars for safety in error case */ routed_msg_id = 0; + routed_msg_pid = 0; routed_params.s = NULL; routed_params.len = 0; @@ -634,6 +636,7 @@ static inline int after_strict(struct sip_msg* _m) * important note: RURI is already parsed by the above function, so * we just used it without any checking */ routed_msg_id = _m->id; + routed_msg_pid = _m->pid; routed_params = _m->parsed_uri.params; if (is_strict(&puri.params)) { @@ -766,6 +769,7 @@ static inline int after_loose(struct sip_msg* _m, int preloaded) /* reset rr handling static vars for safety in error case */ routed_msg_id = 0; + routed_msg_pid = 0; if (parse_uri(uri.s, uri.len, &puri) < 0) { LM_ERR("failed to parse the first route URI (%.*s)\n", @@ -783,6 +787,7 @@ static inline int after_loose(struct sip_msg* _m, int preloaded) uri.len, ZSW(uri.s)); /* set the hooks for the params */ routed_msg_id = _m->id; + routed_msg_pid = _m->pid; if ((use_ob = process_outbound(_m, puri.user)) < 0) { LM_INFO("failed to process outbound flow-token\n"); @@ -969,7 +974,7 @@ int check_route_param(struct sip_msg * msg, regex_t* re) str params; /* check if the hooked params belong to the same message */ - if (routed_msg_id != msg->id) + if (routed_msg_id != msg->id || routed_msg_pid != msg->pid) return -1; /* check if params are present */ diff --git a/modules/rr/record.c b/modules/rr/record.c index b8f526e17..6c7cc05c1 100644 --- a/modules/rr/record.c +++ b/modules/rr/record.c @@ -492,7 +492,7 @@ error: int record_route_preset(struct sip_msg* _m, str* _data) { str user = {NULL, 0}; - struct to_body* from; + struct to_body* from = NULL; struct lump* l; char* hdr, *p; int hdr_len; @@ -511,10 +511,6 @@ int record_route_preset(struct sip_msg* _m, str* _data) rr_prefix_len = RR_PREFIX_SIPS_LEN; } - from = 0; - user.len = 0; - user.s = 0; - if (add_username) { if (get_username(_m, &user) < 0) { LM_ERR("failed to extract username\n"); diff --git a/modules/rtimer/README b/modules/rtimer/README index ce5dc3de5..cafd917de 100644 --- a/modules/rtimer/README +++ b/modules/rtimer/README @@ -11,7 +11,7 @@ Daniel-Constantin Mierla - Copyright 2009 http://www.asipto.com + Copyright © 2009 http://www.asipto.com __________________________________________________________________ Table of Contents diff --git a/modules/rtpengine/README b/modules/rtpengine/README index 00b26f286..df6d7ff73 100644 --- a/modules/rtpengine/README +++ b/modules/rtpengine/README @@ -36,15 +36,15 @@ Richard Fuchs Sipwise GmbH - Copyright 2003-2008 Sippy Software, Inc. + Copyright © 2003-2008 Sippy Software, Inc. - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2009-2014 TuTPro Inc. + Copyright © 2009-2014 TuTPro Inc. - Copyright 2010 VoIPEmbedded Inc. + Copyright © 2010 VoIPEmbedded Inc. - Copyright 2013-2015 Sipwise GmbH + Copyright © 2013-2015 Sipwise GmbH __________________________________________________________________ Table of Contents @@ -63,13 +63,24 @@ Richard Fuchs 4.1. rtpengine_sock (string) 4.2. rtpengine_disable_tout (integer) 4.3. rtpengine_tout_ms (integer) - 4.4. queried_nodes_limit (integer) - 4.5. rtpengine_retr (integer) - 4.6. extra_id_pv (string) - 4.7. setid_avp (string) - 4.8. force_send_interface (string) - 4.9. write_sdp_pv (string) - 4.10. rtp_inst_pvar (string) + 4.4. rtpengine_allow_op (integer) + 4.5. queried_nodes_limit (integer) + 4.6. rtpengine_retr (integer) + 4.7. extra_id_pv (string) + 4.8. setid_avp (string) + 4.9. force_send_interface (string) + 4.10. read_sdp_pv (string) + 4.11. write_sdp_pv (string) + 4.12. rtp_inst_pvar (string) + 4.13. hash_table_size (integer) + 4.14. hash_table_tout (integer) + 4.15. db_url (string) + 4.16. table_name (string) + 4.17. setid_col (string) + 4.18. url_col (string) + 4.19. weight_col (string) + 4.20. disabled_col (string) + 4.21. setid_default (string) 5. Functions @@ -89,6 +100,8 @@ Richard Fuchs 7.1. nh_enable_rtpp proxy_url/all 0/1 7.2. nh_show_rtpp proxy_url/all 7.3. nh_ping_rtpp proxy_url/all + 7.4. nh_reload_rtpp + 7.5. nh_show_hash_total 2. Frequently Asked Questions @@ -97,23 +110,37 @@ Richard Fuchs 1.1. Set rtpengine_sock parameter 1.2. Set rtpengine_disable_tout parameter 1.3. Set rtpengine_tout_ms parameter - 1.4. Set queried_nodes_limit parameter - 1.5. Set rtpengine_retr parameter - 1.6. Set extra_id_pv parameter - 1.7. Set setid_avp parameter - 1.8. Set force_send_interface parameter - 1.9. Set write_sdp_pv parameter - 1.10. Set rtp_inst_pvar parameter - 1.11. set_rtpengine_set usage - 1.12. rtpengine_offer usage - 1.13. rtpengine_answer usage - 1.14. rtpengine_delete usage - 1.15. rtpengine_manage usage - 1.16. start_recording usage - 1.17. $rtpstat Usage - 1.18. nh_enable_rtpp usage - 1.19. nh_show_rtpp usage - 1.20. nh_ping_rtpp usage + 1.4. Set rtpengine_allow_op parameter + 1.5. Set queried_nodes_limit parameter + 1.6. Set rtpengine_retr parameter + 1.7. Set extra_id_pv parameter + 1.8. Set setid_avp parameter + 1.9. Set force_send_interface parameter + 1.10. Set read_sdp_pv parameter + 1.11. Set write_sdp_pv parameter + 1.12. Set rtp_inst_pvar parameter + 1.13. Set hash_table_size parameter + 1.14. Set hash_table_tout parameter + 1.15. Set db_url parameter + 1.16. Set table_name parameter + 1.17. Setup rtpengine table + 1.18. Set setid_col parameter + 1.19. Set url_col parameter + 1.20. Set weight_col parameter + 1.21. Set disabled_col parameter + 1.22. Set setid_default parameter + 1.23. set_rtpengine_set usage + 1.24. rtpengine_offer usage + 1.25. rtpengine_answer usage + 1.26. rtpengine_delete usage + 1.27. rtpengine_manage usage + 1.28. start_recording usage + 1.29. $rtpstat Usage + 1.30. nh_enable_rtpp usage + 1.31. nh_show_rtpp usage + 1.32. nh_ping_rtpp usage + 1.33. nh_reload_rtpp usage + 1.34. nh_show_hash_total usage Chapter 1. Admin Guide @@ -131,13 +158,24 @@ Chapter 1. Admin Guide 4.1. rtpengine_sock (string) 4.2. rtpengine_disable_tout (integer) 4.3. rtpengine_tout_ms (integer) - 4.4. queried_nodes_limit (integer) - 4.5. rtpengine_retr (integer) - 4.6. extra_id_pv (string) - 4.7. setid_avp (string) - 4.8. force_send_interface (string) - 4.9. write_sdp_pv (string) - 4.10. rtp_inst_pvar (string) + 4.4. rtpengine_allow_op (integer) + 4.5. queried_nodes_limit (integer) + 4.6. rtpengine_retr (integer) + 4.7. extra_id_pv (string) + 4.8. setid_avp (string) + 4.9. force_send_interface (string) + 4.10. read_sdp_pv (string) + 4.11. write_sdp_pv (string) + 4.12. rtp_inst_pvar (string) + 4.13. hash_table_size (integer) + 4.14. hash_table_tout (integer) + 4.15. db_url (string) + 4.16. table_name (string) + 4.17. setid_col (string) + 4.18. url_col (string) + 4.19. weight_col (string) + 4.20. disabled_col (string) + 4.21. setid_default (string) 5. Functions @@ -157,6 +195,8 @@ Chapter 1. Admin Guide 7.1. nh_enable_rtpp proxy_url/all 0/1 7.2. nh_show_rtpp proxy_url/all 7.3. nh_ping_rtpp proxy_url/all + 7.4. nh_reload_rtpp + 7.5. nh_show_hash_total 1. Overview @@ -177,7 +217,7 @@ Chapter 1. Admin Guide The module allows definition of several sets of rtpproxies. Load-balancing will be performed over a set and the admin has the ability to choose what set should be used. The set is selected via its - id - the id being defined with the set. Refer to the "rtpengine_sock" + id - the id being defined with the set. Refer to the “rtpengine_sock” module parameter definition for syntax description. The balancing inside a set is done automatically by the module based on @@ -202,6 +242,31 @@ Chapter 1. Admin Guide the set was selected using setid_avp, the avp needs to be set only once before rtpengine_offer() or rtpengine_manage() call. + From the current implementation point of view, the sets of rtpproxy + nodes are shared memory(shm), so all processes can see a common list of + nodes. There is no locking when setting the nodes enabled/disabled (to + keep the memory access as fast as possible). Thus, problems related to + node state might appear for concurent processes that might set the + nodes enabled/disabled(e.g. by fifo command). This robustness problems + are overcomed as follows. + + If the current process sees the selected node as disabled, the node is + force tested before the current process actually takes the disabled + decision. If the test succeeds, the process will set the node as + enabled (but other concurrent process might still see it as disabled). + . + + If the current process sees the selected node as enabled, it does no + additional checks and sends the command which will fail in case the + machine is actually broken. The process will set the node as disabled + (but other concurrent process might still see it as enabled). + + The 'kamctl fifo' commands (including rtpengin ones) are executed by an + exclusive process which operate on the same shared memory node list. + + All the nodes are pinged in the beginning by all the processes, even if + the node list is shared memory. + 3. Dependencies 3.1. Kamailio Modules @@ -224,20 +289,31 @@ Chapter 1. Admin Guide 4.1. rtpengine_sock (string) 4.2. rtpengine_disable_tout (integer) 4.3. rtpengine_tout_ms (integer) - 4.4. queried_nodes_limit (integer) - 4.5. rtpengine_retr (integer) - 4.6. extra_id_pv (string) - 4.7. setid_avp (string) - 4.8. force_send_interface (string) - 4.9. write_sdp_pv (string) - 4.10. rtp_inst_pvar (string) + 4.4. rtpengine_allow_op (integer) + 4.5. queried_nodes_limit (integer) + 4.6. rtpengine_retr (integer) + 4.7. extra_id_pv (string) + 4.8. setid_avp (string) + 4.9. force_send_interface (string) + 4.10. read_sdp_pv (string) + 4.11. write_sdp_pv (string) + 4.12. rtp_inst_pvar (string) + 4.13. hash_table_size (integer) + 4.14. hash_table_tout (integer) + 4.15. db_url (string) + 4.16. table_name (string) + 4.17. setid_col (string) + 4.18. url_col (string) + 4.19. weight_col (string) + 4.20. disabled_col (string) + 4.21. setid_default (string) 4.1. rtpengine_sock (string) Definition of socket(s) used to connect to (a set) RTP proxy. It may specify a UNIX socket or an IPv4/IPv6 UDP socket. - Default value is "NONE" (disabled). + Default value is “NONE” (disabled). Example 1.1. Set rtpengine_sock parameter ... @@ -259,7 +335,7 @@ modparam("rtpengine", "rtpengine_sock", rtpengine module will not attempt to establish communication to that RTP proxy for rtpengine_disable_tout seconds. - Default value is "60". + Default value is “60”. Example 1.2. Set rtpengine_disable_tout parameter ... @@ -271,14 +347,37 @@ modparam("rtpengine", "rtpengine_disable_tout", 20) Timeout value expressed in milliseconds in waiting for reply from RTP proxy. - Default value is "1000". + Default value is “1000”. Example 1.3. Set rtpengine_tout_ms parameter ... modparam("rtpengine", "rtpengine_tout_ms", 2000) ... -4.4. queried_nodes_limit (integer) +4.4. rtpengine_allow_op (integer) + + Enable this to allow finishing the current sessions while denying new + sessions for the manually deactivated nodes via kamctl command i.e. + "disabled(permanent)" nodes. Probably the manually deactivated machine + is still running(did not crash). + + This is useful when deactivating a node for maintanance and reject new + sessions but allow current ones to finish. + + The behaviour is the same for a rtpengine deleted table node. When the + node is deleted from the table and the table reloaded (see + nh_reload_rtpp) the node actually is disabled(permanent) and hidden for + display. Next time the same node will be added in the table, and the + content reloaded, it will be updated and re-displayed. + + Default value is “0” to keep the current behaviour. + + Example 1.4. Set rtpengine_allow_op parameter +... +modparam("rtpengine", "rtpengine_allow_op", 1) +... + +4.5. queried_nodes_limit (integer) The total number of nodes inside a set (sets are configurable via rtpengine_sock function) to be queried before giving up establishing a @@ -288,37 +387,37 @@ modparam("rtpengine", "rtpengine_tout_ms", 2000) By default all nodes in a set are tried before giving up communicating with the rtpengines. - Example 1.4. Set queried_nodes_limit parameter + Example 1.5. Set queried_nodes_limit parameter ... modparam("rtpengine", "queried_nodes_limit", 5) ... -4.5. rtpengine_retr (integer) +4.6. rtpengine_retr (integer) How many times the module should retry to send and receive after timeout was generated. - Default value is "5". + Default value is “5”. - Example 1.5. Set rtpengine_retr parameter + Example 1.6. Set rtpengine_retr parameter ... modparam("rtpengine", "rtpengine_retr", 2) ... -4.6. extra_id_pv (string) +4.7. extra_id_pv (string) - The parameter sets the PV defination to use when the "b" parameter is + The parameter sets the PV defination to use when the “b” parameter is used on rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or rtpengine_manage() command. - Default is empty, the "b" parameter may not be used then. + Default is empty, the “b” parameter may not be used then. - Example 1.6. Set extra_id_pv parameter + Example 1.7. Set extra_id_pv parameter ... modparam("rtpengine", "extra_id_pv", "$avp(extra_id)") ... -4.7. setid_avp (string) +4.8. setid_avp (string) The parameter defines an AVP that, if set, determines which RTP proxy set rtpengine_offer(), rtpengine_answer(), rtpengine_delete(), and @@ -326,12 +425,12 @@ modparam("rtpengine", "extra_id_pv", "$avp(extra_id)") There is no default value. - Example 1.7. Set setid_avp parameter + Example 1.8. Set setid_avp parameter ... modparam("rtpengine", "setid_avp", "$avp(setid)") ... -4.8. force_send_interface (string) +4.9. force_send_interface (string) Forces all control messages between the SIP proxy and the RTP proxy to be sent from the specified local interface. Both IPv4 and IPv6 @@ -345,14 +444,32 @@ modparam("rtpengine", "setid_avp", "$avp(setid)") There is no default value. - Example 1.8. Set force_send_interface parameter + Example 1.9. Set force_send_interface parameter ... modparam("rtpengine", "force_send_interface", "10.3.7.123") modparam("rtpengine", "force_send_interface", "2001:8d8:1ff:10c0:9a90:96ff:fea8: fd99") ... -4.9. write_sdp_pv (string) +4.10. read_sdp_pv (string) + + If this parameter is set to a valid AVP or script var specifier, + rtpengine will take the input SDP from this pv instead of the message + body. + + There is no default value. + + Example 1.10. Set read_sdp_pv parameter +... +modparam("rtpengine", "read_sdp_pv", "$var(sdp)") +... +route { + ... + $var(sdp) = $rb + "a=foo:bar\r\n"; + rtpengine_manage(); +} + +4.11. write_sdp_pv (string) If this parameter is set to a valid AVP or script var specifier, the SDP returned by rtpengine in the offer/answer operations is returned in @@ -360,14 +477,17 @@ fd99") There is no default value. - Example 1.9. Set write_sdp_pv parameter + Example 1.11. Set write_sdp_pv parameter ... modparam("rtpengine", "write_sdp_pv", "$avp(sdp)") - ... or -modparam("rtpengine", "write_sdp_pv", "$pv(sdp)") ... +route { + ... + rtpengine_manage(); + set_body("$avp(sdp)a=baz123\r\n", "application/sdp"); +} -4.10. rtp_inst_pvar (string) +4.12. rtp_inst_pvar (string) A pseudo variable to store the chosen RTP Engine IP address. If this parameter is set, the IP address and port of the instance chosen will @@ -375,9 +495,164 @@ modparam("rtpengine", "write_sdp_pv", "$pv(sdp)") By default, this parameter is not set. - Example 1.10. Set rtp_inst_pvar parameter + Example 1.12. Set rtp_inst_pvar parameter +... +modparam("rtpengine", "rtp_inst_pvar", "$avp(RTP_INSTANCE)") +... + +4.13. hash_table_size (integer) + + Size of the hash table. Default value is 256. + + NOTE: If configured size is less than 1, the size will be defaulted to + 1. + + Example 1.13. Set hash_table_size parameter +... +modparam("rtpengine", "hash_table_size", "123") +... + +4.14. hash_table_tout (integer) + + Number of seconds after an rtpengine hash table entry is marked for + deletion. By default, this parameter is set to 3600 (seconds). + + To maintain information about a selected rtp machine node, for a given + call, entries are added in a hashtable of (callid, node) pairs. When + command comes, lookup callid. If found, return chosen node. If not + found, choose a new node, insert it in the hastable and return the + chosen node. + + NOTE: In the current implementation, the actual deletion happens on the + fly, while insert/remove/lookup the hastable, only for the entries in + the insert/remove/lookup path. + + NOTE: When configuring this parameter, one should consider maximum call + time VS share memory for unfinished calls. + + Example 1.14. Set hash_table_tout parameter +... +modparam("rtpengine", "hash_table_tout", "300") +... + +4.15. db_url (string) + + The rtpengine datablase url. If present and valid, it activates + database mode. Node information is read from database, not from config. + + By default, the datablase url is NULL (not set). + + Example 1.15. Set db_url parameter +... +modparam("rtpengine", "db_url", "mysql://pass@localhost/db") +... + +4.16. table_name (string) + + The rtpengine table name. If database mode is activated (i.e. valid + db_url), set the name of rtpengine table, on startup. + + By default, the rtpengine table name is "rtpengine". + + NOTE: One needs to add the version of the rtpengine table in the + version table. The current version is version 1. + + Example 1.16. Set table_name parameter ... -modparam("rtpproxy", "rtp_inst_pvar", "$avp(RTP_INSTANCE)") +modparam("rtpengine", "table_name", "rtpengine_table_name") +... + + Example 1.17. Setup rtpengine table +mysql> describe rtpengine; ++----------+------------------+------+-----+---------+-------+ +| Field | Type | Null | Key | Default | Extra | ++----------+------------------+------+-----+---------+-------+ +| setid | int(10) unsigned | NO | | NULL | | +| url | varchar(256) | NO | | NULL | | +| weight | int(10) unsigned | NO | | NULL | | +| disabled | int(11) | NO | | NULL | | ++----------+------------------+------+-----+---------+-------+ + +mysql> select * from rtpengine; ++-------+---------------------------+--------+----------+ +| setid | url | weight | disabled | ++-------+---------------------------+--------+----------+ +| 0 | udp:rtpproxy1.domain:8800 | 100 | 0 | +| 0 | udp:rtpproxy2.domain:8800 | 200 | 1 | ++-------+---------------------------+--------+----------+ + +mysql> select * from version; ++---------------------------+---------------+ +| table_name | table_version | ++---------------------------+---------------+ +| rtpengine | 1 | ++---------------------------+---------------+ + +4.17. setid_col (string) + + Column name in the rtpengine table. If database mode is activated (i.e. + valid db_url), set the setid of rtp nodes according to this column, on + startup. The MySQL value for this column should be INT UNSIGNED. + + By default, the column name is "setid". + + Example 1.18. Set setid_col parameter +... +modparam("rtpengine", "setid_col", "setid_column_name") +... + +4.18. url_col (string) + + Column name in the rtpengine table. If database mode is activated (i.e. + valid db_url), set the url of rtp nodes according to this column, on + startup. The MySQL value for this column should be VARCHAR. + + By default, the column name is "url". + + Example 1.19. Set url_col parameter +... +modparam("rtpengine", "url_col", "url_column_name") +... + +4.19. weight_col (string) + + Column name in the rtpengine table. If database mode is activated (i.e. + valid db_url), set the weight of rtp nodes according to this column, on + startup. The column value has priority over the URL weight. The MySQL + value for this column should be INT UNSIGNED. + + By default, the column name is "weight". + + Example 1.20. Set weight_col parameter +... +modparam("rtpengine", "weight_col", "weight_column_name") +... + +4.20. disabled_col (string) + + Column name in the rtpengine table. If database mode is activated (i.e. + valid db_url), set the state of rtp nodes according to this column, on + startup. The MySQL value for this column should be INT. + + By default, the column name is "disabled". + + Example 1.21. Set disabled_col parameter +... +modparam("rtpengine", "disabled_col", "disabled_column_name") +... + +4.21. setid_default (string) + + The default set of nodes to be used. + + By default, the setid is 0. + + NOTE that if setid_avp is configured, this value will be ignored and + the active set will be chosen according to the setid_avp. + + Example 1.22. Set setid_default parameter +... +modparam("rtpengine", "setid_default", 11) ... 5. Functions @@ -389,7 +664,7 @@ modparam("rtpproxy", "rtp_inst_pvar", "$avp(RTP_INSTANCE)") 5.5. rtpengine_manage([flags]) 5.6. start_recording() -5.1. set_rtpengine_set(setid[, setid]) +5.1. set_rtpengine_set(setid[, setid]) Sets the ID of the RTP proxy set to be used for the next rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or @@ -411,13 +686,13 @@ modparam("rtpproxy", "rtp_inst_pvar", "$avp(RTP_INSTANCE)") This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE. - Example 1.11. set_rtpengine_set usage + Example 1.23. set_rtpengine_set usage ... set_rtpengine_set("2"); rtpengine_offer(); ... -5.2. rtpengine_offer([flags]) +5.2. rtpengine_offer([flags]) Rewrites SDP body to ensure that media is passed through an RTP proxy. To be invoked on INVITE for the cases the SDP bodies are in INVITE and @@ -425,31 +700,31 @@ rtpengine_offer(); Meaning of the parameters is as follows: * flags - flags to turn on some features. - The "flags" string is a list of space-separated items. Each item is - either an individual token, or a token in "key=value" format. The + The “flags” string is a list of space-separated items. Each item is + either an individual token, or a token in “key=value” format. The possible tokens are described below. - + via-branch=... - Include the "branch" value of one of the - "Via" headers in the request to the RTP proxy. Possible values - are: "1" - use the first "Via" header; "2" - use the second - "Via" header; "auto" - use the first "Via" header if this is a - request, or the second one if this is a reply; "extra" - don't + + via-branch=... - Include the “branch” value of one of the + “Via” headers in the request to the RTP proxy. Possible values + are: “1” - use the first “Via” header; “2” - use the second + “Via” header; “auto” - use the first “Via” header if this is a + request, or the second one if this is a reply; “extra” - don't take the value from a header, but instead use the value of the - "extra_id_pv" variable. This can be used to create one media + “extra_id_pv” variable. This can be used to create one media session per branch on the RTP proxy. When sending a subsequent - "delete" command to the RTP proxy, you can then stop just the + “delete” command to the RTP proxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' - in the "rtpengine_delete", or stop all sessions for a call + in the “rtpengine_delete”, or stop all sessions for a call when not passing one of those two flags there. This is especially useful if you have serially forked call scenarios - where the RTP proxy gets an "offer" command for a new branch, - and then a "delete" command for the previous branch, which + where the RTP proxy gets an “offer” command for a new branch, + and then a “delete” command for the previous branch, which would otherwise delete the full call, breaking the subsequent - "answer" for the new branch. This flag is only supported by + “answer” for the new branch. This flag is only supported by the Sipwise rtpengine RTP proxy at the moment! + asymmetric - flags that UA from which message is received doesn't support symmetric RTP. Disables learning of endpoint addresses in the Sipwise rtpengine proxy. - + force-answer - force "answer", that is, only rewrite SDP when + + force-answer - force “answer”, that is, only rewrite SDP when corresponding session already exists in the RTP proxy. By default is on when the session is to be completed. + direction=... - this option specifies a logical network @@ -461,17 +736,17 @@ rtpengine_offer(); interface that the target should be using. For example, if the SIP message was sent by an endpoint on a private network and will be sent to an endpoint on the public internet, you would - use "direction=priv direction=pub" if those two logical - network interfaces were called "priv" and "pub" in your RTP + use “direction=priv direction=pub” if those two logical + network interfaces were called “priv” and “pub” in your RTP proxy's configuration respectively. The direction must only be specified in for initial SDP offer; answers or subsequent offers can omit this option. - + internal, external - shorthand for "direction=internal" and - "direction=external" respectively. Useful for brevity or as + + internal, external - shorthand for “direction=internal” and + “direction=external” respectively. Useful for brevity or as legacy option if the RTP proxy only supports two network interfaces instead of multiple, arbitrarily named ones. - + auto-bridge - this flag an alternative to the "internal" and - "external" flags in order to do automatic bridging between + + auto-bridge - this flag an alternative to the “internal” and + “external” flags in order to do automatic bridging between IPv4 on the "internal network" and IPv6 on the "external network". Instead of explicitly instructing the RTP proxy to select a particular address family, the distinction is done by @@ -479,14 +754,14 @@ rtpengine_offer(); supported by Sipwise rtpengine. + address-family=... - instructs the RTP proxy that the recipient of this SDP body expects to see addresses of a - particular family. Possible values are "IP4" and "IP6". For + particular family. Possible values are “IP4” and “IP6”. For example, if the SDP body contains IPv4 addresses but the - recipient only speaks IPv6, you would use "address-family=IP6" + recipient only speaks IPv6, you would use “address-family=IP6” to bridge between the two address families. Sipwise rtpengine remembers the address family preference of each party after it has seen an SDP body from them. This means that normally it is only necessary to explicitly specify the - address family in the "offer", but not in the "answer". + address family in the “offer”, but not in the “answer”. Note: Please note, that this will only work properly with non-dual-stack user-agents or with dual-stack clients according to RFC6157 (which suggest ICE for Dual-Stack @@ -527,15 +802,15 @@ rtpengine_offer(); G.729 going from 10ms to 100ms saves two thirds of the network bandwith. Not supported by Sipwise rtpengine. + ICE=... - controls the RTP proxy's behaviour regarding ICE - attributes within the SDP body. Possible values are: "force" - + attributes within the SDP body. Possible values are: “force” - discard any ICE attributes already present in the SDP body and then generate and insert new ICE data, leaving itself as the - only ICE candidates; "force-relay" - discard any "relay" type + only ICE candidates; “force-relay” - discard any “relay” type ICE attributes already present in the SDP body and then - generate and insert itself as the only ICE "relay" candidates; - "remove" instructs the RTP proxy to discard any ICE attributes + generate and insert itself as the only ICE “relay” candidates; + “remove” instructs the RTP proxy to discard any ICE attributes and not insert any new ones into the SDP. The default (if no - "ICE=..." is given at all), new ICE data will only be + “ICE=...” is given at all), new ICE data will only be generated if no ICE was present in the SDP originally; otherwise the RTP proxy will only insert itself as additional ICE candidate. Other SDP substitutions (c=, m=, etc) are @@ -543,20 +818,20 @@ rtpengine_offer(); + RTP, SRTP, AVP, AVPF - These flags control the RTP transport protocol that should be used towards the recipient of the SDP. If none of them are specified, the protocol given in the SDP - is left untouched. Otherwise, the "SRTP" flag indicates that - SRTP should be used, while "RTP" indicates that SRTP should - not be used. "AVPF" indicates that the advanced RTCP profile - with feedback messages should be used, and "AVP" indicates + is left untouched. Otherwise, the “SRTP” flag indicates that + SRTP should be used, while “RTP” indicates that SRTP should + not be used. “AVPF” indicates that the advanced RTCP profile + with feedback messages should be used, and “AVP” indicates that the regular RTCP profile should be used. See also the next set of flags below. + RTP/AVP, RTP/SAVP, RTP/AVPF, RTP/SAVPF - these serve as an alternative, more explicit way to select between the different RTP protocols and profiles supported by the RTP proxy. For - example, giving the flag "RTP/SAVPF" has the same effect as - giving the two flags "SRTP AVPF". - + to-tag - force inclusion of the "To" tag. Normally, the "To" - tag is always included when present, except for "delete" - messages. Including the "To" tag in a "delete" messages allows + example, giving the flag “RTP/SAVPF” has the same effect as + giving the two flags “SRTP AVPF”. + + to-tag - force inclusion of the “To” tag. Normally, the “To” + tag is always included when present, except for “delete” + messages. Including the “To” tag in a “delete” messages allows you to be more selective about which dialogues within a call are being torn down. + rtcp-mux-demux - if rtcp-mux (RFC 5761) was offered, make the @@ -564,20 +839,20 @@ rtpengine_offer(); of this message. + rtcp-mux-reject - if rtcp-mux was offered, make the RTP proxy reject the offer, but still offer it to the recipient. Can be - combined with "rtcp-mux-offer" to always offer it. + combined with “rtcp-mux-offer” to always offer it. + rtcp-mux-offer - make the RTP proxy offer rtcp-mux to the recipient of this message, regardless of whether it was offered originally or not. + rtcp-mux-accept - if rtcp-mux was offered, make the RTP proxy accept the offer and also offer it to the recipient of this - message. Can be combined with "rtcp-mux-offer" to always offer + message. Can be combined with “rtcp-mux-offer” to always offer it. + media-address=... - force a particular media address to be used in the SDP body. Address family is detected automatically. + TOS=... - change the IP TOS value for all outgoing RTP packets within the entire call in both directions. Only honoured in an - "offer", ignored for an "answer". Valid values are 0 through + “offer”, ignored for an “answer”. Valid values are 0 through 255, given in decimal. If this option is not specified, the TOS value will revert to the default TOS (normally 184). A value of -1 may be used to leave the currently used TOS @@ -596,8 +871,8 @@ rtpengine_offer(); recommended as it allows media streams to be hijacked by an attacker. + DTLS=... - influence the behaviour of DTLS-SRTP. Possible - values are "no" or "off" to suppress offering or accepting - DTLS-SRTP, and "passive" to prefer participating in DTLS-SRTP + values are “no” or “off” to suppress offering or accepting + DTLS-SRTP, and “passive” to prefer participating in DTLS-SRTP in a passive role. + SDES-off - don't offer SDES when it normally would. In an SRTP context, this leaves DTLS-SRTP as the only other option. @@ -612,7 +887,7 @@ rtpengine_offer(); This function can be used from ANY_ROUTE. - Example 1.12. rtpengine_offer usage + Example 1.24. rtpengine_offer usage route { ... if (is_method("INVITE")) { @@ -644,7 +919,7 @@ onreply_route[2] ... } -5.3. rtpengine_answer([flags]) +5.3. rtpengine_answer([flags]) Rewrites SDP body to ensure that media is passed through an RTP proxy. To be invoked on 200 OK for the cases the SDP bodies are in INVITE and @@ -656,25 +931,25 @@ onreply_route[2] This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. - Example 1.13. rtpengine_answer usage + Example 1.25. rtpengine_answer usage See rtpengine_offer() function example above for example. -5.4. rtpengine_delete([flags]) +5.4. rtpengine_delete([flags]) Tears down the RTPProxy session for the current call. See rtpengine_offer() function description above for the meaning of the - parameters. Note that not all flags make sense for a "delete". + parameters. Note that not all flags make sense for a “delete”. This function can be used from ANY_ROUTE. - Example 1.14. rtpengine_delete usage + Example 1.26. rtpengine_delete usage ... rtpengine_delete(); ... -5.5. rtpengine_manage([flags]) +5.5. rtpengine_manage([flags]) Manage the RTPProxy session - it combines the functionality of rtpengine_offer(), rtpengine_answer() and rtpengine_delete(), detecting @@ -699,12 +974,12 @@ rtpengine_delete(); This function can be used from ANY_ROUTE. - Example 1.15. rtpengine_manage usage + Example 1.27. rtpengine_manage usage ... rtpengine_manage(); ... -5.6. start_recording() +5.6. start_recording() This function will send a signal to the RTP proxy to record the RTP stream on the RTP proxy. This function is not supported by Sipwise @@ -712,7 +987,7 @@ rtpengine_manage(); This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE. - Example 1.16. start_recording usage + Example 1.28. start_recording usage ... start_recording(); ... @@ -728,7 +1003,7 @@ start_recording(); packet counters. The statistics must be retrieved before the session is deleted (before rtpengine_delete()). - Example 1.17. $rtpstat Usage + Example 1.29. $rtpstat Usage ... append_hf("X-RTP-Statistics: $rtpstat\r\n"); ... @@ -738,6 +1013,8 @@ start_recording(); 7.1. nh_enable_rtpp proxy_url/all 0/1 7.2. nh_show_rtpp proxy_url/all 7.3. nh_ping_rtpp proxy_url/all + 7.4. nh_reload_rtpp + 7.5. nh_show_hash_total 7.1. nh_enable_rtpp proxy_url/all 0/1 @@ -765,7 +1042,7 @@ start_recording(); NOTE: When specify the IPv6 RTP proxy url one must prefix it with :: to escape the :: from the IPv6 address. See the example below. - Example 1.18. nh_enable_rtpp usage + Example 1.30. nh_enable_rtpp usage ... $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0 $ kamctl fifo nh_enable_rtpp ::udp6:fe80::9a90:96ff:fea8:fd99:9999 1 @@ -788,7 +1065,7 @@ $ kamctl fifo nh_enable_rtpp all 1 NOTE: When specify the IPv6 RTP proxy url one must prefix it with :: to escape the :: from the IPv6 address. See the example below. - Example 1.19. nh_show_rtpp usage + Example 1.31. nh_show_rtpp usage ... $ kamctl fifo nh_show_rtpp udp:192.168.2.133:8081 $ kamctl fifo nh_show_rtpp ::udp6:fe80::9a90:96ff:fea8:fd99:9999 @@ -808,45 +1085,70 @@ $ kamctl fifo nh_show_rtpp all NOTE: When specify the IPv6 RTP proxy url one must prefix it with :: to escape the :: from the IPv6 address. See the example below. - Example 1.20. nh_ping_rtpp usage + Example 1.32. nh_ping_rtpp usage ... $ kamctl fifo nh_ping_rtpp udp:192.168.2.133:8081 $ kamctl fifo nh_ping_rtpp ::udp6:fe80::9a90:96ff:fea8:fd99:9999 $ kamctl fifo nh_ping_rtpp all ... +7.4. nh_reload_rtpp + + Reloads the database node table content if configured. Returns specific + message related to success, failure and no db_url configured. + + NOTE: The current behaviour updates the nodes state or creates new ones + or hides old ones, based on the database content. If allow_op modparam + is enabled, the sessions are still allowed to finish for the hidden old + nodes. + + Example 1.33. nh_reload_rtpp usage +... +$ kamctl fifo nh_reload_rtpp +... + +7.5. nh_show_hash_total + + Print the total number of hash entries in the hash table at a given + moment. + + Example 1.34. nh_show_hash_total usage +... +$ kamctl fifo nh_show_hash_total +... + Chapter 2. Frequently Asked Questions - 2.1. How do I migrate from "rtpproxy" or "rtpproxy-ng" to "rtpengine"? + 2.1. How do I migrate from “rtpproxy” or “rtpproxy-ng” to “rtpengine”? 2.2. Where can I find more about Kamailio? 2.3. Where can I post a question about this module? 2.4. How can I report a bug? 2.1. - How do I migrate from "rtpproxy" or "rtpproxy-ng" to "rtpengine"? + How do I migrate from “rtpproxy” or “rtpproxy-ng” to “rtpengine”? For the most part, only the names of the functions have changed, with - "rtpproxy" in each name replaced with "rtpengine". For example, - "rtpproxy_manage()" has become "rtpengine_manage()". A few name + “rtpproxy” in each name replaced with “rtpengine”. For example, + “rtpproxy_manage()” has become “rtpengine_manage()”. A few name duplications have also been resolved, for example there is now a single - "rtpengine_delete()" instead of "unforce_rtp_proxy()" and the identical - "rtpproxy_destroy()". + “rtpengine_delete()” instead of “unforce_rtp_proxy()” and the identical + “rtpproxy_destroy()”. The largest difference to the old module is how flags are passed to - "rtpengine_offer()", "rtpengine_answer()", "rtpengine_manage()" and - "rtpengine_delete()". Instead of having a string of single-letter + “rtpengine_offer()”, “rtpengine_answer()”, “rtpengine_manage()” and + “rtpengine_delete()”. Instead of having a string of single-letter flags, they now take a string of space-separated items, with each item - being either a single token (word) or a "key=value" pair. + being either a single token (word) or a “key=value” pair. - For example, if you had a call "rtpproxy_offer("FRWOC+PS");", this + For example, if you had a call “rtpproxy_offer("FRWOC+PS");”, this would then become: rtpengine_offer("force trust-address symmetric replace-origin replace-session-co nnection ICE=force RTP/SAVPF"); Finally, if you were using the second paramater (explicit media address) to any of these functions, this has been replaced by the - "media-address=..." option within the first string of flags. + “media-address=...” option within the first string of flags. 2.2. @@ -877,4 +1179,4 @@ nnection ICE=force RTP/SAVPF"); How can I report a bug? Please follow the guidelines provided at: - http://sip-router.org/tracker. + https://github.com/kamailio/kamailio/issues. diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c index 5481f4962..5fe83b062 100644 --- a/modules/rtpengine/rtpengine.c +++ b/modules/rtpengine/rtpengine.c @@ -97,6 +97,8 @@ MODULE_VERSION #define NAT_UAC_TEST_S_1918 0x08 #define NAT_UAC_TEST_RPORT 0x10 +#define COOKIE_SIZE 128 +#define HOSTNAME_SIZE 100 #define DEFAULT_RTPP_SET_ID 0 #define MAX_RTPP_TRIED_NODES 50 @@ -2016,12 +2018,11 @@ static void mod_destroy(void) } - static char * gencookie(void) { static char cook[34]; - sprintf(cook, "%d_%u ", (int)mypid, myseqn); + snprintf(cook, 34, "%d_%d_%u ", server_id, (int)mypid, myseqn); myseqn++; return cook; } diff --git a/modules/rtpproxy/README b/modules/rtpproxy/README index e8a2094ec..ff027f399 100644 --- a/modules/rtpproxy/README +++ b/modules/rtpproxy/README @@ -1,4 +1,3 @@ - rtpproxy Module Maxim Sobolev @@ -31,14 +30,14 @@ Carsten Bock ng-voice GmbH - Copyright 2003-2008 Sippy Software, Inc. + Copyright © 2003-2008 Sippy Software, Inc. - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2009-2012 TuTPro Inc. + Copyright © 2009-2012 TuTPro Inc. - Copyright 2010 VoIPEmbedded Inc. - _________________________________________________________________ + Copyright © 2010 VoIPEmbedded Inc. + __________________________________________________________________ Table of Contents @@ -67,17 +66,17 @@ Carsten Bock 5. Functions - 5.1. set_rtp_proxy_set(setid) - 5.2. rtpproxy_offer([flags [, ip_address]]) - 5.3. rtpproxy_answer([flags [, ip_address]]) - 5.4. rtpproxy_destroy([flags]) - 5.5. unforce_rtp_proxy() - 5.6. rtpproxy_manage([flags [, ip_address]]) - 5.7. rtpproxy_stream2uac(prompt_name, count), - 5.8. rtpproxy_stream2uas(prompt_name, count) - 5.9. rtpproxy_stop_stream2uac(), - 5.10. start_recording() - 5.11. rtpproxy_stop_stream2uas(prompt_name, count) + 5.1. set_rtp_proxy_set(setid) + 5.2. rtpproxy_offer([flags [, ip_address]]) + 5.3. rtpproxy_answer([flags [, ip_address]]) + 5.4. rtpproxy_destroy([flags]) + 5.5. unforce_rtp_proxy() + 5.6. rtpproxy_manage([flags [, ip_address]]) + 5.7. rtpproxy_stream2uac(prompt_name, count), + 5.8. rtpproxy_stream2uas(prompt_name, count) + 5.9. rtpproxy_stop_stream2uac(), + 5.10. start_recording() + 5.11. rtpproxy_stop_stream2uas(prompt_name, count) 6. Exported Pseudo Variables @@ -142,17 +141,17 @@ Chapter 1. Admin Guide 5. Functions - 5.1. set_rtp_proxy_set(setid) - 5.2. rtpproxy_offer([flags [, ip_address]]) - 5.3. rtpproxy_answer([flags [, ip_address]]) - 5.4. rtpproxy_destroy([flags]) - 5.5. unforce_rtp_proxy() - 5.6. rtpproxy_manage([flags [, ip_address]]) - 5.7. rtpproxy_stream2uac(prompt_name, count), - 5.8. rtpproxy_stream2uas(prompt_name, count) - 5.9. rtpproxy_stop_stream2uac(), - 5.10. start_recording() - 5.11. rtpproxy_stop_stream2uas(prompt_name, count) + 5.1. set_rtp_proxy_set(setid) + 5.2. rtpproxy_offer([flags [, ip_address]]) + 5.3. rtpproxy_answer([flags [, ip_address]]) + 5.4. rtpproxy_destroy([flags]) + 5.5. unforce_rtp_proxy() + 5.6. rtpproxy_manage([flags [, ip_address]]) + 5.7. rtpproxy_stream2uac(prompt_name, count), + 5.8. rtpproxy_stream2uas(prompt_name, count) + 5.9. rtpproxy_stop_stream2uac(), + 5.10. start_recording() + 5.11. rtpproxy_stop_stream2uas(prompt_name, count) 6. Exported Pseudo Variables @@ -165,37 +164,37 @@ Chapter 1. Admin Guide 1. Overview - This is a module that enables media streams to be proxied via an - rtpproxy. Rtpproxies know to work with this module are Sippy RTPproxy + This is a module that enables media streams to be proxied via an + rtpproxy. Rtpproxies know to work with this module are Sippy RTPproxy http://www.rtpproxy.org and ngcp-rtpproxy-ng - http://deb.sipwise.com/spce/2.6/pool/main/n/ngcp-mediaproxy-ng. Some - features of the rtpproxy module apply only to one of the two + http://deb.sipwise.com/spce/2.6/pool/main/n/ngcp-mediaproxy-ng. Some + features of the rtpproxy module apply only to one of the two rtpproxies. 2. Multiple RTPProxy usage - The rtpproxy module can support multiple rtpproxies for + The rtpproxy module can support multiple rtpproxies for balancing/distribution and control/selection purposes. - The module allows definition of several sets of rtpproxies. - Load-balancing will be performed over a set and the admin has the + The module allows definition of several sets of rtpproxies. + Load-balancing will be performed over a set and the admin has the ability to choose what set should be used. The set is selected via its - id - the id being defined with the set. Refer to the "rtpproxy_sock" + id - the id being defined with the set. Refer to the “rtpproxy_sock” module parameter definition for syntax description. - The balancing inside a set is done automatically by the module based - on the weight of each rtpproxy from the set. + The balancing inside a set is done automatically by the module based on + the weight of each rtpproxy from the set. - The selection of the set is done from script prior using + The selection of the set is done from script prior using unforce_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer() functions - see the set_rtp_proxy_set() function. - For backward compatibility reasons, a set with no id take by default + For backward compatibility reasons, a set with no id take by default the id 0. Also if no set is explicitly set before unforce_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer() the 0 id set will be used. - IMPORTANT: if you use multiple sets, take care and use the same set - for both rtpproxy_offer()/rtpproxy_answer() and unforce_rtpproxy()!! + IMPORTANT: if you use multiple sets, take care and use the same set for + both rtpproxy_offer()/rtpproxy_answer() and unforce_rtpproxy()!! 3. Dependencies @@ -210,7 +209,7 @@ Chapter 1. Admin Guide 3.2. External Libraries or Applications - The following libraries or applications must be installed before + The following libraries or applications must be installed before running Kamailio with this module loaded: * None. @@ -231,15 +230,15 @@ Chapter 1. Admin Guide 4.1. rtpproxy_sock (string) Used to define the list of RTPPRoxy instances to connect to. These can - be UNIX sockets or IPv4/IPv6 UDP sockets. Each modparam entry will - insert sockets into a single set. If no set ID is given, the default + be UNIX sockets or IPv4/IPv6 UDP sockets. Each modparam entry will + insert sockets into a single set. If no set ID is given, the default set ID '0' will be used. To define multiple sets add the set number at - the beginning of each parameter followed by '=='. Sockets can be - weighted by adding '=#' to a socket where # is an integer. A socket - with a weight of 2 will be chosen twice as often as one with a weight + the beginning of each parameter followed by '=='. Sockets can be + weighted by adding '=#' to a socket where # is an integer. A socket + with a weight of 2 will be chosen twice as often as one with a weight of 1. - Default value is "NONE" (disabled). + Default value is “NONE” (disabled). Example 1.1. Set rtpproxy_sock parameter ... @@ -259,11 +258,11 @@ modparam("rtpproxy", "rtpproxy_sock", 4.2. rtpproxy_disable_tout (integer) - Once RTPProxy was found unreachable and marked as disabled, the - rtpproxy module will not attempt to establish communication to - RTPProxy for rtpproxy_disable_tout seconds. + Once RTPProxy was found unreachable and marked as disabled, the + rtpproxy module will not attempt to establish communication to RTPProxy + for rtpproxy_disable_tout seconds. - Default value is "60". + Default value is “60”. Example 1.2. Set rtpproxy_disable_tout parameter ... @@ -274,7 +273,7 @@ modparam("rtpproxy", "rtpproxy_disable_tout", 20) Timeout value in waiting for reply from RTPProxy. - Default value is "1". + Default value is “1”. Example 1.3. Set rtpproxy_tout parameter ... @@ -283,10 +282,10 @@ modparam("rtpproxy", "rtpproxy_tout", 2) 4.4. rtpproxy_retr (integer) - How many times the module should retry to send and receive after + How many times the module should retry to send and receive after timeout was generated. - Default value is "5". + Default value is “5”. Example 1.4. Set rtpproxy_retr parameter ... @@ -295,8 +294,8 @@ modparam("rtpproxy", "rtpproxy_retr", 2) 4.5. nortpproxy_str (string) - This parameter sets the SDP attribute used by rtpproxy to mark the - message's SDP attachemnt with information that it have already been + This parameter sets the SDP attribute used by rtpproxy to mark the + message's SDP attachemnt with information that it have already been changed. If empty string, no marker will be added or checked. @@ -305,7 +304,7 @@ Note The string must be a complete SDP line, including the EOH (\r\n). - Default value is "a=nortpproxy:yes\r\n". + Default value is “a=nortpproxy:yes\r\n”. Example 1.5. Set nortpproxy_str parameter ... @@ -315,13 +314,13 @@ modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n") 4.6. timeout_socket (string) The parameter sets the RTP timeout socket, which is transmitted to the - RTP-Proxy. It will be used by the RTP proxy to signal back that a - media stream timed out. + RTP-Proxy. It will be used by the RTP proxy to signal back that a media + stream timed out. If it is an empty string, no timeout socket will be transmitted to the RTP-Proxy. - Default value is "" (nothing). + Default value is “” (nothing). Example 1.6. Set timeout_socket parameter ... @@ -330,15 +329,15 @@ modparam("rtpproxy", "timeout_socket", "xmlrpc:http://127.0.0.1:8000/RPC2") 4.7. ice_candidate_priority_avp (string) - If specified and if value of the avp value is not 0, rtpproxy_manage - function adds ICE relay candidate attributes to sdp stream(s) + If specified and if value of the avp value is not 0, rtpproxy_manage + function adds ICE relay candidate attributes to sdp stream(s) containing ICE candidate attributes. - If value of the avp is 1, added candidates have high priority. If - value of the avp is 2 (default), added candidates have low priority. + If value of the avp is 1, added candidates have high priority. If value + of the avp is 2 (default), added candidates have low priority. - There is no default value meaning that no ICE relay candidates are - added in any circumstance. + There is no default value meaning that no ICE relay candidates are + added in any circumstance. Example 1.7. Set ice_candidate_priority_avp parameter ... @@ -347,11 +346,11 @@ modparam("rtpproxy", "ice_candidate_priority_avp", "$avp(ice_priority)") 4.8. extra_id_pv (string) - The parameter sets the PV defination to use when the "b" parameter is - used on unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or + The parameter sets the PV defination to use when the “b” parameter is + used on unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or rtpproxy_manage() command. - Default is empty, the "b" parameter may not be used then. + Default is empty, the “b” parameter may not be used then. Example 1.8. Set extra_id_pv parameter ... @@ -360,9 +359,9 @@ modparam("rtpproxy", "extra_id_pv", "$avp(extra_id)") 4.9. db_url (string) - The database URL to load rtp_proxy sets from. If this parameter is - set, the module will attempt to load the rtpproxy sets from the - specified database and will ignore any 'rtpproxy_sock' modparams. + The database URL to load rtp_proxy sets from. If this parameter is set, + the module will attempt to load the rtpproxy sets from the specified + database and will ignore any 'rtpproxy_sock' modparams. Default is empty, a database will not be used. @@ -375,7 +374,7 @@ modparam("rtpproxy", "db_url", "mysql://user:passwb@localhost/database") The name of the table containing the rtpproxy sets. - Default value is "rtpproxy". + Default value is “rtpproxy”. Example 1.10. Set table_name parameter ... @@ -384,8 +383,8 @@ modparam("rtpproxy", "table_name", "my_rtpp_sets") 4.11. rtp_inst_pvar (string) - A pseudo variable to store the chosen RTPProxy address. If this - parameter is set, the instance URL will be stored in the given + A pseudo variable to store the chosen RTPProxy address. If this + parameter is set, the instance URL will be stored in the given variable. By default, this parameter is not set. @@ -407,26 +406,26 @@ xlog("L_INFO", "Chose rtpp instance $var(RTP_INSTANCE)\n"); 5. Functions - 5.1. set_rtp_proxy_set(setid) - 5.2. rtpproxy_offer([flags [, ip_address]]) - 5.3. rtpproxy_answer([flags [, ip_address]]) - 5.4. rtpproxy_destroy([flags]) - 5.5. unforce_rtp_proxy() - 5.6. rtpproxy_manage([flags [, ip_address]]) - 5.7. rtpproxy_stream2uac(prompt_name, count), - 5.8. rtpproxy_stream2uas(prompt_name, count) - 5.9. rtpproxy_stop_stream2uac(), - 5.10. start_recording() - 5.11. rtpproxy_stop_stream2uas(prompt_name, count) + 5.1. set_rtp_proxy_set(setid) + 5.2. rtpproxy_offer([flags [, ip_address]]) + 5.3. rtpproxy_answer([flags [, ip_address]]) + 5.4. rtpproxy_destroy([flags]) + 5.5. unforce_rtp_proxy() + 5.6. rtpproxy_manage([flags [, ip_address]]) + 5.7. rtpproxy_stream2uac(prompt_name, count), + 5.8. rtpproxy_stream2uas(prompt_name, count) + 5.9. rtpproxy_stop_stream2uac(), + 5.10. start_recording() + 5.11. rtpproxy_stop_stream2uas(prompt_name, count) 5.1. set_rtp_proxy_set(setid) - Sets the Id of the rtpproxy set to be used for the next - unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or + Sets the Id of the rtpproxy set to be used for the next + unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or rtpproxy_manage() command. The parameter can be an integer or a config variable holding an integer. - This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, + This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE. Example 1.13. set_rtp_proxy_set usage @@ -438,99 +437,99 @@ rtpproxy_offer(); 5.2. rtpproxy_offer([flags [, ip_address]]) Rewrites SDP body to ensure that media is passed through an RTP proxy. - To be invoked on INVITE for the cases the SDPs are in INVITE and 200 - OK and on 200 OK when SDPs are in 200 OK and ACK. + To be invoked on INVITE for the cases the SDPs are in INVITE and 200 OK + and on 200 OK when SDPs are in 200 OK and ACK. Meaning of the parameters is as follows: * flags - flags to turn on some features. - + 1 - append first Via branch to Call-ID when sending command - to rtpproxy. This can be used to create one media session per - branch on the rtpproxy. When sending a subsequent "delete" - command to the rtpproxy, you can then stop just the session + + 1 - append first Via branch to Call-ID when sending command to + rtpproxy. This can be used to create one media session per + branch on the rtpproxy. When sending a subsequent “delete” + command to the rtpproxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the - "unforce_rtpproxy", or stop all sessions for a call when not - passing one of those two flags there. This is especially - useful if you have serially forked call scenarios where - rtpproxy gets an "update" command for a new branch, and then - a "delete" command for the previous branch, which would - otherwise delete the full call, breaking the subsequent - "lookup" for the new branch. This flag is only supported by - the ngcp-mediaproxy-ng rtpproxy at the moment! - + 2 - append second Via branch to Call-ID when sending command + “unforce_rtpproxy”, or stop all sessions for a call when not + passing one of those two flags there. This is especially + useful if you have serially forked call scenarios where + rtpproxy gets an “update” command for a new branch, and then a + “delete” command for the previous branch, which would + otherwise delete the full call, breaking the subsequent + “lookup” for the new branch. This flag is only supported by + the ngcp-mediaproxy-ng rtpproxy (now named rtpengine) at the + moment! + + 2 - append second Via branch to Call-ID when sending command to rtpproxy. See flag '1' for its meaning. - + 3 - behave like flag 1 is set for a request and like flag 2 - is set for a reply. - + a - flags that UA from which message is received doesn't + + 3 - behave like flag 1 is set for a request and like flag 2 is + set for a reply. + + a - flags that UA from which message is received doesn't support symmetric RTP. (automatically sets the 'r' flag) - + b - append branch specific variable to Call-ID when sending - command to rtpproxy. This creates one rtpproxy session per - unique variable. Works similar to the 1, 2 and 3 parameter, - but is usefull when forking to multiple destinations on - different address families or network segments, requiring - different rtpproxy parameters. The variable value is taken - from the "extra_id_pv". When used, it must be used in every - call to rtpproxy_manage(), rtpproxy_offer(), - rtpproxy_answer() and rtpproxy_destroy() with the same - contents of the PV. The b parameter may not be used in - conjunction with the 1, 2 or 3 parameter to use the Via - branch in the Call-ID. - + l - force "lookup", that is, only rewrite SDP when - corresponding session already exists in the RTP proxy. By + + b - append branch specific variable to Call-ID when sending + command to rtpproxy. This creates one rtpproxy session per + unique variable. Works similar to the 1, 2 and 3 parameter, + but is usefull when forking to multiple destinations on + different address families or network segments, requiring + different rtpproxy parameters. The variable value is taken + from the “extra_id_pv”. When used, it must be used in every + call to rtpproxy_manage(), rtpproxy_offer(), rtpproxy_answer() + and rtpproxy_destroy() with the same contents of the PV. The b + parameter may not be used in conjunction with the 1, 2 or 3 + parameter to use the Via branch in the Call-ID. + + l - force “lookup”, that is, only rewrite SDP when + corresponding session already exists in the RTP proxy. By default is on when the session is to be completed. - + i, e - these flags specify the direction of the SIP message. - These flags only make sense when rtpproxy is running in - bridge mode. 'i' means internal network (LAN), 'e' means - external network (WAN). 'i' corresponds to rtpproxy's first - interface, 'e' corresponds to rtpproxy's second interface. - You always have to specify two flags to define the incoming - network and the outgoing network. For example, 'ie' should be - used for SIP message received from the local interface and - sent out on the external interface, and 'ei' vice versa. - Other options are 'ii' and 'ee'. So, for example if a SIP - requests is processed with 'ie' flags, the corresponding - response must be processed with 'ie' flags. - Note: As rtpproxy in bridge mode s per default asymmetric, - you have to specify the 'w' flag for clients behind NAT! See - also above notes! - + x - this flag a shortcut for using the "ie" or "ei"-flags of - RTP-Proxy, in order to do automatic bridging between IPv4 on - the "internal network" and IPv6 on the "external network". - The distinction is done by the given IP in the SDP, e.g. a - IPv4 Address will always call "ie" to the RTPProxy (IPv4(i) - to IPv6(e)) and an IPv6Address will always call "ei" to the + + i, e - these flags specify the direction of the SIP message. + These flags only make sense when rtpproxy is running in bridge + mode. 'i' means internal network (LAN), 'e' means external + network (WAN). 'i' corresponds to rtpproxy's first interface, + 'e' corresponds to rtpproxy's second interface. You always + have to specify two flags to define the incoming network and + the outgoing network. For example, 'ie' should be used for SIP + message received from the local interface and sent out on the + external interface, and 'ei' vice versa. Other options are + 'ii' and 'ee'. So, for example if a SIP requests is processed + with 'ie' flags, the corresponding response must be processed + with 'ie' flags. + Note: As rtpproxy in bridge mode s per default asymmetric, you + have to specify the 'w' flag for clients behind NAT! See also + above notes! + + x - this flag a shortcut for using the "ie" or "ei"-flags of + RTP-Proxy, in order to do automatic bridging between IPv4 on + the "internal network" and IPv6 on the "external network". The + distinction is done by the given IP in the SDP, e.g. a IPv4 + Address will always call "ie" to the RTPProxy (IPv4(i) to + IPv6(e)) and an IPv6Address will always call "ei" to the RTPProxy (IPv6(e) to IPv4(i)). - Note: Please note, that this will only work properly with - non-dual-stack user-agents or with dual-stack clients - according to RFC6157 (which suggest ICE for Dual-Stack - implementations). This short-cut will not work properly with - RFC4091 (ANAT) compatible clients, which suggests having - different m-lines with different IP-protocols grouped + Note: Please note, that this will only work properly with + non-dual-stack user-agents or with dual-stack clients + according to RFC6157 (which suggest ICE for Dual-Stack + implementations). This short-cut will not work properly with + RFC4091 (ANAT) compatible clients, which suggests having + different m-lines with different IP-protocols grouped together. - + f - instructs rtpproxy to ignore marks inserted by another - rtpproxy in transit to indicate that the session is already - goes through another proxy. Allows creating a chain of + + f - instructs rtpproxy to ignore marks inserted by another + rtpproxy in transit to indicate that the session is already + goes through another proxy. Allows creating a chain of proxies. - + r - flags that IP address in SDP should be trusted. Without - this flag, rtpproxy ignores address in the SDP and uses - source address of the SIP message as media address which is - passed to the RTP proxy. - + o - flags that IP from the origin description (o=) should be + + r - flags that IP address in SDP should be trusted. Without + this flag, rtpproxy ignores address in the SDP and uses source + address of the SIP message as media address which is passed to + the RTP proxy. + + o - flags that IP from the origin description (o=) should be also changed. - + c - flags to change the session-level SDP connection (c=) IP + + c - flags to change the session-level SDP connection (c=) IP if media-description also includes connection information. - + w - flags that for the UA from which message is received, + + w - flags that for the UA from which message is received, support symmetric RTP must be forced. - + zNN - requests the RTPproxy to perform re-packetization of - RTP traffic coming from the UA which has sent the current - message to increase or decrease payload size per each RTP - packet forwarded if possible. The NN is the target payload - size in ms, for the most codecs its value should be in 10ms - increments, however for some codecs the increment could - differ (e.g. 30ms for GSM or 20ms for G.723). The RTPproxy - would select the closest value supported by the codec. This - feature could be used for significantly reducing bandwith - overhead for low bitrate codecs, for example with G.729 going - from 10ms to 100ms saves two thirds of the network bandwith. + + zNN - requests the RTPproxy to perform re-packetization of RTP + traffic coming from the UA which has sent the current message + to increase or decrease payload size per each RTP packet + forwarded if possible. The NN is the target payload size in + ms, for the most codecs its value should be in 10ms + increments, however for some codecs the increment could differ + (e.g. 30ms for GSM or 20ms for G.723). The RTPproxy would + select the closest value supported by the codec. This feature + could be used for significantly reducing bandwith overhead for + low bitrate codecs, for example with G.729 going from 10ms to + 100ms saves two thirds of the network bandwith. * ip_address - new SDP IP address. This function can be used from ANY_ROUTE. @@ -570,13 +569,13 @@ onreply_route[2] 5.3. rtpproxy_answer([flags [, ip_address]]) Rewrites SDP body to ensure that media is passed through an RTP proxy. - To be invoked on 200 OK for the cases the SDPs are in INVITE and 200 - OK and on ACK when SDPs are in 200 OK and ACK. + To be invoked on 200 OK for the cases the SDPs are in INVITE and 200 OK + and on ACK when SDPs are in 200 OK and ACK. - See rtpproxy_answer() function description above for the meaning of - the parameters. + See rtpproxy_answer() function description above for the meaning of the + parameters. - This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, + This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. Example 1.15. rtpproxy_answer usage @@ -591,29 +590,30 @@ onreply_route[2] Meaning of the parameters is as follows: * flags - flags to turn on some features. - + 1 - append first Via branch to Call-ID when sending command - to rtpproxy. This can be used to create one media session per - branch on the rtpproxy. When sending a subsequent "delete" - command to the rtpproxy, you can then stop just the session + + 1 - append first Via branch to Call-ID when sending command to + rtpproxy. This can be used to create one media session per + branch on the rtpproxy. When sending a subsequent “delete” + command to the rtpproxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the - "unforce_rtpproxy", or stop all sessions for a call when not - passing one of those two flags there. This is especially - useful if you have serially forked call scenarios where - rtpproxy gets an "update" command for a new branch, and then - a "delete" command for the previous branch, which would - otherwise delete the full call, breaking the subsequent - "lookup" for the new branch. This flag is only supported by - the ngcp-mediaproxy-ng rtpproxy at the moment! - + 2 - append second Via branch to Call-ID when sending command + “unforce_rtpproxy”, or stop all sessions for a call when not + passing one of those two flags there. This is especially + useful if you have serially forked call scenarios where + rtpproxy gets an “update” command for a new branch, and then a + “delete” command for the previous branch, which would + otherwise delete the full call, breaking the subsequent + “lookup” for the new branch. This flag is only supported by + the ngcp-mediaproxy-ng rtpproxy (now named rtpengine) at the + moment! + + 2 - append second Via branch to Call-ID when sending command to rtpproxy. See flag '1' for its meaning. - + b - append branch specific variable to Call-ID when sending - command to rtpproxy. See rtpproxy_offer() for details. + + b - append branch specific variable to Call-ID when sending + command to rtpproxy. See rtpproxy_offer() for details. - t - do not include To tag to "delete" command to rtpproxy - thus causing full call to be deleted. Useful for deleting - unused rtpproxy call when 200 OK is received on a branch, - where rtpproxy is not needed. + t - do not include To tag to “delete” command to rtpproxy thus + causing full call to be deleted. Useful for deleting unused + rtpproxy call when 200 OK is received on a branch, where + rtpproxy is not needed. Example 1.16. rtpproxy_destroy usage ... @@ -626,25 +626,25 @@ rtpproxy_destroy(); 5.6. rtpproxy_manage([flags [, ip_address]]) - Manage the RTPProxy session - it combines the functionality of - rtpproxy_offer(), rtpproxy_answer() and unforce_rtpproxy(), detecting + Manage the RTPProxy session - it combines the functionality of + rtpproxy_offer(), rtpproxy_answer() and unforce_rtpproxy(), detecting internally based on message type and method which one to execute. - It can take the same parameters as rtpproxy_offer(). The flags - parameter to rtpproxy_manage() can be a configuration variable + It can take the same parameters as rtpproxy_offer(). The flags + parameter to rtpproxy_manage() can be a configuration variable containing the flags as a string. Functionality: * If INVITE with SDP, then do rtpproxy_offer() * If INVITE with SDP, when the tm module is loaded, mark transaction - with internal flag FL_SDP_BODY to know that the 1xx and 2xx are - for rtpproxy_answer() + with internal flag FL_SDP_BODY to know that the 1xx and 2xx are for + rtpproxy_answer() * If ACK with SDP, then do rtpproxy_answer() - * If BYE or CANCEL, or called within a FAILURE_ROUTE[], then do + * If BYE or CANCEL, or called within a FAILURE_ROUTE[], then do unforce_rtpproxy() * If reply to INVITE with code >= 300 do unforce_rtpproxy() - * If reply with SDP to INVITE having code 1xx and 2xx, then do - rtpproxy_answer() if the request had SDP or tm is not loaded, + * If reply with SDP to INVITE having code 1xx and 2xx, then do + rtpproxy_answer() if the request had SDP or tm is not loaded, otherwise do rtpproxy_offer() This function can be used from ANY_ROUTE. @@ -656,33 +656,33 @@ rtpproxy_manage(); 5.7. rtpproxy_stream2uac(prompt_name, count), - Instruct the RTPproxy to stream prompt/announcement pre-encoded with + Instruct the RTPproxy to stream prompt/announcement pre-encoded with the makeann command from the RTPproxy distribution. The uac/uas suffix - selects who will hear the announcement relatively to the current + selects who will hear the announcement relatively to the current transaction - UAC or UAS. For example invoking the rtpproxy_stream2uac - in the request processing block on ACK transaction will play the - prompt to the UA that has generated original INVITE and ACK while - rtpproxy_stop_stream2uas on 183 in reply processing block will play - the prompt to the UA that has generated 183. - - Apart from generating announcements, another possible application of - this function is implementing music on hold (MOH) functionality. When - count is -1, the streaming will be in loop indefinitely until the + in the request processing block on ACK transaction will play the prompt + to the UA that has generated original INVITE and ACK while + rtpproxy_stop_stream2uas on 183 in reply processing block will play the + prompt to the UA that has generated 183. + + Apart from generating announcements, another possible application of + this function is implementing music on hold (MOH) functionality. When + count is -1, the streaming will be in loop indefinitely until the appropriate rtpproxy_stop_stream2xxx is issued. - In order to work correctly, these functions require that a session in + In order to work correctly, these functions require that a session in the RTPproxy already exists. Also those functions don't alter the SDP, - so that they are not a substitute for calling rtpproxy_offer or + so that they are not a substitute for calling rtpproxy_offer or rtpproxy_answer. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE. Meaning of the parameters is as follows: - * prompt_name - name of the prompt to stream. Should be either - absolute pathname or pathname relative to the directory where + * prompt_name - name of the prompt to stream. Should be either + absolute pathname or pathname relative to the directory where RTPproxy runs. - * count - number of times the prompt should be repeated. A value of - -1 means that it will be streaming in a loop indefinitely, until + * count - number of times the prompt should be repeated. A value of + -1 means that it will be streaming in a loop indefinitely, until the appropriate rtpproxy_stop_stream2xxx is issued. Example 1.18. rtpproxy_stream2xxx usage @@ -703,8 +703,8 @@ rtpproxy_manage(); 5.9. rtpproxy_stop_stream2uac(), - Stop streaming of announcement/prompt/MOH started previously by the - respective rtpproxy_stream2xxx. The uac/uas suffix selects whose + Stop streaming of announcement/prompt/MOH started previously by the + respective rtpproxy_stream2xxx. The uac/uas suffix selects whose announcement relatively to tha current transaction should be stopped - UAC or UAS. @@ -712,8 +712,8 @@ rtpproxy_manage(); 5.10. start_recording() - This function will send a signal to the RTP-Proxy to record the RTP - stream on the RTP-Proxy. This function is only supported by Sippy + This function will send a signal to the RTP-Proxy to record the RTP + stream on the RTP-Proxy. This function is only supported by Sippy RTPproxy at the moment! This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE. @@ -734,9 +734,9 @@ start_recording(); 6.1. $rtpstat Returns the RTP-Statistics from the RTP-Proxy. The RTP-Statistics from - the RTP-Proxy are provided as a string and it does contain several - packet-counters. The statistics must be retrieved before the session - is deleted (before unforce_rtpproxy()). + the RTP-Proxy are provided as a string and it does contain several + packet-counters. The statistics must be retrieved before the session is + deleted (before unforce_rtpproxy()). Example 1.20. $rtpstat-Usage ... @@ -750,16 +750,16 @@ start_recording(); 7.1. nh_enable_rtpp - Enables a rtp proxy if parameter value is greater than 0. Disables it + Enables a rtp proxy if parameter value is greater than 0. Disables it if a zero value is given. - The first parameter is the rtp proxy url (exactly as defined in the + The first parameter is the rtp proxy url (exactly as defined in the config file). The second parameter value must be a number in decimal. - NOTE: if a rtpproxy is defined multiple times (in the same or - different sets), all of its instances will be enabled/disabled. + NOTE: if a rtpproxy is defined multiple times (in the same or different + sets), all of its instances will be enabled/disabled. Example 1.21. nh_enable_rtpp usage ... @@ -768,7 +768,7 @@ $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0 7.2. nh_show_rtpp - Displays all the rtp proxies and their information: set and status + Displays all the rtp proxies and their information: set and status (disabled or not, weight and recheck_ticks). No parameter. @@ -780,45 +780,45 @@ $ kamctl fifo nh_show_rtpp Chapter 2. Frequently Asked Questions - 2.1. What happend with "rtpproxy_disable" parameter? + 2.1. What happend with “rtpproxy_disable” parameter? 2.2. Where can I find more about Kamailio? 2.3. Where can I post a question about this module? 2.4. How can I report a bug? 2.1. - What happend with "rtpproxy_disable" parameter? + What happend with “rtpproxy_disable” parameter? - It was removed as it became obsolete - now "rtpproxy_sock" can take - empty value to disable the rtpproxy functionality. + It was removed as it became obsolete - now “rtpproxy_sock” can take + empty value to disable the rtpproxy functionality. 2.2. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 2.3. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 2.4. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + https://github.com/kamailio/kamailio/issues. diff --git a/modules/rtpproxy/doc/rtpproxy_admin.xml b/modules/rtpproxy/doc/rtpproxy_admin.xml index a1939c99c..49edff786 100644 --- a/modules/rtpproxy/doc/rtpproxy_admin.xml +++ b/modules/rtpproxy/doc/rtpproxy_admin.xml @@ -11,16 +11,16 @@ - + &adminguide; - +
Overview This is a module that enables media streams to be proxied via an rtpproxy. Rtpproxies know to work with this module are Sippy RTPproxy - and ngcp-rtpproxy-ng + and ngcp-rtpproxy-ng . Some features of the rtpproxy module apply only to one of the two rtpproxies. @@ -95,7 +95,7 @@
Parameters -
+
<varname>rtpproxy_sock</varname> (string) Used to define the list of RTPPRoxy instances to connect to. @@ -129,7 +129,7 @@ modparam("rtpproxy", "rtpproxy_sock",
-
+
<varname>rtpproxy_disable_tout</varname> (integer) Once RTPProxy was found unreachable and marked as disabled, the rtpproxy @@ -150,7 +150,7 @@ modparam("rtpproxy", "rtpproxy_disable_tout", 20)
-
+
<varname>rtpproxy_tout</varname> (integer) Timeout value in waiting for reply from RTPProxy. @@ -169,7 +169,7 @@ modparam("rtpproxy", "rtpproxy_tout", 2)
-
+
<varname>rtpproxy_retr</varname> (integer) How many times the module should retry to send and receive after @@ -189,11 +189,11 @@ modparam("rtpproxy", "rtpproxy_retr", 2)
-
+
<varname>nortpproxy_str</varname> (string) This parameter sets the SDP attribute used by rtpproxy to mark - the message's SDP attachemnt with information that it have + the message's SDP attachemnt with information that it have already been changed. @@ -216,7 +216,7 @@ modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n")
-
+
<varname>timeout_socket</varname> (string) The parameter sets the RTP timeout socket, which is transmitted to the RTP-Proxy. @@ -240,7 +240,7 @@ modparam("rtpproxy", "timeout_socket", "xmlrpc:http://127.0.0.1:8000/RPC2")
-
+
<varname>ice_candidate_priority_avp</varname> (string) If specified and if value of the avp value is not 0, @@ -268,7 +268,7 @@ modparam("rtpproxy", "ice_candidate_priority_avp", "$avp(ice_priority)")
-
+
<varname>extra_id_pv</varname> (string) The parameter sets the PV defination to use when the b @@ -286,7 +286,7 @@ modparam("rtpproxy", "extra_id_pv", "$avp(extra_id)")
-
+
<varname>db_url</varname> (string) The database URL to load rtp_proxy sets from. @@ -304,7 +304,7 @@ modparam("rtpproxy", "db_url", "mysql://user:passwb@localhost/database")
-
+
<varname>table_name</varname> (string) The name of the table containing the rtpproxy sets. @@ -321,7 +321,7 @@ modparam("rtpproxy", "table_name", "my_rtpp_sets")
-
+
<varname>rtp_inst_pvar</varname> (string) A pseudo variable to store the chosen RTPProxy address. @@ -356,7 +356,7 @@ xlog("L_INFO", "Chose rtpp instance $var(RTP_INSTANCE)\n");
Functions -
+
<function moreinfo="none">set_rtp_proxy_set(setid)</function> @@ -380,7 +380,7 @@ rtpproxy_offer();
-
+
<function moreinfo="none">rtpproxy_offer([flags [, ip_address]])</function> @@ -405,11 +405,11 @@ rtpproxy_offer(); passing the flag '1' or '2' in the unforce_rtpproxy, or stop all sessions for a call when not passing one of those two flags there. This is especially useful if you have serially forked call scenarios where rtpproxy - gets an update command for a new branch, and then a + gets an update command for a new branch, and then a delete command for the previous branch, which would otherwise delete the full call, breaking the subsequent lookup for the - new branch. This flag is only supported by the ngcp-mediaproxy-ng - rtpproxy at the moment! + new branch. This flag is only supported by the ngcp-mediaproxy-ng + rtpproxy (now named rtpengine) at the moment! 2 - append second Via branch to Call-ID when sending @@ -555,7 +555,7 @@ onreply_route[2]
-
+
<function moreinfo="none">rtpproxy_answer([flags [, ip_address]])</function> @@ -580,7 +580,7 @@ onreply_route[2]
-
+
<function moreinfo="none">rtpproxy_destroy([flags])</function> @@ -605,11 +605,11 @@ onreply_route[2] passing the flag '1' or '2' in the unforce_rtpproxy, or stop all sessions for a call when not passing one of those two flags there. This is especially useful if you have serially forked call scenarios where rtpproxy - gets an update command for a new branch, and then a + gets an update command for a new branch, and then a delete command for the previous branch, which would otherwise delete the full call, breaking the subsequent lookup for the - new branch. This flag is only supported by the ngcp-mediaproxy-ng - rtpproxy at the moment! + new branch. This flag is only supported by the ngcp-mediaproxy-ng + rtpproxy (now named rtpengine) at the moment! 2 - append second Via branch to Call-ID when sending @@ -634,7 +634,7 @@ rtpproxy_destroy();
-
+
<function moreinfo="none">unforce_rtp_proxy()</function> @@ -643,7 +643,7 @@ rtpproxy_destroy();
-
+
<function moreinfo="none">rtpproxy_manage([flags [, ip_address]])</function> @@ -710,7 +710,7 @@ rtpproxy_manage();
-
+
<function>rtpproxy_stream2uac(prompt_name, count)</function>, @@ -774,7 +774,7 @@ rtpproxy_manage();
-
+
<function>rtpproxy_stream2uas(prompt_name, count)</function> @@ -782,7 +782,7 @@ rtpproxy_manage(); See function rtpproxy_stream2uac(prompt_name, count).
-
+
<function>rtpproxy_stop_stream2uac()</function>, @@ -796,13 +796,13 @@ rtpproxy_manage(); These functions can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
-
+
<function moreinfo="none">start_recording()</function> This function will send a signal to the RTP-Proxy to record - the RTP stream on the RTP-Proxy. + the RTP stream on the RTP-Proxy. This function is only supported by Sippy RTPproxy at the moment! @@ -817,7 +817,7 @@ start_recording();
-
+
<function>rtpproxy_stop_stream2uas(prompt_name, count)</function> @@ -831,7 +831,7 @@ start_recording();
Exported Pseudo Variables -
+
<function moreinfo="none">$rtpstat</function> Returns the RTP-Statistics from the RTP-Proxy. The RTP-Statistics from the RTP-Proxy @@ -880,7 +880,7 @@ $ &ctltool; fifo nh_enable_rtpp udp:192.168.2.133:8081 0
- +
<function moreinfo="none">nh_show_rtpp</function> diff --git a/modules/sanity/README b/modules/sanity/README index aeb05bfdc..bd200879e 100644 --- a/modules/sanity/README +++ b/modules/sanity/README @@ -4,7 +4,7 @@ Nils Ohlmeier iptelorg GmbH - Copyright 2006 iptelorg GmbH + Copyright © 2006 iptelorg GmbH __________________________________________________________________ Table of Contents @@ -113,7 +113,7 @@ Chapter 1. Admin Guide of the sanity_check function. The integer value is the sum of the check numbers which should be executed by default. - Default value is "999". This resolves to the following list of checks: + Default value is “999”. This resolves to the following list of checks: ruri_sip_version (1), ruri_scheme (2), required_headers (4), cseq_method (32), cseq_value (64), cotent_length (128), expires_value (256), proxy_require (512). @@ -154,7 +154,7 @@ modparam("sanity", "proxy_require", "foo, bar") automatically if the sanity checks fail. Default value is 1 (auto drop). If set to 0, sanity_check() function will return -1 (false) to configuration file, allowing to write log messages for example - be - sure you "exit" execution of config without sending a SIP reply because + sure you “exit” execution of config without sending a SIP reply because it is sent by module itself. Example 1.4. Set autodrop parameter @@ -166,7 +166,7 @@ modparam("sanity", "autodrop", 1) 4.1. sanity_check([msg_checks [, uri_checks]]) -4.1. sanity_check([msg_checks [, uri_checks]]) +4.1. sanity_check([msg_checks [, uri_checks]]) This function makes a row of sanity checks over the given SIP request. The behavior of the function is also controlled by autodrop parameter. diff --git a/modules/sca/README b/modules/sca/README index 7ca1b4c4c..bd813387f 100644 --- a/modules/sca/README +++ b/modules/sca/README @@ -4,7 +4,7 @@ Andrew Mortensen University of Pennsylvania - Copyright 2012 Andrew Mortensen, admorten@isc.upenn.edu + Copyright © 2012 Andrew Mortensen, admorten@isc.upenn.edu __________________________________________________________________ Table of Contents @@ -29,7 +29,7 @@ Andrew Mortensen 4. Functions 4.1. sca_handle_subscribe() - 4.2. sca_call_info_update() + 4.2. sca_call_info_update([mask]) 5. Exported RPC Commands @@ -76,7 +76,7 @@ Chapter 1. Admin Guide 4. Functions 4.1. sca_handle_subscribe() - 4.2. sca_call_info_update() + 4.2. sca_call_info_update([mask]) 5. Exported RPC Commands @@ -232,7 +232,7 @@ modparam( "sca", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio" ) Name of the database table where call-info subscriptions are written. - Default value is "sca_subscriptions". + Default value is “sca_subscriptions”. Example 1.6. Set subs_table parameter: ... @@ -254,7 +254,7 @@ modparam( "sca", "db_update_interval", 120 ) 4. Functions 4.1. sca_handle_subscribe() - 4.2. sca_call_info_update() + 4.2. sca_call_info_update([mask]) 4.1. sca_handle_subscribe() @@ -277,14 +277,20 @@ modparam( "sca", "db_update_interval", 120 ) Example 1.8. sca_handle_subscribe usage: ... if ( is_method( "SUBSCRIBE" )) { - if ( $hdr(Event) == "call-info" || $hdr(Event) == "line-seize" ) { + if ( $hdr(Event) == "call-info" || $hdr(Event) == "line-seize" ) { sca_handle_subscribe(); exit; - } + } } ... -4.2. sca_call_info_update() +4.2. sca_call_info_update([mask]) + + * mask - integer (optional) + controls what to check as shared line (BOTH, CALLER, CALLEE) + + 0 - SCA_CALL_INFO_SHARED_NONE (default) check both + + 1 - SCA_CALL_INFO_SHARED_CALLER + + 2 - SCA_CALL_INFO_SHARED_CALLEE The sca_call_info_update function updates call state for SCA appearances. If a request or response packet contains a Call-Info @@ -311,28 +317,28 @@ if ( is_method( "SUBSCRIBE" )) { route { ... - sca_call_info_update(); + sca_call_info_update(); ... } onreply_route[REPLY_ROUTE] { ... - if ( status =~ "[456][0-9][0-9]" ) { + if ( status =~ "[456][0-9][0-9]" ) { # don't update SCA state here, since there may be # failure route processing (e.g., call forwarding). # update state in failure route instead. break; - } + } - sca_call_info_update(); + sca_call_info_update(); ... } failure_route[FAILURE_ROUTE] { ... - sca_call_info_update(); + sca_call_info_update(); ... } ... @@ -354,7 +360,7 @@ failure_route[FAILURE_ROUTE] Parameters: none Example: - kamcmd sca.all_subscriptions + kamcmd sca.all_subscriptions 5.2. sca.all_appearances @@ -365,7 +371,7 @@ failure_route[FAILURE_ROUTE] Parameters: none Example: - kamcmd sca.all_appearances + kamcmd sca.all_appearances 5.3. sca.seize_appearance @@ -380,10 +386,10 @@ failure_route[FAILURE_ROUTE] * SCA Contact URI Example: - # seize next available appearance of sip:215@voice.example.com - # for contact sip:215@10.0.1.2 - kamcmd sca.seize_appearance sip:215@voice.example.com sip:215@10.0.1 -.2 + # seize next available appearance of sip:215@voice.example.com + # for contact sip:215@10.0.1.2 + kamcmd sca.seize_appearance sip:215@voice.example.com si +p:215@10.0.1.2 5.4. sca.update_appearance @@ -400,9 +406,10 @@ failure_route[FAILURE_ROUTE] * Appearance Display Info (Optional) Example: - # update in-use appearance index 3 of sip:215@voice.example.com - # state held. - kamcmd sca.update_appearance sip:215@voice.example.com 3 held + # update in-use appearance index 3 of sip:215@voice.example.com + # state held. + kamcmd sca.update_appearance sip:215@voice.example.com 3 + held 5.5. sca.release_appearance @@ -416,9 +423,10 @@ failure_route[FAILURE_ROUTE] * Appearance Index Example: - # release appearance of sip:215@voice.example.com with - # appearance index 3 - kamcmd sca.release_appearance sip:215@voice.example.com 3 + # release appearance of sip:215@voice.example.com with + # appearance index 3 + kamcmd sca.release_appearance sip:215@voice.example.com +3 6. Sample kamailio.cfg with SCA diff --git a/modules/sca/doc/sca_admin.xml b/modules/sca/doc/sca_admin.xml index bbfe7ac78..85911cea8 100644 --- a/modules/sca/doc/sca_admin.xml +++ b/modules/sca/doc/sca_admin.xml @@ -10,9 +10,9 @@ - &adminguide; + &adminguide; -
+
Overview The sca module implements Shared Call Appearances. It handles @@ -71,52 +71,52 @@ To date, this module has only been tested with Polycom Soundpoint 550s and 650s running Polycom SIP 3.3.4. -
+
-
+
Dependencies
- Modules - + Modules + The following modules must be loaded before this module: - - + + a database module - - - - + + + + sl - - - - + + + + tm - - + + - + +
-
-
- Parameters
- <varname>hash_table_size</varname> (integer) - + Parameters +
+ <varname>hash_table_size</varname> (integer) + Size, as a power of two, of the shared memory hash table containing the call-info subscriptions and the appearance state. A larger power of two means better performance (fewer collisions, making for fewer subscriber URI comparisons) at the expense of increased shared memory use. - - + + - Default value is 9 (2 ^ 9 == 512). + Default value is 9 (2 ^ 9 == 512). - - + + Set <varname>hash_table_size</varname>: ... @@ -124,205 +124,218 @@ modparam( "sca", "hash_table_size", 8 ) ... - +
-
- <varname>call_info_max_expires</varname> (integer) - +
+ <varname>call_info_max_expires</varname> (integer) + The maximum allowed call-info subscription time in seconds. - - + + - Default value is 3600 (1 hour). + Default value is 3600 (1 hour). - - + + Set <varname>call_info_max_expires</varname>: ... modparam( "sca", "call_info_max_expires", 1800 ) ... - +
-
- <varname>line_seize_max_expires</varname> (integer) - +
+ <varname>line_seize_max_expires</varname> (integer) + The maximum allowed line-seize subscription time in seconds. - - - - Default value is 15 (15 seconds). - - - + + + + Default value is 15 (15 seconds). + + + A maximum line-seize subscription time of 15 seconds is recommended in the SIP Access Side Extensions document. This interval is purposely short to prevent a client from seizing an appearance without making a call for extended periods of time. - - - Set <varname>line_seize_max_expires</varname>: - -... + + + Set <varname>line_seize_max_expires</varname>: + +... modparam( "sca", "line_seize_max_expires", 30 ) ... - - -
+ + +
-
- <varname>purge_expired_interval</varname> (integer) - +
+ <varname>purge_expired_interval</varname> (integer) + The period of time in seconds between purges of expired call-info and line-seize subscriptions. - - - - Default value is 120 (2 minutes). - - - + + + + Default value is 120 (2 minutes). + + + On finding an expired subscription, the module removes the subscription from the shared memory hash table, and sends a NOTIFY with Subscription-State "terminated;expired" header value to the subscriber. It also NOTIFYs other members of the group, in the event that the expired subscription was a line-seize. - - - Set <varname>purge_expired_interval</varname>: - -... + + + Set <varname>purge_expired_interval</varname>: + +... modparam( "sca", "purge_expired_interval", 60 ) ... - - -
+ + +
-
- <varname>db_url</varname> (str) - +
+ <varname>db_url</varname> (str) + URL of database to which subscribers will be written. - - + + Default value is &defaultdb; - - + + Set <varname>db_url</varname> parameter: ... modparam( "sca", "db_url", "&defaultdb;" ) ... - +
-
- <varname>subs_table</varname> (str) - +
+ <varname>subs_table</varname> (str) + Name of the database table where call-info subscriptions are written. - - - - Default value is sca_subscriptions. - - - - Set <varname>subs_table</varname> parameter: - -... + + + + Default value is sca_subscriptions. + + + + Set <varname>subs_table</varname> parameter: + +... modparam( "sca", "subs_table", "call_info_subscriptions" ) ... - - -
+ + +
-
- <varname>db_update_interval</varname> (integer) - +
+ <varname>db_update_interval</varname> (integer) + Period in seconds between writes of call-info subscriber - information to the database. - - + information to the database. + + - Default value is 300 (5 minutes). + Default value is 300 (5 minutes). - - + + Set <varname>db_update_interval</varname>: ... modparam( "sca", "db_update_interval", 120 ) ... - + +
-
-
- Functions
- + <title>Functions +
+ <function moreinfo="none">sca_handle_subscribe()</function> - - + + The function handling call-info and line-seize SUBSCRIBE requests. It stores or updates the subscriptions in shared memory, and sends NOTIFYs to the subscriber and other members of the group as needed. - - + + For example, a line-seize SUBSCRIBE will cause the module to reserve an appearance index for the subscriber; send a line-seize NOTIFY to the subscriber indicating which appearance index it must use; and send call-info NOTIFYs to other subscribers to the address-of-record letting them know the appearance is off hook. - - + + This function can be used from the REQUEST_ROUTE. - - + + Return code: - - + + 1 - successful - - + + - - + + -1 - failed, error logged - - + + - - + + <function>sca_handle_subscribe</function> usage: ... if ( is_method( "SUBSCRIBE" )) { - if ( $hdr(Event) == "call-info" || $hdr(Event) == "line-seize" ) { + if ( $hdr(Event) == "call-info" || $hdr(Event) == "line-seize" ) { sca_handle_subscribe(); exit; - } + } } ... - +
-
- - <function moreinfo="none">sca_call_info_update()</function> - - +
+ + <function moreinfo="none">sca_call_info_update([mask])</function> + + + + + mask - integer (optional) + controls what to check as shared line (BOTH, CALLER, CALLEE) + + 0 - SCA_CALL_INFO_SHARED_NONE (default) check both + 1 - SCA_CALL_INFO_SHARED_CALLER + 2 - SCA_CALL_INFO_SHARED_CALLEE + + + + + The sca_call_info_update function updates call state for SCA appearances. If a request or response packet contains a Call-Info header, the function extracts call state from @@ -333,238 +346,238 @@ if ( is_method( "SUBSCRIBE" )) { AoRs, the function looks up the appearance by dialog and updates call state as needed, sending NOTIFYs to members of the group if the call state has changed. - - + + The sca_call_info_update function updates call state for INVITE, CANCEL, BYE, PRACK and REFER requests and responses. - - - This function can be used from the REQUEST_ROUTE, REPLY_ROUTE, + + + This function can be used from the REQUEST_ROUTE, REPLY_ROUTE, and FAILURE_ROUTE. - - - Return code: - - - - 1 - successful - - - - - - -1 - failed, error logged - - - - - - <function>sca_call_info_update</function> usage: - -... + + + Return code: + + + + 1 - successful + + + + + + -1 - failed, error logged + + + + + + <function>sca_call_info_update</function> usage: + +... route { ... - sca_call_info_update(); + sca_call_info_update(); ... } onreply_route[REPLY_ROUTE] { ... - if ( status =~ "[456][0-9][0-9]" ) { + if ( status =~ "[456][0-9][0-9]" ) { # don't update SCA state here, since there may be # failure route processing (e.g., call forwarding). # update state in failure route instead. break; - } + } - sca_call_info_update(); + sca_call_info_update(); ... } failure_route[FAILURE_ROUTE] { ... - sca_call_info_update(); + sca_call_info_update(); ... } -... - - -
-
+... + + +
+
-
+
Exported RPC Commands -
- <varname>sca.all_subscriptions</varname> - +
+ <varname>sca.all_subscriptions</varname> + List all current call-info and line-seize subscriptions. - - + + Name: sca.all_subscriptions - - + + Parameters: none - - + + Example: - - - &sercmd; sca.all_subscriptions - + + + &sercmd; sca.all_subscriptions +
-
- <varname>sca.all_appearances</varname> - +
+ <varname>sca.all_appearances</varname> + List all SCA appearances with non-idle state. - - - Name: sca.all_appearances - - - Parameters: none - - - Example: - - - &sercmd; sca.all_appearances - -
+
+ + Name: sca.all_appearances + + + Parameters: none + + + Example: + + + &sercmd; sca.all_appearances + +
-
- <varname>sca.seize_appearance</varname> - +
+ <varname>sca.seize_appearance</varname> + Seize an appearance index for a specific contact within an SCA group, and notify other members of the group that the appearance is off hook. Useful for testing SCA signaling. - - - Name: sca.seize_appearance - - - Parameters: 2 - - + + + Name: sca.seize_appearance + + + Parameters: 2 + + - SCA Address-of-Record + SCA Address-of-Record - SCA Contact URI + SCA Contact URI - - - Example: - - - # seize next available appearance of sip:215@voice.example.com - # for contact sip:215@10.0.1.2 - &sercmd; sca.seize_appearance sip:215@voice.example.com sip:215@10.0.1.2 - -
+ + + Example: + + + # seize next available appearance of sip:215@voice.example.com + # for contact sip:215@10.0.1.2 + &sercmd; sca.seize_appearance sip:215@voice.example.com sip:215@10.0.1.2 + +
-
- <varname>sca.update_appearance</varname> - +
+ <varname>sca.update_appearance</varname> + Update the state of an in-use appearance index, and notify other members of the group. Useful for testing SCA signaling. - - - Name: sca.update_appearance - - - Parameters: 3 or 4 - - + + + Name: sca.update_appearance + + + Parameters: 3 or 4 + + - SCA Address-of-Record + SCA Address-of-Record - Index of In-Use Appearance + Index of In-Use Appearance - Appearance State - (seized, ringing, progressing, active, held, held-private) + Appearance State + (seized, ringing, progressing, active, held, held-private) - Appearance Display Info (Optional) + Appearance Display Info (Optional) - - - Example: - - - # update in-use appearance index 3 of sip:215@voice.example.com - # state held. - &sercmd; sca.update_appearance sip:215@voice.example.com 3 held - -
+ + + Example: + + + # update in-use appearance index 3 of sip:215@voice.example.com + # state held. + &sercmd; sca.update_appearance sip:215@voice.example.com 3 held + +
-
- <varname>sca.release_appearance</varname> - +
+ <varname>sca.release_appearance</varname> + Set a non-idle appearance index to idle and NOTIFY members of the group. - - - Name: sca.release_appearance - - - Parameters: 2 - - + + + Name: sca.release_appearance + + + Parameters: 2 + + - SCA Address-of-Record + SCA Address-of-Record - Appearance Index + Appearance Index - - - Example: - - - # release appearance of sip:215@voice.example.com with - # appearance index 3 - &sercmd; sca.release_appearance sip:215@voice.example.com 3 - -
-
+ + + Example: + + + # release appearance of sip:215@voice.example.com with + # appearance index 3 + &sercmd; sca.release_appearance sip:215@voice.example.com 3 + +
+
-
+
Sample &kamailioconfig; with SCA - The following is a basic &kamailioconfig; providing Shared Call - Appearances to local subscribers. It has been tested with - Polycom handsets. + The following is a basic &kamailioconfig; providing Shared Call + Appearances to local subscribers. It has been tested with + Polycom handsets. - &kamailioconfig; - + &kamailioconfig; + ## - + -
+
diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c index 41d153e8c..425a79b66 100644 --- a/modules/sipcapture/sipcapture.c +++ b/modules/sipcapture/sipcapture.c @@ -626,13 +626,13 @@ void * capture_mode_init(str *name, str * params) { return n; error: - if (n->name.s){ - pkg_free(n->name.s); - } - if (n->table_names){ - pkg_free(n->table_names); - } if (n){ + if (n->name.s){ + pkg_free(n->name.s); + } + if (n->table_names){ + pkg_free(n->table_names); + } pkg_free(n); } return 0; diff --git a/modules/siptrace/README b/modules/siptrace/README index 7ee26f963..eb6235f5c 100644 --- a/modules/siptrace/README +++ b/modules/siptrace/README @@ -16,9 +16,9 @@ Daniel-Constantin Mierla - Copyright 2010 asipto.com + Copyright © 2010 asipto.com - Copyright 2006 voice-system.ro + Copyright © 2006 voice-system.ro __________________________________________________________________ Table of Contents @@ -144,7 +144,7 @@ Chapter 1. Admin Guide There are two ways of storing information: * by calling the sip_trace() method explicitely in the Kamailio configuration file. In this case the original message is processed. - * by setting the flag equal with the value of "trace_flag" (e.g., + * by setting the flag equal with the value of “trace_flag” (e.g., setflag(__trace_flag__)) parameter of the module. In this case, the message sent forward is processed. The logging mechanism is based on TM/SL callbacks, so only messages processed with the TM module @@ -210,7 +210,7 @@ modparam("siptrace", "db_url", "mysql://user:passwd@host/dbname") Name of the table where to store the SIP messages. - Default value is "sip_trace". + Default value is “sip_trace”. Example 1.2. Set sip_trace parameter ... @@ -242,7 +242,7 @@ modparam("siptrace", "trace_on", 1) 3.5. traced_user_avp (str) The name of the AVP storing the SIP URI of the traced user. If the AVP - is set, messages are stored in database table and the "traced_user" + is set, messages are stored in database table and the “traced_user” column is filled with AVP's value. You can store the message many times for many users by having multiple values for this AVP. @@ -257,10 +257,10 @@ modparam("siptrace", "traced_user_avp", "$avp(s:user)") 3.6. trace_table_avp (str) The name of the AVP storing the name of the table where to store the - SIP messages. If it is not set, the value of "table" parameter is used. + SIP messages. If it is not set, the value of “table” parameter is used. In this way one can select dynamically where to store the traced messages. The table must exists, and must have the same structure as - the "sip_trace" table. + the “sip_trace” table. Default value is "NULL" (feature disabled). @@ -286,7 +286,7 @@ modparam("siptrace", "duplicate_uri", "sip:10.1.1.1:5888") Parameter to enable/disable inserts to the database from this Kamailio. - In case we only want to send the SIP messages to the "duplicate_uri" + In case we only want to send the SIP messages to the “duplicate_uri” and not store the information to the local database we can set this to "0". @@ -299,7 +299,7 @@ modparam("siptrace", "trace_to_database", 0) 3.9. trace_local_ip (str) - The address to be used in "fromip" field for locally generated + The address to be used in “fromip” field for locally generated messages. If not set, the module sets it to the address of the socket that will be used to send the message. @@ -331,9 +331,9 @@ modparam("siptrace", "trace_sl_acks", 0) Parameter to enable/disable writing of x-headers. - Stores "fromip", "toip", "method" and "direction" in "X-Siptrace-*" + Stores “fromip”, “toip”, “method” and “direction” in “X-Siptrace-*” headers. This allows to transmit them to a second Kamailio server using - the "duplicate_uri" feature. Because the headers are added after the + the “duplicate_uri” feature. Because the headers are added after the data is written to the database, the headers only show up in the packets sent by duplicate_uri. @@ -354,7 +354,7 @@ modparam("siptrace", "xheaders_write", 0) Parameter to enable/disable reading of x-headers. - Reads and removes the "X-Siptrace-*" headers. Packets not containing + Reads and removes the “X-Siptrace-*” headers. Packets not containing the headers are neither stored to the database nor relayed (duplicate_uri). See xheaders_write for further information. @@ -378,8 +378,8 @@ modparam("siptrace", "hep_mode_on", 1) 3.14. hep_version (integer) - The parameter indicate the version of the HEP protocol. Can be "1" or - "2". In HEPv2 the timestamp and capture agent ID will be included to + The parameter indicate the version of the HEP protocol. Can be “1” or + “2”. In HEPv2 the timestamp and capture agent ID will be included to HEP header. Default value is "1". @@ -403,8 +403,8 @@ modparam("siptrace", "hep_capture_id", 234) 3.16. trace_delayed (integer) - Use "INSERT DELAYED" to store to database when it is available, instead - of "INSERT". + Use “INSERT DELAYED” to store to database when it is available, instead + of “INSERT”. Default value is 0 (off). @@ -444,7 +444,7 @@ modparam("siptrace", "trace_mode", 1) 4.1. sip_trace([address]) -4.1. sip_trace([address]) +4.1. sip_trace([address]) Store or forward the current processed SIP message in database. It is stored in the form prior applying changes made to it. @@ -469,7 +469,7 @@ sip_trace("sip:10.1.1.2:5085"); 5.1. sip_trace -5.1. sip_trace +5.1. sip_trace Name: sip_trace @@ -478,7 +478,7 @@ sip_trace("sip:10.1.1.2:5085"); + on + off The parameter is optional - if missing, the command will return the - status of the SIP message tracing (as string "on" or "off" ) + status of the SIP message tracing (as string “on” or “off” ) without changing anything. MI FIFO Command Format: @@ -490,7 +490,7 @@ sip_trace("sip:10.1.1.2:5085"); 6.1. siptrace.status param -6.1. siptrace.status param +6.1. siptrace.status param Name: siptrace.status @@ -498,7 +498,7 @@ sip_trace("sip:10.1.1.2:5085"); * on or off: turns on/off SIP message tracing.. Possible values are: + on + off - * "check" does not change siptrace status, just reports the current + * “check” does not change siptrace status, just reports the current status. 7. Database setup diff --git a/modules/siputils/README b/modules/siputils/README index 27b2d2651..d202b8833 100644 --- a/modules/siputils/README +++ b/modules/siputils/README @@ -32,11 +32,15 @@ Edited by Jan Janak +Edited by + Bogdan-Andrei Iancu +Edited by + Gabriel Vasile - Copyright 2008, 2005, 2003 1&1 Internet AG, FhG Fokus, Voice Sistem + Copyright © 2008, 2005, 2003 1&1 Internet AG, FhG Fokus, Voice Sistem SRL __________________________________________________________________ @@ -208,7 +212,7 @@ Chapter 1. Admin Guide To answer OPTIONS request directed to your server is the easiest way for is-alive-tests on the SIP (application) layer from remote (similar - to ICMP echo requests, also known as "ping", on the network layer). + to ICMP echo requests, also known as “ping”, on the network layer). 2. Dependencies @@ -242,9 +246,9 @@ Chapter 1. Admin Guide Timeout value in seconds, define how long the call-id is stored in the internal list kept for replacing 183 messages with 180. A reasonable - value is "30". + value is “30”. - Default value is "0". This means functionality is disabled. + Default value is “0”. This means functionality is disabled. Example 1.1. Set ring_timeout parameter ... @@ -255,10 +259,10 @@ modparam("siputils", "ring_timeout", 30) This parameter is the content of the Accept header field. Note: it is not clearly written in RFC3261 if a proxy should accept any content - (the default "*/*") because it does not care about content. Or if it - does not accept any content, which is "". + (the default “*/*”) because it does not care about content. Or if it + does not accept any content, which is “”. - Default value is "*/*". + Default value is “*/*”. Example 1.2. Set options_accept parameter ... @@ -271,7 +275,7 @@ modparam("siputils", "options_accept", "application/*") Please do not change the default value because Kamailio does not support any encodings yet. - Default value is "". + Default value is “”. Example 1.3. Set options_accept_encoding parameter ... @@ -289,7 +293,7 @@ Warning inside username,password or other fields of contact. Otherwise it is possible for the decoding step to fail/produce wrong results. - Default value is "*". + Default value is “*”. Example 1.4. Set contact_flds_separator parameter ... @@ -306,7 +310,7 @@ modparam("siputils", "contact_flds_separator", "-") other devices, but presumably there are not many devices around which support other languages than the default English. - Default value is "en". + Default value is “en”. Example 1.5. Set options_accept_language parameter ... @@ -320,7 +324,7 @@ modparam("siputils", "options_accept_language", "de") Kamailio currently does not support any of the SIP extensions registered at the IANA. - Default value is "". + Default value is “”. Example 1.6. Set options_support parameter ... @@ -332,7 +336,7 @@ modparam("siputils", "options_support", "100rel") Prefix to be added to Remote-Party-ID header field just before the URI returned from either radius or database. - Default value is "". + Default value is “”. Example 1.7. rpid_prefix parameter example modparam("auth", "rpid_prefix", "Whatever <") @@ -342,7 +346,7 @@ modparam("auth", "rpid_prefix", "Whatever <") Suffix to be added to Remote-Party-ID header field after the URI returned from either radius or database. - Default value is ";party=calling;id-type=subscriber;screen=yes". + Default value is “;party=calling;id-type=subscriber;screen=yes”. Example 1.8. rpid_suffix parameter example modparam("auth", "rpid_suffix", "@1.2.3.4>") @@ -356,7 +360,7 @@ modparam("auth", "rpid_suffix", "@1.2.3.4>") If defined to NULL string, all RPID functions will fail at runtime. - Default value is "$avp(s:rpid)". + Default value is “$avp(s:rpid)”. Example 1.9. rpid_avp parameter example modparam("auth", "rpid_avp", "$avp(myrpid)") @@ -393,7 +397,7 @@ modparam("auth", "rpid_avp", "$avp(myrpid)") 4.28. is_first_hop() 4.29. sip_p_charging_vector(flags) -4.1. ring_insert_callid() +4.1. ring_insert_callid() Inserting the call-id in the internal list, which is checked when further replies arrive. Any 183 reply that is received during the @@ -410,14 +414,14 @@ modparam("auth", "rpid_avp", "$avp(myrpid)") ring_insert_callid(); ... -4.2. options_reply() +4.2. options_reply() This function checks if the request method is OPTIONS and if the request URI does not contain an username. If both is true the request - will be answered stateless with "200 OK" and the capabilities from the + will be answered stateless with “200 OK” and the capabilities from the modules parameters. - It sends "500 Server Internal Error" for some errors and returns false + It sends “500 Server Internal Error” for some errors and returns false if it is called for a wrong request. The check for the request method and the missing username is optional @@ -438,7 +442,7 @@ if (uri==myself) { } ... -4.3. is_user(username) +4.3. is_user(username) Check if the username in credentials matches the given username. @@ -454,7 +458,7 @@ if (is_user("john")) { }; ... -4.4. has_totag() +4.4. has_totag() Check if To header field uri contains tag parameter. @@ -467,7 +471,7 @@ if (has_totag()) { }; ... -4.5. uri_param(param) +4.5. uri_param(param) Find if Request URI has a given parameter with no value @@ -483,7 +487,7 @@ if (uri_param("param1")) { }; ... -4.6. uri_param(param,value) +4.6. uri_param(param,value) Find if Request URI has a given parameter with matching value @@ -500,12 +504,12 @@ if (uri_param("param1","value1")) { }; ... -4.7. add_uri_param(param) +4.7. add_uri_param(param) Add to RURI a parameter (name=value); Meaning of the parameters is as follows: - * param - parameter to be appended in "name=value" format. + * param - parameter to be appended in “name=value” format. This function can be used from REQUEST_ROUTE. @@ -514,7 +518,7 @@ if (uri_param("param1","value1")) { add_uri_param("nat=yes"); ... -4.8. get_uri_param(name, var) +4.8. get_uri_param(name, var) Get the value of RURI parameter. @@ -529,7 +533,7 @@ add_uri_param("nat=yes"); get_uri_param("nat", "$var(nat)"); ... -4.9. tel2sip(uri, hostpart, result) +4.9. tel2sip(uri, hostpart, result) Converts URI in first param (pseudo variable or string) to SIP URI, if it is a tel URI. If conversion was done, writes resulting SIP URI to @@ -561,7 +565,7 @@ tel2sip("$ru", $fd", "$ru"); # $ru: sip:+12345678;ext=200;isub=+123-456@foo.com;user=phone ... -4.10. is_e164(pseudo-variable) +4.10. is_e164(pseudo-variable) Checks if string value of pseudo variable argument is an E164 number. @@ -579,7 +583,7 @@ if (is_e164("$avp(i:705)") { }; ... -4.11. is_uri_user_e164(pseudo-variable) +4.11. is_uri_user_e164(pseudo-variable) Checks if userpart of URI stored in pseudo variable is E164 number. @@ -596,7 +600,7 @@ if (is_uri_user_e164("$avp(i:705)") { }; ... -4.12. is_tel_number(tval) +4.12. is_tel_number(tval) Checks if the parameter value is a telephone number: starting with one optional +, followed by digits. The parameter can include variables. @@ -613,7 +617,7 @@ if (is_tel_number("+24242424") { } ... -4.13. is_numeric(tval) +4.13. is_numeric(tval) Checks if the parameter value consists solely of decimal digits. The parameter can include variables. @@ -627,7 +631,7 @@ if (is_numeric($rU)) { # Test if R-URI user consists of decimal digits } ... -4.14. encode_contact(encoding_prefix,hostpart) +4.14. encode_contact(encoding_prefix,hostpart) This function will encode uri-s inside Contact header in the following manner sip:username:password@ip:port;transport=protocol goes @@ -654,7 +658,7 @@ if (is_numeric($rU)) { # Test if R-URI user consists of decimal digits if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4"); ... -4.15. decode_contact() +4.15. decode_contact() This function will decode the request URI. If the RURI is in the format sip:encoding_prefix*username*ip*port*protocol@hostpart it will be @@ -672,7 +676,7 @@ if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4"); if (uri =~ "^sip:natted_client") { decode_contact(); } ... -4.16. decode_contact_header() +4.16. decode_contact_header() This function will decode URIs inside Contact header. If the URI in the format sip:encoding_prefix*username*ip*port*protocol@hostpart it will @@ -694,7 +698,7 @@ reply_route[2] { } ... -4.17. cmp_uri(str1, str2) +4.17. cmp_uri(str1, str2) The function returns true if the two parameters matches as SIP URI. @@ -708,7 +712,7 @@ if(cmp_uri("$ru", "sip:kamailio@kamailio.org")) } ... -4.18. cmp_aor(str1, str2) +4.18. cmp_aor(str1, str2) The function returns true if the two parameters matches as AoR. The parameters have to be SIP URIs. @@ -723,7 +727,7 @@ if(cmp_aor("$rU@KaMaIlIo.org", "sip:kamailio@$fd")) } ... -4.19. append_rpid_hf() +4.19. append_rpid_hf() Appends to the message a Remote-Party-ID header that contains header 'Remote-Party-ID: ' followed by the saved value of the SIP URI received @@ -739,9 +743,9 @@ if(cmp_aor("$rU@KaMaIlIo.org", "sip:kamailio@$fd")) append_rpid_hf(); # Append Remote-Party-ID header field ... -4.20. append_rpid_hf(prefix, suffix) +4.20. append_rpid_hf(prefix, suffix) - This function is the same as Section 4.19, " append_rpid_hf()". The + This function is the same as Section 4.19, “ append_rpid_hf()”. The only difference is that it accepts two parameters--prefix and suffix to be added to Remote-Party-ID header field. This function ignores rpid_prefix and rpid_suffix parameters, instead of that allows to set @@ -764,7 +768,7 @@ append_rpid_hf(); # Append Remote-Party-ID header field append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes"); ... -4.21. is_rpid_user_e164() +4.21. is_rpid_user_e164() The function checks if the SIP URI received from the database or radius server and will potentially be used in Remote-Party-ID header field @@ -781,7 +785,7 @@ if (is_rpid_user_e164()) { }; ... -4.22. set_uri_user(uri, user) +4.22. set_uri_user(uri, user) Sets userpart of SIP URI stored in writable pseudo variable 'uri' to value of pseudo variable 'user'. @@ -795,7 +799,7 @@ $var(user) = "new_user"; set_uri_user("$var(uri)", "$var(user)"); ... -4.23. set_uri_host(uri, host) +4.23. set_uri_host(uri, host) Sets hostpart of SIP URI stored in writable pseudo variable 'uri' to value of pseudo variable 'host'. @@ -809,7 +813,7 @@ $var(host) = "new_host"; set_uri_host("$var(uri)", "$var(host)"); ... -4.24. is_request() +4.24. is_request() Return true if the SIP message is a request. @@ -822,7 +826,7 @@ if (is_request()) { } ... -4.25. is_reply() +4.25. is_reply() Return true if the SIP message is a reply. @@ -835,7 +839,7 @@ if (is_reply()) { } ... -4.26. is_gruu([uri]) +4.26. is_gruu([uri]) The function returns true if the uri is GRUU ('gr' parameter is present): 1 - pub-gruu; 2 - temp-gruu. @@ -851,7 +855,7 @@ if (is_reply()) { if(is_gruu()) { ... } ... -4.27. is_supported(option) +4.27. is_supported(option) Function returns true if given option is listed in Supported header(s) (if any) of the request. Currently the following options are known: @@ -864,7 +868,7 @@ if(is_gruu()) { ... } if (is_supported("outbound")) { ... } ... -4.28. is_first_hop() +4.28. is_first_hop() The function returns true if the proxy is first hop after the original sender. For incoming SIP requests, it means there is only one Via @@ -881,7 +885,7 @@ if (is_supported("outbound")) { ... } if(is_first_hop()) { ... } ... -4.29. sip_p_charging_vector(flags) +4.29. sip_p_charging_vector(flags) Manage the P-Charging-Vector header (RFC3455). The flags can be: 'r' - remove; 'g' - generate; 'f' - force (remove + generate). diff --git a/modules/sl/README b/modules/sl/README index a45dc335c..520a9e07c 100644 --- a/modules/sl/README +++ b/modules/sl/README @@ -8,7 +8,7 @@ Daniel-Constantin Mierla asipto.com - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -185,7 +185,7 @@ modparam("sl", "bind_tm", 0) # feature disabled 3.3. sl_reply_error() 3.4. sl_forward _reply([ code, [ reason ] ]) -3.1. sl_send_reply(code, reason) +3.1. sl_send_reply(code, reason) For the current request, a reply is sent back having the given code and text reason. The reply is sent stateless, totally independent of the @@ -211,7 +211,7 @@ modparam("sl", "bind_tm", 0) # feature disabled sl_send_reply("404", "Not found"); ... -3.2. send_reply(code, reason) +3.2. send_reply(code, reason) For the current request, a reply is sent back having the given code and text reason. The reply is sent stateful or stateless, depending of the @@ -233,7 +233,7 @@ send_reply("404", "Not found"); send_reply("403", "Invalid user - $fU"); ... -3.3. sl_reply_error() +3.3. sl_reply_error() Sends back an error reply describing the nature of the last internal error. Usually this function should be used after a script function @@ -244,7 +244,7 @@ send_reply("403", "Invalid user - $fU"); sl_reply_error(); ... -3.4. sl_forward _reply([ code, [ reason ] ]) +3.4. sl_forward _reply([ code, [ reason ] ]) Forward statelessy the current received SIP reply, with the option to change the status code and reason text. The new code has to be in the diff --git a/modules/sms/README b/modules/sms/README index 316846e37..24f278f34 100644 --- a/modules/sms/README +++ b/modules/sms/README @@ -1,12 +1,11 @@ - SMS Module Bogdan Iancu FhG FOKUS - Copyright 2003 FhG FOKUS - _________________________________________________________________ + Copyright © 2003 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -32,8 +31,8 @@ Bogdan Iancu 4. Functions - 4.1. sms_send_msg_to_net(network_name) - 4.2. sms_send_msg() + 4.1. sms_send_msg_to_net(network_name) + 4.2. sms_send_msg() List of Examples @@ -72,8 +71,8 @@ Chapter 1. Admin Guide 4. Functions - 4.1. sms_send_msg_to_net(network_name) - 4.2. sms_send_msg() + 4.1. sms_send_msg_to_net(network_name) + 4.2. sms_send_msg() 1. Overview @@ -81,54 +80,54 @@ Chapter 1. Admin Guide 1.2. Numbering Plan 1.3. Address Mapping - This module provides a way of communication between SIP network (via + This module provides a way of communication between SIP network (via SIP MESSAGE) and GSM networks (via ShortMessageService). Communication - is possible from SIP to SMS and vice versa. The module provides - facilities like SMS confirmation--the gateway can confirm to the SIP - user if his message really reached its destination as a SMS--or - multi-part messages--if a SIP messages is too long it will be split - and sent as multiple SMS. - - Errors occurred because of an invalid number or a too long message or - because of an internal modem malfunction are reported back to the SIP + is possible from SIP to SMS and vice versa. The module provides + facilities like SMS confirmation--the gateway can confirm to the SIP + user if his message really reached its destination as a SMS--or + multi-part messages--if a SIP messages is too long it will be split and + sent as multiple SMS. + + Errors occurred because of an invalid number or a too long message or + because of an internal modem malfunction are reported back to the SIP user via a SIP message containing explanations regarding the error. 1.1. Hardware Requirements - The SMS module needs a GSM modem to be able to send/receive the SMS - messages. Usually, this kind of modems are externals, linked to the - machine via serial cable. The modem can be a dedicated one (as the - ones provided by FALCOM) or can be a GSM telephone that has an - internal modem (as the latest mobile phones from NOKIA and ERICSSON). + The SMS module needs a GSM modem to be able to send/receive the SMS + messages. Usually, this kind of modems are externals, linked to the + machine via serial cable. The modem can be a dedicated one (as the ones + provided by FALCOM) or can be a GSM telephone that has an internal + modem (as the latest mobile phones from NOKIA and ERICSSON). 1.2. Numbering Plan - The gateway accepts and advertises phone numbers in international - format, more specific like: +(international code)(area code)(number). - Ex: Germany, D1 = +49 170 5678181 Romania, Connex = +40 722 123456 A - number in this format is expected to be placed as username into RURI - or in the To header. If RURI misses the username, the To header will - be consider. Also, the gateway will advertise in this format the - username in Contact headers (in SIP replies and requests) and in From - headers (in SIP requests). + The gateway accepts and advertises phone numbers in international + format, more specific like: +(international code)(area code)(number). + Ex: Germany, D1 = +49 170 5678181 Romania, Connex = +40 722 123456 A + number in this format is expected to be placed as username into RURI or + in the To header. If RURI misses the username, the To header will be + consider. Also, the gateway will advertise in this format the username + in Contact headers (in SIP replies and requests) and in From headers + (in SIP requests). 1.3. Address Mapping - To identify the destination number of the SMS, the gateway expects to - have a mobile number in username of the SIP destination address (for - example sip:+401704678811@iptel.org). For the reverse direction, - because the gateway has only one GSM number, the destination SIP - address has to be encapsulated into the SMS body. The gateway expects - to find a SIP address at the beginning of the SMS body in - "sip:user.host" format. Everything before the SIP address will be - discarded, the useful text begins exactly after the address (for - example SMS="For sip:user@host hello world!!" -> SIP="hello world"), - view configuration for disable this behavior (modems parameters 's' y - 't'). In order to facilitate replying, the gateway sends all the SMS - messages with a header containing the source SIP address in the - following format: "From sip:user@host (if you reply DONOT remove - it)". When an SMS-reply is received having this header (all - of it or truncated at the end), the header will be left out (it will + To identify the destination number of the SMS, the gateway expects to + have a mobile number in username of the SIP destination address (for + example sip:+401704678811@iptel.org). For the reverse direction, + because the gateway has only one GSM number, the destination SIP + address has to be encapsulated into the SMS body. The gateway expects + to find a SIP address at the beginning of the SMS body in + "sip:user.host" format. Everything before the SIP address will be + discarded, the useful text begins exactly after the address (for + example SMS="For sip:user@host hello world!!" -> SIP="hello world"), + view configuration for disable this behavior (modems parameters 's' y + 't'). In order to facilitate replying, the gateway sends all the SMS + messages with a header containing the source SIP address in the + following format: "From sip:user@host (if you reply DONOT remove + it)". When an SMS-reply is received having this header (all + of it or truncated at the end), the header will be left out (it will not be in the SIP message). 2. Dependencies @@ -156,22 +155,22 @@ list_of_params = modem_param *( ";" modem_param ) modem_param = name "=" value The following parameters can be used: - * d=device (mandatory) - Device associated with modem (/dev/ttyS0, + * d=device (mandatory) - Device associated with modem (/dev/ttyS0, /dev/modem, etc.). * p=pin (optional) - SIM PIN - default is NULL. * m=mode (optional) - Modem working mode ("ASCII","OLD","DIGICOM","NEW"). Default value is "NEW". - * c=SMS_Center (optional) - SMS center number for that modem. - Default is the SMS center set on the SIM card. + * c=SMS_Center (optional) - SMS center number for that modem. Default + is the SMS center set on the SIM card. * b=baudrate (optional) - Default is 19600. - * r=retry (optional) - How many times to try to re-send a SMS that + * r=retry (optional) - How many times to try to re-send a SMS that reported error. Default is twice. - * l=looping (optional) - Time for modem to wait before performing a + * l=looping (optional) - Time for modem to wait before performing a new check for incomimg/outgoing SMS/SIP_MSG. Default is 20. * t=to (optional) - uri for sip header TO. Default is NULL. * s=scan (optional) - Values: 0: NOT SCAN uri from body sms, use URI - in t=to. 1: SCAN uri from body sms (normal mode, default mode, - clasic mode) 2: SCAN MIX (both modes), First SCAN Default is 1 + in t=to. 1: SCAN uri from body sms (normal mode, default mode, + clasic mode) 2: SCAN MIX (both modes), First SCAN Default is 1 (SCAN). Note @@ -194,14 +193,14 @@ list_of_params = set_param *( ";" set_param ) set_param = name "=" value The following parameters can be used: - * m=msx_sms_per_call (optional) - Maximum number of SMS send / - received from that net in one modem loop. Default is 10. This + * m=msx_sms_per_call (optional) - Maximum number of SMS send / + received from that net in one modem loop. Default is 10. This parameter was introduced to avoid starvation. - Example of the starvation--a modem can send SMS for more than 1 - networks. If you have a huge number of SMS for the first network - and the number of incoming SIP messages is equal to the sent SMS - per same unit of time, the modem will never get to send SMS for - the next networks. + Example of the starvation--a modem can send SMS for more than 1 + networks. If you have a huge number of SMS for the first network + and the number of incoming SIP messages is equal to the sent SMS + per same unit of time, the modem will never get to send SMS for the + next networks. Note @@ -229,15 +228,15 @@ modparam("sms", "links", "NOKIA[D1;d2]") ... The modem NOKIA will send SMS from D1 and D2 net (in this order !). if - in a net queue are more then max_sms_per_call SMS the modem will not + in a net queue are more then max_sms_per_call SMS the modem will not sleep before starting the next loop ! Shortly, if messages are waiting to be sent, the modem will not go in sleep. 3.4. default_net (string) - The default network to use. If no one specified, the first defined - network is used. This parameter is useful only if the "sms_send_msg" - exported function is used (see Section 4, "Functions"). + The default network to use. If no one specified, the first defined + network is used. This parameter is useful only if the "sms_send_msg" + exported function is used (see Section 4, “Functions”). Example 1.4. Set default_net parameter ... @@ -246,7 +245,7 @@ modparam("sms", "default_net", "D1") 3.5. max_sms_parts (integer) - Shows in how many parts (SMS messages) a SIP message can be split. If + Shows in how many parts (SMS messages) a SIP message can be split. If exceeded, the SIP message will be sent truncated and the SIP user will get back another message containing the unsent part. @@ -259,9 +258,9 @@ modparam("sms", "max_sms_parts", 10) 3.6. domain_str (string) - Specify a fake domain name to be used by the gateway. The Contact - headers and the From header from request will be construct based on - this fake domain name. It's useful when the gateway is transparently + Specify a fake domain name to be used by the gateway. The Contact + headers and the From header from request will be construct based on + this fake domain name. It's useful when the gateway is transparently hidden behind a proxy/register (located on different machines). Default is the name of the machine the gateway is running on. @@ -285,14 +284,14 @@ modparam("sms", "use_contact", 1) 3.8. sms_report_type (integer) - If the modem should ask for SMS confirmation from the SMS Center. If - the SMSC reply with an error code, the gateway will send back to SIP - user a SIP message containing the text (or part of it) that couldn't - be send. Two report mechanisms are implemented: + If the modem should ask for SMS confirmation from the SMS Center. If + the SMSC reply with an error code, the gateway will send back to SIP + user a SIP message containing the text (or part of it) that couldn't be + send. Two report mechanisms are implemented: * 1 - the reports are delivered by the GSM device as SMS reports (so far supported only by Nokia modems); - * 2 - the reports are delivered as async. CDS responses (supported - by almost all modems, except Ericsson). + * 2 - the reports are delivered as async. CDS responses (supported by + almost all modems, except Ericsson). Default is 0 (no report). @@ -303,12 +302,12 @@ modparam("sms", "sms_report_type", 1) 4. Functions - 4.1. sms_send_msg_to_net(network_name) - 4.2. sms_send_msg() + 4.1. sms_send_msg_to_net(network_name) + 4.2. sms_send_msg() 4.1. sms_send_msg_to_net(network_name) - Put the SIP msg in the specified network queue. The function return + Put the SIP msg in the specified network queue. The function return error if the number encapsulated into SIP message is malformed, if the content_type is incorrect or because of some internal failures. diff --git a/modules/sms/libsms_modem.c b/modules/sms/libsms_modem.c index d0f5b339e..e9d88fa4e 100644 --- a/modules/sms/libsms_modem.c +++ b/modules/sms/libsms_modem.c @@ -74,7 +74,9 @@ int put_command( struct modem *mdm, char* cmd, int cmd_len, char* answer, LM_DBG("-<%d>-->[%.*s] \n",cmd_len,cmd_len,cmd); #endif /* send the command to the modem */ - write(mdm->fd,cmd,cmd_len); + if (write(mdm->fd,cmd,cmd_len)<0) { + LM_ERR("write error: %s\n", strerror(errno)); + } tcdrain(mdm->fd); /* read from the modem */ diff --git a/modules/smsops/README b/modules/smsops/README index 182525a4c..2bb6df878 100644 --- a/modules/smsops/README +++ b/modules/smsops/README @@ -11,7 +11,7 @@ Carsten Bock - Copyright 2015 Carsten Bock, ng-voice GmbH + Copyright © 2015 Carsten Bock, ng-voice GmbH __________________________________________________________________ Table of Contents diff --git a/modules/snmpstats/README b/modules/snmpstats/README index 12d2c3189..07770b7ac 100644 --- a/modules/snmpstats/README +++ b/modules/snmpstats/README @@ -12,9 +12,9 @@ Edited by Olle E. Johansson - Copyright 2006 SOMA Networks, Inc. + Copyright © 2006 SOMA Networks, Inc. - Copyright 2013 Edvina AB, Sollentuna, Sweden + Copyright © 2013 Edvina AB, Sollentuna, Sweden __________________________________________________________________ Table of Contents @@ -390,7 +390,7 @@ modparam("snmpstats", "MsgQueueMajorThreshold", 5000) the master agent. You can use this parameter to set the path to your instance of NetSNMP's snmpget program. - Default value is "/usr/local/bin/". + Default value is “/usr/local/bin/”. Example 1.6. Setting the snmpgetPath parameter ... @@ -404,7 +404,7 @@ modparam("snmpstats", "snmpgetPath", "/my/custom/path/") the master agent. If you have defined a custom community string for the snmp daemon, you need to specify it with this parameter. - Default value is "public". + Default value is “public”. Example 1.7. Setting the snmpCommunity parameter ... @@ -417,7 +417,7 @@ modparam("snmpstats", "snmpCommunity", "customCommunityString") parameter is set to 1. This will result in more memory usage and bigger exporter structure. - Default value is "0" (don't export). + Default value is “0” (don't export). Example 1.8. Setting the export_registrar parameter ... @@ -442,7 +442,7 @@ modparam("snmpstats", "export_registrar", 1) There are several things that need to be done to get the SNMPStats module compiled and up and running. -6.1. Compiling the SNMPStats Module +6.1. Compiling the SNMPStats Module In order for the SNMPStats module to compile, you will need at least version 5.3 of the NetSNMP source code. The source can be found at: @@ -464,7 +464,7 @@ modparam("snmpstats", "export_registrar", 1) recommended you install NetSNMP from source to avoid bringing in excessive dependencies to the SNMPStats module. -6.2. Configuring NetSNMP to allow connections from the SNMPStats module. +6.2. Configuring NetSNMP to allow connections from the SNMPStats module. The SNMPStats module will communicate with the NetSNMP Master Agent. This communication happens over a protocol known as AgentX. This means @@ -496,7 +496,7 @@ modparam("snmpstats", "export_registrar", 1) This tells NetSNMP to act as a master agent, listening on the localhost UDP interface at port 705. -6.3. Configuring the SNMPStats module for communication with a Master Agent +6.3. Configuring the SNMPStats module for communication with a Master Agent The previous section explained how to set up a NetSNMP master agent to accept AgentX connections. We now need to tell the SNMPStats module how @@ -516,7 +516,7 @@ modparam("snmpstats", "export_registrar", 1) be present on the same machine as Kamailio. localhost could be replaced with any other machine. -6.4. Testing for a proper Configuration +6.4. Testing for a proper Configuration As a quick test to make sure that the SNMPStats module sub-agent can succesfully connect to the NetSNMP Master agent, start snmpd with the @@ -773,4 +773,4 @@ Name How can I report a bug? Please follow the guidelines provided at: - http://sip-router.org/tracker. + https://github.com/kamailio/kamailio/issues. diff --git a/modules/speeddial/README b/modules/speeddial/README index 8ab20d18d..fa3027b4f 100644 --- a/modules/speeddial/README +++ b/modules/speeddial/README @@ -10,7 +10,7 @@ Elena-Ramona Modroiu - Copyright 2004 Voice Sistem SRL + Copyright © 2004 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -134,7 +134,7 @@ modparam("speeddial", "db_url", "mysql://openser:xxx@localhost/openser") The name of column storing the user name of the owner of the speed dial record. - Default value is "username". + Default value is “username”. Example 1.2. Set user_column parameter ... @@ -146,7 +146,7 @@ modparam("speeddial", "user_column", "userid") The name of column storing the domain of the owner of the speed dial record. - Default value is "domain". + Default value is “domain”. Example 1.3. Set domain_column parameter ... @@ -157,7 +157,7 @@ modparam("speeddial", "domain_column", "userdomain") The name of the column storing the user part of the short dial address. - Default value is "sd_username". + Default value is “sd_username”. Example 1.4. Set sd_user_column parameter ... @@ -168,7 +168,7 @@ modparam("speeddial", "sd_user_column", "short_user") The name of the column storing the domain of the short dial address. - Default value is "sd_domain". + Default value is “sd_domain”. Example 1.5. Set sd_domain_column parameter ... @@ -180,7 +180,7 @@ modparam("speeddial", "sd_domain_column", "short_domain") The name of the column containing the URI that will be use to replace the short dial URI. - Default value is "new_uri". + Default value is “new_uri”. Example 1.6. Set new_uri_column parameter ... @@ -217,7 +217,7 @@ modparam("speeddial", "use_domain", 1) 4.1. sd_lookup(table [, owner]) -4.1. sd_lookup(table [, owner]) +4.1. sd_lookup(table [, owner]) The function lookups the short dial number from R-URI in 'table' and replaces the R-URI with associated address. diff --git a/modules/sqlops/README b/modules/sqlops/README index ccf03b341..b04f8eabc 100644 --- a/modules/sqlops/README +++ b/modules/sqlops/README @@ -11,7 +11,7 @@ Daniel-Constantin Mierla - Copyright 2008 http://www.asipto.com + Copyright © 2008 http://www.asipto.com __________________________________________________________________ Table of Contents @@ -97,7 +97,7 @@ Chapter 1. Admin Guide * Access via pseudo-variables - the content of the SQL query result is accessible via pseudo-variables. Please note that only integer and string variables are supported at the moment because of the - internal usage of "AVPs" to hold the values. So it is not possible + internal usage of “AVPs” to hold the values. So it is not possible for example to return floating point or big integer values this way. * Array indexes - fast access to result values via array position: @@ -138,7 +138,7 @@ Chapter 1. Admin Guide This parameter may be set multiple times to get many DB connections in the same configuration file. * connection_name - string specifying the name of a database - connection. This string is used by the "sql_query()" function to + connection. This string is used by the “sql_query()” function to refer to the DB connection. * database_url - Standardized Kamailio database URL used to connect to database. @@ -180,11 +180,11 @@ modparam("sqlops", "sqlres", "ra") * 1 - query successful, at least one row in resultset (for SELECTs) * 2 - query successful, no rows returned -4.1. sql_query(connection, query[, result]) +4.1. sql_query(connection, query[, result]) Make an SQL query using 'connection' and store data in 'result'. * connection - the name of the connection to be used for the query - (defined via the "sqlcon" parameter). + (defined via the “sqlcon” parameter). * query - SQL query string or pseudo-variables containing SQL query. * result - string name to identify the result. Will be used by $dbr(...) pseudo-variable to access result attributes. If omitted, @@ -203,11 +203,11 @@ xlog("number of rows in table domain: $dbr(ra=>rows)\n"); sql_result_free("ra"); ... -4.2. sql_xquery(connection, query, result) +4.2. sql_xquery(connection, query, result) Make an SQL query using 'connection' and store data in 'result' xavp. * connection - the name of the connection to be used for the query - (defined via the "sqlcon" parameter). + (defined via the “sqlcon” parameter). * query - SQL query string or pseudo-variables containing SQL query. * result - string name to identify the result xavp. Each row will be added to this xavp, each column can be accessed by its name. @@ -226,15 +226,15 @@ if (sql_xquery("ca", "select * from domain", "ra") == 1) { } .. -4.3. sql_pvquery(connection, query, result) +4.3. sql_pvquery(connection, query, result) Make an SQL query using 'connection' and store data in arbitrary pseudo variables specified by 'result' parameter. * connection - the name of the connection to be used for query - (defined via the "sqlcon" parameter). + (defined via the “sqlcon” parameter). * query - SQL query string or pseudo-variables containing SQL query. * result - a list with PV names where to store the result. The format - is "$pv;$pv;...". Every PV that is writable may be used (for + is “$pv;$pv;...”. Every PV that is writable may be used (for example $var, $avp, $xavp, $ru, $du, $sht, etc). The PV are assigned values in the following order: last row to first row, first field to last field. Assignment has the same @@ -248,7 +248,9 @@ if (sql_xquery("ca", "select * from domain", "ra") == 1) { the type of the columns. Please note that only these two datatypes are supported, other datatypes will/may be converted to string. - This function can be used from ANY_ROUTE. + This function can be used from ANY_ROUTE. Returns -1 on Error, 1 on + successful query, 2 if query provided no result set, 3 if result is + ignored (no result parameter given) Example 1.5. sql_pvquery() usage ... @@ -258,7 +260,7 @@ sql_pvquery("ca", "select 'col1', 2, NULL, 'sip:test@example.com'", "$var(a), $avp(col2), $xavp(item[0]=>s), $ru"); ... -4.4. sql_result_free(result) +4.4. sql_result_free(result) Free data in SQL 'result'. @@ -274,7 +276,7 @@ xlog("number of rows in table domain: $dbr(ra=>rows)\n"); sql_result_free("ra"); ... -4.5. sql_query_async(connection, query) +4.5. sql_query_async(connection, query) Make an async SQL query using 'connection', if implemented by db driver module (e.g., db_mysql). The query is executed in another process and @@ -283,7 +285,7 @@ sql_result_free("ra"); update...). Note that async_workers core parameter must be set in order to enable the asyncronous framework needed by this function. * connection - the name of the connection to be used for the query - (defined via "sqlcon" parameter). + (defined via “sqlcon” parameter). * query - SQL query string or pseudo-variables containing SQL query. This function can be used from ANY_ROUTE. @@ -304,10 +306,10 @@ sql_query_async("ca", "delete from domain"); Access hash table entries. - The "result" must be the name identifying a SQL result (third parameter + The “result” must be the name identifying a SQL result (third parameter of sql_query(...)). - The "key" can be: + The “key” can be: * rows - return the number of rows in query result * cols - return the number of columns in the result. * [row,col] - return the value at position (row,col) in the result @@ -372,7 +374,7 @@ if (sql_xquery("ca", "select * from domain", "ra") == 1) connection. It's primary use is to get the number of rows affected by UPDATE, INSERT and DELETE queries. - "con" must be the name identifying a DB connection. + “con” must be the name identifying a DB connection. Example 1.9. $sqlrows(con) usage ... diff --git a/modules/sqlops/doc/sqlops_admin.xml b/modules/sqlops/doc/sqlops_admin.xml index bb9011bd0..824d7a922 100644 --- a/modules/sqlops/doc/sqlops_admin.xml +++ b/modules/sqlops/doc/sqlops_admin.xml @@ -338,7 +338,9 @@ if (sql_xquery("ca", "select * from domain", "ra") == 1) { - This function can be used from ANY_ROUTE. + This function can be used from ANY_ROUTE. Returns -1 on Error, + 1 on successful query, 2 if query provided no result set, + 3 if result is ignored (no result parameter given) <function>sql_pvquery()</function> usage diff --git a/modules/sqlops/sqlops.c b/modules/sqlops/sqlops.c index 3ca35090e..61ba89a22 100644 --- a/modules/sqlops/sqlops.c +++ b/modules/sqlops/sqlops.c @@ -26,10 +26,9 @@ */ /*! \defgroup sqlops Kamailio :: SQL Operations - * \note Kamailio module - part of modules_k - + * * The module adds support for raw SQL queries in the configuration file. - + * */ diff --git a/modules/sst/README b/modules/sst/README index da1ff6f6b..77eee87a2 100644 --- a/modules/sst/README +++ b/modules/sst/README @@ -8,7 +8,7 @@ Edited by Ron Winacott - Copyright 2006 SOMA Networks, Inc. + Copyright © 2006 SOMA Networks, Inc. __________________________________________________________________ Table of Contents @@ -99,7 +99,7 @@ Chapter 1. Admin Guide 2. How it works - The sst module uses the "dialog module" to be notified of any new or + The sst module uses the “dialog module” to be notified of any new or updated dialogs. It will then look for and extract the session-expire: header value (if there is one) and override the dialog expire timer value for the current context dialog by setting the avp value. @@ -111,10 +111,10 @@ Chapter 1. Admin Guide All of this happens with a properly configured dialog and sst module and setting the dialog flag and the sst flag at the time any INVITE sip message is seen. There is no kamailio.cfg script function call required - to set the dialog expire timeout value. See the "dialog module" users + to set the dialog expire timeout value. See the “dialog module” users guide for more information. - The "sstCheckMin()" script function can be used to verify that the + The “sstCheckMin()” script function can be used to verify that the Session-expires / MIN-SE header field values are not too small for your server. If the SST min_se parameter value is smaller than the messages Session-Expires / MIN-SE values, the test will return true. You can @@ -193,7 +193,7 @@ Chapter 1. Admin Guide variables, the module provide information about the dialog processing. Set it to zero to disable or to non-zero to enable it. - Default value is "1" (enabled). + Default value is “1” (enabled). Example 1.2. Set enable_stats parameter ... @@ -204,13 +204,13 @@ modparam("sst", "enable_stats", 0) The value is used to set the proxies MIN-SE value and is used in the 422 error reply as the proxys MIN-SE: header value if the - "sstCheckMin()" flag is set to true and the check fails. + “sstCheckMin()” flag is set to true and the check fails. - If not set and "sstCheckMin()" is called with the send-reply flag set + If not set and “sstCheckMin()” is called with the send-reply flag set to true, the default 1800 seconds will be used as the compare and the MIN-SE: header value if the 422 reply is sent. - Default value is "1800" seconds. + Default value is “1800” seconds. Example 1.3. Set min_se parameter ... @@ -226,7 +226,7 @@ modparam("sst", "min_se", 2400) This is how the sst module knows which avp in the dialog module it has to change with the new expire value. - Default value is "NULL!" it is not set by default. + Default value is “NULL!” it is not set by default. Example 1.4. Set timeout_avp parameter ... @@ -240,14 +240,14 @@ modparam("sst", "timeout_avp", "$avp(i:10)") In the initial INVITE if the UAC has requested a Session-Expire: and it's value is smaller than our local policies Min-SE (see min_se above), then the proxy has the right to reject the call by replying to - the message with a "422 Session Timer Too Small" and state our local + the message with a “422 Session Timer Too Small” and state our local Min-SE: value. The INVITE is NOT forwarded on through the proxy. If this flag is true, the SST module to reject the INVITE with a 422 response. If false, the INVITE is forwarded through the PROXY without any modifications. - Default value is "1" (true/on). + Default value is “1” (true/on). Example 1.5. Set reject_to_small parameter ... @@ -268,7 +268,7 @@ modparam("sst", "reject_to_small", 0) This parameter must be set or the module will not load. - Default value is "Not set!". + Default value is “Not set!”. Example 1.6. Set sst_flag parameter ... @@ -288,7 +288,7 @@ route { 5.1. sstCheckMin(send_reply_flag) -5.1. sstCheckMin(send_reply_flag) +5.1. sstCheckMin(send_reply_flag) Check the current Session-Expires / MIN-SE values against the sst_min_se parameter value. If the Session-Expires or MIN_SE header diff --git a/modules/statistics/README b/modules/statistics/README index 03798f021..68aefb1db 100644 --- a/modules/statistics/README +++ b/modules/statistics/README @@ -8,7 +8,7 @@ Edited by Bogdan Iancu - Copyright 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents diff --git a/modules/statsc/README b/modules/statsc/README index c35bbe7f2..a546b56db 100644 --- a/modules/statsc/README +++ b/modules/statsc/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2016 asipto.com + Copyright © 2016 asipto.com __________________________________________________________________ Table of Contents @@ -129,13 +129,15 @@ modparam("statsc", "items", 200) Example 1.3. Set track parameter ... modparam("statsc", "track", "req.received=rcv_requests") +modparam("statsc", "track", "req.received=rcv_requests;rpl.received=rcv_replies" +) ... 4. RPC Commands 4.1. statsc.exec -4.1. statsc.exec +4.1. statsc.exec Get the report of recorded statistics. @@ -143,8 +145,8 @@ modparam("statsc", "track", "req.received=rcv_requests") Parameters: * _type_ : - + "list": list recorded values - + "diff": show diff between recorded values + + “list”: list recorded values + + “diff”: show diff between recorded values * _name_: (optional) name of the statistic to show the report for. If missing or set to 'all', then the reports for all recorded statistics are done. diff --git a/modules/statsd/README b/modules/statsd/README index 06dd6988f..3d7c8360c 100644 --- a/modules/statsd/README +++ b/modules/statsd/README @@ -104,7 +104,7 @@ modparam("statsd", "port", "8125") 3.5. statsd_incr(key) 3.6. statsd_decr(key) -3.1. statsd_set(key, value) +3.1. statsd_set(key, value) Sets count the number of unique values passed to a key. @@ -122,13 +122,14 @@ failure_route[tryagain] { } ... -3.2. statsd_gauge(key, value) +3.2. statsd_gauge(key, value) Gauges are a constant data type. They are not subject to averaging, and - they don't change unless you change them. That is, once you set a gauge - value, it will be a flat line on the graph until you change it again. + they don’t change unless you change them. That is, once you set a + gauge value, it will be a flat line on the graph until you change it + again. - Gauges are useful for things that are already averaged, or don't need + Gauges are useful for things that are already averaged, or don’t need to reset periodically This function can be used in ALL ROUTES. @@ -141,7 +142,7 @@ route [gauge_method]{ statsd_gauge("customer_credit"+$var(customer),"$var(customer_credit)"); } -3.3. statsd_start(key) +3.3. statsd_start(key) statsd start set a avp with the key name, and when you use statsd_stop(key), module will send to statsd the difference in @@ -153,7 +154,7 @@ route [gauge_method]{ the statsd server collects all timers under the stats.timers prefix, and will calculate the lower bound, mean, 90th percentile, upper bound, and count of each timer for each period (by the time you see it in - graphite, that's usually per minute). + graphite, that’s usually per minute). Example 1.5. statsd_start usage ... @@ -162,7 +163,7 @@ sql_query("ca", "select sleep(0.2)", "ra"); statsd_stop("long_mysql_query"); ... -3.4. statsd_stop(key) +3.4. statsd_stop(key) statsd_stop(key) get the avp string with the key and calculate the difference from the start time. When finish app send the milliseconds @@ -177,7 +178,7 @@ sql_query("ca", "select sleep(0.2)", "ra"); statsd_stop("long_mysql_query"); ... -3.5. statsd_incr(key) +3.5. statsd_incr(key) Increment a counter @@ -190,7 +191,7 @@ if(geoip_match("$si", "src")){ } ... -3.6. statsd_decr(key) +3.6. statsd_decr(key) Decrement a counter diff --git a/modules/stun/README b/modules/stun/README index d572a2f8f..b33fd5992 100644 --- a/modules/stun/README +++ b/modules/stun/README @@ -4,9 +4,9 @@ Peter Dunkley Crocodile RCS Ltd - Copyright 2013 Crocodile RCS Ltd + Copyright © 2013 Crocodile RCS Ltd - Copyright 2001-2003 FhG Fokus + Copyright © 2001-2003 FhG Fokus __________________________________________________________________ Table of Contents diff --git a/modules/tcpops/README b/modules/tcpops/README index b2a883a05..8fa8fc6aa 100644 --- a/modules/tcpops/README +++ b/modules/tcpops/README @@ -67,7 +67,7 @@ Chapter 1. Admin Guide Note: the keepalive functions only work on systems with the HAVE_TCP_KEEPIDLE, HAVE_TCP_KEEPCNT and HAVE_TCP_KEEPINTVL macros - defined (currently only Linux). + defined (Linux, FreeBSD, DragonFly BSD, NetBSD). 2. Parameters @@ -106,7 +106,7 @@ modparam("tcpops", "closed_event", 0) Check the state of a TCP or WS connection ID Meaning of the parameters is as follows: - * conid (optionnal): the Kamailio internal connection id (as in the + * conid (optional): the Kamailio internal connection id (as in the $conid pseudovariable). Retuns values: @@ -128,7 +128,7 @@ modparam("tcpops", "closed_event", 0) Check the state of a TCP or WS connection ID Meaning of the parameters is as follows: - * conid (optionnal): the Kamailio internal connection id (as in the + * conid (optional): the Kamailio internal connection id (as in the $conid pseudovariable). Retuns values: @@ -159,7 +159,7 @@ modparam("tcpops", "closed_event", 0) Enables keepalive on a TCP connection. Meaning of the parameters is as follows: - * conid (optionnal): the kamailio internal connection id on which TCP + * conid (optional): the kamailio internal connection id on which TCP keepalive will be enabled. If no parameter is given, the keepalive mechanism will be enabled on the current message source connection. * idle (seconds): the time before the first keepalive packet is sent @@ -194,7 +194,7 @@ onreply_route[foo] { Disables keepalive on a TCP connection. Meaning of the parameters is as follows: - * conid (optionnal): the kamailio internal connection id on which TCP + * conid (optional): the kamailio internal connection id on which TCP keepalive will be disabled. If no parameter is given, the keepalive mechanism will be disabled on the current message source connection. @@ -225,7 +225,7 @@ onreply_route[foo] { Sets the connection lifetime of a connection (TCP). Meaning of the parameters is as follows: - * conid (optionnal): the kamailio internal connection id on which to + * conid (optional): the kamailio internal connection id on which to set the new lifetime. If no parameter is given, it will be set on the current message source connection. * lifetime (seconds): the new connection lifetime. diff --git a/modules/textops/README b/modules/textops/README index 5cfe2b2d2..e6c09c9f3 100644 --- a/modules/textops/README +++ b/modules/textops/README @@ -23,7 +23,7 @@ Juha Heinanen - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -209,7 +209,7 @@ Chapter 1. Admin Guide 1.1. Known Limitations - search ignores folded lines. For example, search("(From|f):.*@foo.bar") + search ignores folded lines. For example, search(“(From|f):.*@foo.bar”) doesn't match the following From header field: From: medabeda ;tag=1234 @@ -274,7 +274,7 @@ From: medabeda 3.40. get_body_part_raw(content_type, opv) 3.41. remove_body_part(content_type) -3.1. search(re) +3.1. search(re) Searches for the re in the message. @@ -289,7 +289,7 @@ From: medabeda if ( search("[Ss][Ii][Pp]") ) { /*....*/ }; ... -3.2. search_body(re) +3.2. search_body(re) Searches for the re in the body of the message. @@ -304,7 +304,7 @@ if ( search("[Ss][Ii][Pp]") ) { /*....*/ }; if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ }; ... -3.3. search_hf(hf, re, flags) +3.3. search_hf(hf, re, flags) Searches for the re in the body of a header field. @@ -323,7 +323,7 @@ if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ }; if ( search_hf("From", ":test@", "a") ) { /*....*/ }; ... -3.4. search_append(re, txt) +3.4. search_append(re, txt) Searches for the first match of re and appends txt after it. @@ -339,7 +339,7 @@ if ( search_hf("From", ":test@", "a") ) { /*....*/ }; search_append("[Oo]pen[Ss]er", " SIP Proxy"); ... -3.5. search_append_body(re, txt) +3.5. search_append_body(re, txt) Searches for the first match of re in the body of the message and appends txt after it. @@ -356,7 +356,7 @@ search_append("[Oo]pen[Ss]er", " SIP Proxy"); search_append_body("[Oo]pen[Ss]er", " SIP Proxy"); ... -3.6. replace(re, txt) +3.6. replace(re, txt) Replaces the first occurrence of re with txt. @@ -372,7 +372,7 @@ search_append_body("[Oo]pen[Ss]er", " SIP Proxy"); replace("openser", "Kamailio SIP Proxy"); ... -3.7. replace_body(re, txt) +3.7. replace_body(re, txt) Replaces the first occurrence of re in the body of the message with txt. @@ -389,7 +389,7 @@ replace("openser", "Kamailio SIP Proxy"); replace_body("openser", "Kamailio SIP Proxy"); ... -3.8. replace_all(re, txt) +3.8. replace_all(re, txt) Replaces all occurrence of re with txt. @@ -405,7 +405,7 @@ replace_body("openser", "Kamailio SIP Proxy"); replace_all("openser", "Kamailio SIP Proxy"); ... -3.9. replace_body_all(re, txt) +3.9. replace_body_all(re, txt) Replaces all occurrence of re in the body of the message with txt. Matching is done on a per-line basis. @@ -422,7 +422,7 @@ replace_all("openser", "Kamailio SIP Proxy"); replace_body_all("openser", "Kamailio SIP Proxy"); ... -3.10. replace_body_atonce(re, txt) +3.10. replace_body_atonce(re, txt) Replaces all occurrence of re in the body of the message with txt. Matching is done over the whole body. @@ -441,7 +441,7 @@ if(has_body() && replace_body_atonce("^.+$", "")) remove_hf("Content-Type"); ... -3.11. subst('/re/repl/flags') +3.11. subst('/re/repl/flags') Replaces re with repl (sed or perl like). @@ -467,7 +467,7 @@ if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig') ) ... -3.12. subst_uri('/re/repl/flags') +3.12. subst_uri('/re/repl/flags') Runs the re substitution on the message uri (like subst but works only on the uri) @@ -495,7 +495,7 @@ if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=\0/i')){$ ... -3.13. subst_user('/re/repl/flags') +3.13. subst_user('/re/repl/flags') Runs the re substitution on the message uri (like subst_uri but works only on the user portion of the uri) @@ -522,7 +522,7 @@ if (subst_user('/(.*)3642$/$avp(user_prefix)\13642/')){$ ... -3.14. subst_body('/re/repl/flags') +3.14. subst_body('/re/repl/flags') Replaces re with repl (sed or perl like) in the body of the message. @@ -543,7 +543,7 @@ if ( subst_body('/^o=(.*) /o=$fU /') ) {}; ... -3.15. subst_hf(hf, subexp, flags) +3.15. subst_hf(hf, subexp, flags) Perl-like substitutions in the body of a header field. @@ -563,7 +563,7 @@ if ( subst_body('/^o=(.*) /o=$fU /') ) {}; if ( subst_hf("From", "/:test@/:best@/", "a") ) { /*....*/ }; ... -3.16. set_body(txt,content_type) +3.16. set_body(txt,content_type) Set body to a SIP message. @@ -580,7 +580,7 @@ if ( subst_hf("From", "/:test@/:best@/", "a") ) { /*....*/ }; set_body("test", "text/plain"); ... -3.17. set_reply_body(txt,content_type) +3.17. set_reply_body(txt,content_type) Set body to a SIP reply to be generated by Kamailio. @@ -597,7 +597,7 @@ set_body("test", "text/plain"); set_reply_body("test", "text/plain"); ... -3.18. filter_body(content_type) +3.18. filter_body(content_type) Filters multipart/mixed body by leaving out all other body parts except the first body part of given type. @@ -620,7 +620,7 @@ if (has_body("multipart/mixed")) { } ... -3.19. append_to_reply(txt) +3.19. append_to_reply(txt) Append txt as header to the reply. @@ -636,7 +636,7 @@ append_to_reply("Foo: bar\r\n"); append_to_reply("Foo: $rm at $Ts\r\n"); ... -3.20. append_hf(txt[, hdr]) +3.20. append_hf(txt[, hdr]) Appends 'txt' as header after first header field or after last 'hdr' header field. @@ -655,7 +655,7 @@ append_hf("P-hint: VOICEMAIL\r\n"); append_hf("From-username: $fU\r\n", "Call-ID"); ... -3.21. insert_hf(txt[, hdr]) +3.21. insert_hf(txt[, hdr]) Inserts 'txt' as header before the first header field or before first 'hdr' header field if 'hdr' is given. @@ -676,7 +676,7 @@ insert_hf("P-hint: VOICEMAIL\r\n", "Call-ID"); insert_hf("To-username: $tU\r\n", "Call-ID"); ... -3.22. append_urihf(prefix, suffix) +3.22. append_urihf(prefix, suffix) Append header field name with original Request-URI in middle. @@ -692,14 +692,14 @@ insert_hf("To-username: $tU\r\n", "Call-ID"); append_urihf("CC-Diversion: ", "\r\n"); ... -3.23. is_present_hf(hf_name) +3.23. is_present_hf(hf_name) Return true if a header field is present in message. Note The function is also able to distinguish the compact names. For exmaple - "From" will match with "f" + “From” will match with “f” Meaning of the parameters is as follows: * hf_name - Header field name.(long or compact form) @@ -712,7 +712,7 @@ Note if (is_present_hf("From")) log(1, "From HF Present"); ... -3.24. is_present_hf_re(hf_name_re) +3.24. is_present_hf_re(hf_name_re) Return true if a header field whose name matches regular expression 'hf_name_re' is present in message. @@ -728,12 +728,12 @@ if (is_present_hf("From")) log(1, "From HF Present"); if (is_present_hf_re("^P-")) log(1, "There are headers starting with P-\n"); ... -3.25. append_time() +3.25. append_time() Adds a time header to the reply of the request. You must use it before functions that are likely to send a reply, e.g., save() from - 'registrar' module. Header format is: "Date: %a, %d %b %Y %H:%M:%S - GMT", with the legend: + 'registrar' module. Header format is: “Date: %a, %d %b %Y %H:%M:%S + GMT”, with the legend: * %a abbreviated week of day name (locale) * %d day of month as decimal number * %b abbreviated month name (locale) @@ -752,10 +752,10 @@ if (is_present_hf_re("^P-")) log(1, "There are headers starting with P-\n"); append_time(); ... -3.26. append_time_to_request() +3.26. append_time_to_request() - Adds a time header to the request. Header format is: "Date: %a, %d %b - %Y %H:%M:%S GMT", with the legend: + Adds a time header to the request. Header format is: “Date: %a, %d %b + %Y %H:%M:%S GMT”, with the legend: * %a abbreviated week of day name (locale) * %d day of month as decimal number * %b abbreviated month name (locale) @@ -775,7 +775,7 @@ if(!is_present_hf("Date")) append_time_to_request(); ... -3.27. is_method(name) +3.27. is_method(name) Check if the method of the message matches the name. If name is a known method (invite, cancel, ack, bye, options, info, update, register, @@ -812,9 +812,9 @@ if(is_method("OPTION|UPDATE")) } ... -3.28. remove_hf(hname) +3.28. remove_hf(hname) - Remove from message all headers with name "hname". Header matching is + Remove from message all headers with name “hname”. Header matching is case-insensitive. Matches and removes also the compact header forms. Returns true if at least one header is found and removed. @@ -837,10 +837,10 @@ remove_hf("Contact") remove_hf("m") ... -3.29. remove_hf_re(re) +3.29. remove_hf_re(re) Remove from message all headers with name matching regular expression - "re" + “re” Returns true if at least one header is found and removed. @@ -858,16 +858,16 @@ if(remove_hf_re("^P-")) } ... -3.30. has_body(), has_body(mime) +3.30. has_body(), has_body(mime) The function returns true if the SIP message has a body attached. The - checked includes also the "Content-Length" header presence and value. + checked includes also the “Content-Length” header presence and value. If a parameter is given, the mime described will be also checked - against the "Content-Type" header. + against the “Content-Type” header. Meaning of the parameters is as follows: - * mime - mime to be checked against the "Content-Type" header. If not + * mime - mime to be checked against the “Content-Type” header. If not present or 0, this check will be disabled. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, @@ -881,7 +881,7 @@ if(has_body("application/sdp")) } ... -3.31. is_audio_on_hold() +3.31. is_audio_on_hold() The function returns true if the SIP message has a body attached and at least one audio stream in on hold. @@ -897,7 +897,7 @@ if(is_audio_on_hold()) } ... -3.32. is_privacy(privacy_type) +3.32. is_privacy(privacy_type) The function returns true if the SIP message has a Privacy header field that includes the given privacy_type among its privacy values. See @@ -915,7 +915,7 @@ if(is_privacy("id")) } ... -3.33. in_list(subject, list, separator) +3.33. in_list(subject, list, separator) Function checks if subject string is found in list string where list items are separated by separator string. Subject and list strings may @@ -933,7 +933,7 @@ if (in_list("$var(subject)", "$var(list)", ",") { } ... -3.34. cmp_str(str1, str2) +3.34. cmp_str(str1, str2) The function returns true if the two parameters matches as string case sensitive comparison. @@ -949,7 +949,7 @@ if(cmp_str("$rU", "kamailio")) } ... -3.35. cmp_istr(str1, str2) +3.35. cmp_istr(str1, str2) The function returns true if the two parameters matches as string case insensitive comparison. @@ -965,7 +965,7 @@ if(cmp_istr("$rU@you", "kamailio@YOU")) } ... -3.36. starts_with(str1, str2) +3.36. starts_with(str1, str2) The function returns true if the first string starts with the second string. @@ -981,7 +981,7 @@ if (starts_with("$rU", "+358")) } ... -3.37. set_body_multipart([txt,content_type][,boundary]) +3.37. set_body_multipart([txt,content_type][,boundary]) Set multipart body to a SIP message. If called with no parameters, will convert present body to multipart. @@ -1016,7 +1016,7 @@ text --delimiter ... -3.38. append_body_part(txt,content_type[, content_disposition]) +3.38. append_body_part(txt,content_type[, content_disposition]) Append a part on multipart body SIP message. Will use "unique-boundary-1" as boundary. @@ -1050,7 +1050,7 @@ Content-Disposition: signal;handling=required --unique-boundary-1 ... -3.39. get_body_part(content_type, opv) +3.39. get_body_part(content_type, opv) Return the content of a multipart body SIP message, storing it in opv. @@ -1068,7 +1068,7 @@ Content-Disposition: signal;handling=required get_body_part("application/vnd.cirpack.isdn-ext", "$var(pbody)"); ... -3.40. get_body_part_raw(content_type, opv) +3.40. get_body_part_raw(content_type, opv) Return the content of a multipart body SIP message, including headers and boundary string, storing it in opv. @@ -1087,7 +1087,7 @@ get_body_part("application/vnd.cirpack.isdn-ext", "$var(pbody)"); get_body_part("application/vnd.cirpack.isdn-ext", "$var(hbody)"); ... -3.41. remove_body_part(content_type) +3.41. remove_body_part(content_type) Remove a part on a multipart body SIP message. @@ -1124,10 +1124,10 @@ Chapter 2. Developer Guide 1.1. load_textops(*import_structure) -1.1. load_textops(*import_structure) +1.1. load_textops(*import_structure) For programmatic use only--import the Textops API. Meaning of the parameters is as follows: - * import_structure - Pointer to the import structure - see "struct - textops_binds" in modules/textops/api.h + * import_structure - Pointer to the import structure - see “struct + textops_binds” in modules/textops/api.h diff --git a/modules/textops/textops.c b/modules/textops/textops.c index 400b83622..99a4da881 100644 --- a/modules/textops/textops.c +++ b/modules/textops/textops.c @@ -973,7 +973,8 @@ static int filter_body_f(struct sip_msg* msg, char* _content_type, if (find_line_start(boundary.s, boundary.len, &start, &len)) { - if (del_lump(msg, start - msg->buf, len, 0) == 0) + /* we need to remove \r\n too */ + if (del_lump(msg, (start-2) - msg->buf, len+2, 0) == 0) { LM_ERR("deleting lump <%.*s> failed\n", len, start); goto err; diff --git a/modules/textopsx/README b/modules/textopsx/README index bbc859b0f..b3ab14c2a 100644 --- a/modules/textopsx/README +++ b/modules/textopsx/README @@ -9,7 +9,7 @@ Daniel-Constantin Mierla asipto.com - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -109,7 +109,7 @@ Chapter 1. Admin Guide 2.13. exclude_hf_value(hf, hvalue) 2.14. hf_value_exists(hf, hvalue) -2.1. msg_apply_changes() +2.1. msg_apply_changes() Use this function to apply changes performed on SIP message content. Be careful when using this function; due to special handling of changes to @@ -123,7 +123,12 @@ Chapter 1. Admin Guide no longer valid for config processing, like it happens when a broken message is received from network). - This function can be used from REQUEST_ROUTE or ONREPLY_ROUTE. + This function can be used from REQUEST_ROUTE or core REPLY_ROUTE. + + Note: It must be used before the transaction is created in + request_route and not inside the onreply_route[name] executed by tm + module. Also, do not used after resuming a suspended request or reply, + at that moment the transaction is already created. Example 1.1. msg_apply_changes() usage ... @@ -138,7 +143,7 @@ if(msg_apply_changes()) } ... -2.2. change_reply_status(code, reason) +2.2. change_reply_status(code, reason) Intercept a SIP reply (in an onreply_route) and change its status code and reason phrase prior to forwarding it. @@ -159,7 +164,7 @@ onreply_route { } ... -2.3. remove_body() +2.3. remove_body() Use this function to remove the body of SIP requests or replies. @@ -170,7 +175,7 @@ onreply_route { remove_body(); ... -2.4. keep_hf([regexp]) +2.4. keep_hf([regexp]) Remove headers that don't match the regular expression regexp. Several header are ignored always (thus not removed): Via, From, To, Call-ID, @@ -186,7 +191,7 @@ remove_body(); keep_hf("User-Agent"); ... -2.5. fnmatch(value, expr [, flags]) +2.5. fnmatch(value, expr [, flags]) Match the value against the expr using shell-style pattern for file name matching (see man page for C function fnmatch()). It is known to @@ -205,7 +210,7 @@ if(fnmatch("$rU", "123*")) } ... -2.6. append_hf_value(hf, hvalue) +2.6. append_hf_value(hf, hvalue) Append new header value after an existing header, if no index acquired append at the end of list. Note that a header may consist of comma @@ -225,7 +230,7 @@ append_hf_value("foo[-1]", "$var(Bar)") # try add value to the last header, if n ot exists add new header ... -2.7. insert_hf_value(hf, hvalue) +2.7. insert_hf_value(hf, hvalue) Insert new header value before an existing header, if no index acquired insert before first hf header. Note that a header may consist of comma @@ -245,7 +250,7 @@ insert_hf_value("foo", "$avp(foo)") # add new header at the top of list insert_hf_value("foo[1]", "gogo") # try add to the first header ... -2.8. remove_hf_value(hf_par) +2.8. remove_hf_value(hf_par) Remove the header value from existing header, Note that a header may consist of comma delimited list of values. @@ -264,7 +269,7 @@ remove_hf_value("foo.bar") # delete parameter remove_hf_value("foo[*].bar") # for each foo delete bar parameters ... -2.9. remove_hf_value2(hf_par) +2.9. remove_hf_value2(hf_par) Remove specified header or parameter. It is expected header in Authorization format (comma delimiters are not treated as multi-value @@ -285,7 +290,7 @@ remove_hf_value2("foo.bar") # delete parameter remove_hf_value2("foo[*].bar") # for each foo delete bar parameters ... -2.10. assign_hf_value(hf, hvalue) +2.10. assign_hf_value(hf, hvalue) Assign value to specified header value / param. @@ -307,7 +312,7 @@ assign_hf_value("foo[*]", "") # remove all foo's, empty value remains assign_hf_value("foo[*].bar", "") # set empty value (ex. lr) ... -2.11. assign_hf_value2(hf, hvalue) +2.11. assign_hf_value2(hf, hvalue) Assign value to specified header. It is expected header in Authorization format (comma delimiters are not treated as multi-value @@ -327,7 +332,7 @@ assign_hf_value2("foo[-1]", "gogo") # foo[last_foo] assign_hf_value2("foo[*].bar", "") # set empty value (ex. lr) ... -2.12. include_hf_value(hf, hvalue) +2.12. include_hf_value(hf, hvalue) Add value in set if not exists, eg. "Supported: path,100rel". @@ -340,7 +345,7 @@ assign_hf_value2("foo[*].bar", "") # set empty value (ex. lr) include_hf_value("Supported", "path"); ... -2.13. exclude_hf_value(hf, hvalue) +2.13. exclude_hf_value(hf, hvalue) Remove value from set if exists, eg. "Supported: path,100rel". @@ -353,7 +358,7 @@ include_hf_value("Supported", "path"); exclude_hf_value("Supported", "100rel"); ... -2.14. hf_value_exists(hf, hvalue) +2.14. hf_value_exists(hf, hvalue) Check if value exists in set. Alternate select @hf_value_exists.HF.VALUE may be used. It returns one or zero. diff --git a/modules/textopsx/doc/functions.xml b/modules/textopsx/doc/functions.xml index 280b73048..28bc7f17d 100644 --- a/modules/textopsx/doc/functions.xml +++ b/modules/textopsx/doc/functions.xml @@ -24,7 +24,13 @@ broken message is received from network). - This function can be used from REQUEST_ROUTE or ONREPLY_ROUTE. + This function can be used from REQUEST_ROUTE or core REPLY_ROUTE. + + + Note: It must be used before the transaction is created in + request_route and not inside the onreply_route[name] executed by tm + module. Also, do not used after resuming a suspended request or reply, + at that moment the transaction is already created. <function>msg_apply_changes()</function> usage diff --git a/modules/timer/README b/modules/timer/README index e6af28c81..34e80249d 100644 --- a/modules/timer/README +++ b/modules/timer/README @@ -4,7 +4,7 @@ Tomas Mandys Iptel.org - Copyright 2007 iptelorg GmbH + Copyright © 2007 iptelorg GmbH __________________________________________________________________ Table of Contents @@ -101,7 +101,7 @@ le"); 5.2. @timer.timer.timer_id.enabled 5.3. @timer.executed -5.1. timer_enable(timer_id, enable_disable) +5.1. timer_enable(timer_id, enable_disable) Enable/disable timer route specified by timer_id. Because of timer core API the callback is not disabled immediately but is removed from @@ -114,7 +114,7 @@ le"); timer_enable("MY_TIMER", 1); ... -5.2. @timer.timer.timer_id.enabled +5.2. @timer.timer.timer_id.enabled Return true ("1") if timer specified by timer_id is enabled, otherwise returns false ("0"). @@ -124,7 +124,7 @@ le"); .... } -5.3. @timer.executed +5.3. @timer.executed Returns name of timer which has been executed, i.e. non empty value is returned only when handler is being processed. diff --git a/modules/tls/README b/modules/tls/README index 75ebc0163..1c9f09126 100644 --- a/modules/tls/README +++ b/modules/tls/README @@ -8,9 +8,9 @@ Carsten Bock ng-voice GmbH - Copyright 2007 iptelorg GmbH + Copyright © 2007 iptelorg GmbH - Copyright 2014 ng-voice GmbH + Copyright © 2014 ng-voice GmbH __________________________________________________________________ Table of Contents diff --git a/modules/tls/tls_config.c b/modules/tls/tls_config.c index af1d88a03..fc631550b 100644 --- a/modules/tls/tls_config.c +++ b/modules/tls/tls_config.c @@ -400,12 +400,16 @@ tls_domains_cfg_t* tls_load_config(str* filename) pkg_free(file_path); file_path = NULL; while (read(in_fd, &ch, 1)) { - write(out_fd, &ch, 1); + if (write(out_fd, &ch, 1)<0) { + LOG(L_ERR, "write error: %s\n", strerror(errno)); + } } close(in_fd); in_fd = 0; ch = '\n'; - write(out_fd, &ch, 1); + if (write(out_fd, &ch, 1)<0) { + LOG(L_ERR, "write error: %s\n", strerror(errno)); + } } } closedir(dir); diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c index d7f3cef91..e0bbb0b4c 100644 --- a/modules/tls/tls_init.c +++ b/modules/tls/tls_init.c @@ -545,8 +545,10 @@ int init_tls_h(void) #endif ssl_version=SSLeay(); /* check if version have the same major minor and fix level - * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) */ - if ((ssl_version>>8)!=(OPENSSL_VERSION_NUMBER>>8)){ + * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) + * - values is represented as 0xMMNNFFPPS: major minor fix patch status + * 0x00090705f == 0.9.7e release */ + if ((ssl_version>>12)!=(OPENSSL_VERSION_NUMBER>>12)){ LOG(L_CRIT, "ERROR: tls: init_tls_h: installed openssl library " "version is too different from the library the Kamailio tls module " "was compiled with: installed \"%s\" (0x%08lx), compiled " diff --git a/modules/tm/README b/modules/tm/README index 9b31ebc1e..78c7a0afb 100644 --- a/modules/tm/README +++ b/modules/tm/README @@ -8,9 +8,9 @@ Juha Heinanen - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS - Copyright 2008 Juha Heinanen + Copyright © 2008 Juha Heinanen __________________________________________________________________ Table of Contents @@ -420,13 +420,13 @@ Chapter 1. Admin Guide Note Several Kamailio TM module functions are now implemented in the TMX - module: "modules_k/tmx". Check it to see if what you are looking for is + module: “modules_k/tmx”. Check it to see if what you are looking for is there. 2. Serial Forking Based on Q Value A single SIP INVITE request may be forked to multiple destinations. We - call the set of all such destinations a "destination set". Individual + call the set of all such destinations a “destination set”. Individual elements within the destination sets are called branches. The script writer can add URIs to the destination set from the configuration file, or they can be loaded from the user location database. Each registered @@ -459,7 +459,7 @@ Note and t_next_contacts(). Every branch in the destination set is assigned a priority number, also - known as the "q value". The q value is a floating point number in a + known as the “q value”. The q value is a floating point number in a range 0 to 1.0. The higher the q value number, the more priority is given to the particular branch in the destination set. Branches with q value 1.0 have maximum priority, such branches should be always be @@ -1573,7 +1573,7 @@ modparam("tm", "dns_reuse_rcv_socket", 1) The name of XAVP storing the attributes per contact. This must be the same as the usrloc parameter xavp_contacts. - Default value is "NULL". + Default value is “NULL”. Example 1.46. Set xavp_contact parameter ... @@ -1634,7 +1634,7 @@ modparam("tm|usrloc", "xavp_contact", "ulattrs") 5.50. t_use_uac_headers() 5.51. t_is_retr_async_reply() -5.1. t_relay([host, port]) +5.1. t_relay([host, port]) Relay a message statefully either to the destination indicated in the current URI (if called without any parameters) or to the specified host @@ -1662,7 +1662,7 @@ if (!t_relay()) }; ... -5.2. t_relay_to_udp([ip, port]) +5.2. t_relay_to_udp([ip, port]) Relay a message statefully using a fixed protocol either to the specified fixed destination or to a destination derived from the @@ -1688,19 +1688,19 @@ else t_relay_to_tcp(); # relay to msg. uri, but over tcp ... -5.3. t_relay_to_tcp([ip, port]) +5.3. t_relay_to_tcp([ip, port]) See function t_relay_to_udp([ip, port]). -5.4. t_relay_to_tls([ip, port]) +5.4. t_relay_to_tls([ip, port]) See function t_relay_to_udp([ip, port]). -5.5. t_relay_to_sctp([ip, port]) +5.5. t_relay_to_sctp([ip, port]) See function t_relay_to_udp([ip, port]). -5.6. t_on_failure(failure_route) +5.6. t_on_failure(failure_route) Sets failure routing block, to which control is passed after a transaction completed with a negative result but before sending a final @@ -1737,7 +1737,7 @@ failure_route[1] { See test/onr.cfg for a more complex example of combination of serial with parallel forking. -5.7. t_on_branch_failure(branch_failure_route) +5.7. t_on_branch_failure(branch_failure_route) Sets the branch_failure routing block, to which control is passed on each negative response to a transaction. This route is run before @@ -1770,7 +1770,7 @@ event_route[tm:branch-failure:myroute] { } ... -5.8. t_on_reply(onreply_route) +5.8. t_on_reply(onreply_route) Sets the reply routing block, to which control is passed when a reply for the current transaction is received. Note that the set of commands @@ -1800,7 +1800,7 @@ es'); } } -5.9. t_on_branch(branch_route) +5.9. t_on_branch(branch_route) Sets the branch routing block, to which control is passed after forking (when a new branch is created). For now branch routes are intended only @@ -1824,7 +1824,7 @@ branch_route[1] { } } -5.10. t_newtran() +5.10. t_newtran() Creates a new transaction, returns a negative value on error. This is the only way a script can add a new transaction in an atomic way. @@ -1840,7 +1840,7 @@ if (t_newtran()) { See test/uas.cfg for more examples. -5.11. t_reply(code, reason_phrase) +5.11. t_reply(code, reason_phrase) Sends a stateful reply after a transaction has been established. See t_newtran for usage. @@ -1865,7 +1865,7 @@ if (t_newtran()) { t_reply("404", "Not found"); ... -5.12. t_lookup_request() +5.12. t_lookup_request() Checks if a transaction exists. Returns a positive value if so, negative otherwise. Most likely you will not want to use it, as a @@ -1880,7 +1880,7 @@ if (t_lookup_request()) { }; ... -5.13. t_retransmit_reply() +5.13. t_retransmit_reply() Retransmits a reply sent previously by UAS transaction. @@ -1889,7 +1889,7 @@ if (t_lookup_request()) { t_retransmit_reply(); ... -5.14. t_release() +5.14. t_release() Remove transaction from memory (it will be first put on a wait timer to absorb delayed messages). @@ -1899,7 +1899,7 @@ t_retransmit_reply(); t_release(); ... -5.15. t_forward_nonack([ip, port]) +5.15. t_forward_nonack([ip, port]) Mainly for internal usage -- forward a non-ACK request statefully. Variants of this functions can enforce a specific transport protocol. @@ -1913,23 +1913,23 @@ t_release(); t_forward_nonack("1.2.3.4", "5060"); ... -5.16. t_forward_nonack_udp(ip, port) +5.16. t_forward_nonack_udp(ip, port) See function t_forward_nonack([ip, port]). -5.17. t_forward_nonack_tcp(ip, port) +5.17. t_forward_nonack_tcp(ip, port) See function t_forward_nonack([ip, port]). -5.18. t_forward_nonack_tls(ip, port) +5.18. t_forward_nonack_tls(ip, port) See function t_forward_nonack([ip, port]). -5.19. t_forward_nonack_sctp(ip, port) +5.19. t_forward_nonack_sctp(ip, port) See function t_forward_nonack([ip, port]). -5.20. t_set_fr(fr_inv_timeout [, fr_timeout]) +5.20. t_set_fr(fr_inv_timeout [, fr_timeout]) Sets the fr_inv_timeout and optionally fr_timeout for the current transaction or for transactions created during the same script @@ -1963,7 +1963,7 @@ branch_route[1] { } } -5.21. t_reset_fr() +5.21. t_reset_fr() Resets the fr_inv_timer and fr_timer for the current transaction to the default values (set using the tm module parameters fr_inv_timer and @@ -1982,7 +1982,7 @@ route { ... } -5.22. t_set_max_lifetime(inv_lifetime, noninv_lifetime) +5.22. t_set_max_lifetime(inv_lifetime, noninv_lifetime) Sets the maximum lifetime for the current INVITE or non-INVITE transaction, or for transactions created during the same script @@ -2011,7 +2011,7 @@ route { # INVITE and to 15s if not } -5.23. t_reset_max_lifetime() +5.23. t_reset_max_lifetime() Resets the the maximum lifetime for the current INVITE or non-INVITE transaction to the default value (set using the tm module parameter @@ -2030,7 +2030,7 @@ route { ... } -5.24. t_set_retr(retr_t1_interval, retr_t2_interval) +5.24. t_set_retr(retr_t1_interval, retr_t2_interval) Sets the retr_t1_interval and retr_t2_interval for the current transaction or for transactions created during the same script @@ -2076,7 +2076,7 @@ branch_route[1] { } } -5.25. t_reset_retr() +5.25. t_reset_retr() Resets the retr_timer1 and retr_timer2 for the current transaction to the default values (set using the tm module parameters retr_timer1 and @@ -2095,7 +2095,7 @@ route { ... } -5.26. t_set_auto_inv_100(0|1) +5.26. t_set_auto_inv_100(0|1) Switch automatically sending 100 replies to INVITEs on/off on a per transaction basis. It overrides the auto_inv_100 value for the current @@ -2112,7 +2112,7 @@ route { ... } -5.27. t_branch_timeout() +5.27. t_branch_timeout() Returns true if the failure route is executed for a branch that did timeout. It can be used from failure_route and branch-failure event @@ -2127,7 +2127,7 @@ failure_route[0]{ } } -5.28. t_branch_replied() +5.28. t_branch_replied() Returns true if the failure route is executed for a branch that did receive at least one reply in the past (the "current" reply is not @@ -2146,7 +2146,7 @@ failure_route[0]{ } } -5.29. t_any_timeout() +5.29. t_any_timeout() Returns true if at least one of the current transactions branches did timeout. @@ -2162,7 +2162,7 @@ failure_route[0]{ } } -5.30. t_any_replied() +5.30. t_any_replied() Returns true if at least one of the current transactions branches did receive some reply in the past. If called from a failure or onreply @@ -2177,7 +2177,7 @@ onreply_route[0]{ } } -5.31. t_grep_status("code") +5.31. t_grep_status("code") Returns true if "code" is the final reply received (or locally generated) in at least one of the current transactions branches. @@ -2191,7 +2191,7 @@ onreply_route[0]{ } } -5.32. t_is_canceled() +5.32. t_is_canceled() Returns true if the current transaction was canceled. @@ -2204,7 +2204,7 @@ failure_route[0]{ } } -5.33. t_is_expired() +5.33. t_is_expired() Returns true if the current transaction has already been expired, i.e. the max_inv_lifetime/max_noninv_lifetime interval has already elapsed. @@ -2218,7 +2218,7 @@ failure_route[0]{ } } -5.34. t_relay_cancel() +5.34. t_relay_cancel() Forwards the CANCEL if the corresponding INVITE transaction exists. The function is supposed to be used at the very beginning of the script, @@ -2243,7 +2243,7 @@ if (method == CANCEL) { # do the same as for INVITEs } -5.35. t_lookup_cancel([1]) +5.35. t_lookup_cancel([1]) Returns true if the corresponding INVITE transaction exists for a CANCEL request. The function can be called at the beginning of the @@ -2275,7 +2275,7 @@ if (method == CANCEL) { # do the same as for INVITEs } -5.36. t_drop_replies([mode]) +5.36. t_drop_replies([mode]) Drops all the previously received replies in failure_route block to make sure that none of them is picked up again. @@ -2303,7 +2303,7 @@ failure_route[0]{ } } -5.37. t_save_lumps() +5.37. t_save_lumps() Forces the modifications of the processed SIP message to be saved in shared memory before t_relay() is called. The new branches which are @@ -2343,7 +2343,7 @@ failure_route[1] { t_relay(); } -5.38. t_load_contacts() +5.38. t_load_contacts() This is the first of the three functions that can be used to implement serial/parallel forking based on q and +sip.instance values of @@ -2385,7 +2385,7 @@ if (!t_load_contacts()) { }; ... -5.39. t_next_contacts() +5.39. t_next_contacts() Function t_next_contacts() is the second of the three functions that can be used to implement serial/parallel forking based on the q value @@ -2437,7 +2437,7 @@ if (!t_next_contacts()) { }; ... -5.40. t_next_contact_flow() +5.40. t_next_contact_flow() Function t_next_contact_flow() is the last of the three functions that can be used to implement serial/parallel forking based on the q value @@ -2467,9 +2467,9 @@ event_route[tm:branch-failure:outbound] } ... -5.41. t_check_status(re) +5.41. t_check_status(re) - Returns true if the regular expresion "re" match the reply code of the + Returns true if the regular expresion “re” match the reply code of the response message as follows: * in routing block - the code of the last sent reply. * in on_reply block - the code of the current received reply. @@ -2485,7 +2485,7 @@ if (t_check_status("(487)|(408)")) { } ... -5.42. t_check_trans() +5.42. t_check_trans() t_check_trans() can be used to quickly check if a message belongs or is related to a transaction. It behaves differently for different types of @@ -2537,7 +2537,7 @@ if ( method == "CANCEL" && !t_check_trans()) sl_reply("403", "cancel out of the blue forbidden"); # note: in this example t_check_trans() can be replaced by t_lookup_cancel() -5.43. t_set_disable_6xx(0|1) +5.43. t_set_disable_6xx(0|1) Turn off/on 6xx replies special rfc conformant handling on a per transaction basis. If turned off (t_set_disable_6xx("1")) 6XXs will be @@ -2556,7 +2556,7 @@ route { ... } -5.44. t_set_disable_failover(0|1) +5.44. t_set_disable_failover(0|1) Turn off/on dns failover on a per transaction basis. @@ -2571,7 +2571,7 @@ route { ... } -5.45. t_set_disable_internal_reply(0|1) +5.45. t_set_disable_internal_reply(0|1) Turn off/on sending internally a SIP reply in case of relay errors. @@ -2583,7 +2583,7 @@ if(!t_relay()) { } ... -5.46. t_replicate([params]) +5.46. t_replicate([params]) Replicate the SIP request to a specific address. @@ -2619,7 +2619,7 @@ t_replicate("sip:$var(h);transport=tls"); t_replicate_to_udp("1.2.3.4", "5060"); ... -5.47. t_relay_to(proxy, flags) +5.47. t_relay_to(proxy, flags) Forward the SIP request to a specific address, controlling internal behavior via flags. @@ -2652,7 +2652,7 @@ t_relay_to("tls:1.2.3.4"); t_relay_to("0x01"); ... -5.48. t_set_no_e2e_cancel_reason(0|1) +5.48. t_set_no_e2e_cancel_reason(0|1) Enables/disables reason header (RFC 3326) copying from the triggering received CANCEL to the generated hop-by-hop CANCEL. 0 enables and 1 @@ -2676,7 +2676,7 @@ opying ... } -5.49. t_is_set(target) +5.49. t_is_set(target) Return true if the attribute specified by 'target' is set for transaction. @@ -2695,7 +2695,7 @@ if(!t_is_set("failure_route")) LM_DBG("no failure route will be executed for current transaction\n"); ... -5.50. t_use_uac_headers() +5.50. t_use_uac_headers() Set internal flags to tell tm to use UAC side for building headers for local generated requests (ACK, CANCEL) - useful when changing From/To @@ -2708,7 +2708,7 @@ if(!t_is_set("failure_route")) t_use_uac_headers(); ... -5.51. t_is_retr_async_reply() +5.51. t_is_retr_async_reply() Check to see if the reply is a retransmitted reply on a transaction that is currently suspended asynchronously (suspended during reply @@ -2811,7 +2811,7 @@ end of body 6.2. Functions -6.2.1. register_tmcb(cb_type, cb_func) +6.2.1. register_tmcb(cb_type, cb_func) For programmatic use only--register a function to be called back on an event. See t_hooks.h for more details. @@ -2820,7 +2820,7 @@ end of body * cb_type - Callback type. * cb_func - Callback function. -6.2.2. load_tm(*import_structure) +6.2.2. load_tm(*import_structure) For programmatic use only--import exported TM functions. See the acc module for an example of use. @@ -2828,7 +2828,7 @@ end of body Meaning of the parameters is as follows: * import_structure - Pointer to the import structure. -6.2.3. int t_suspend(struct sip_msg *msg, unsigned int *hash_index, unsigned +6.2.3. int t_suspend(struct sip_msg *msg, unsigned int *hash_index, unsigned int *label) For programmatic use only. This function together with t_continue() can @@ -2866,7 +2866,7 @@ int *label) t_suspend() should return 0 to make sure that the script processing does not continue. -6.2.4. int t_continue(unsigned int hash_index, unsigned int label, struct +6.2.4. int t_continue(unsigned int hash_index, unsigned int label, struct action *route) For programmatic use only. This function is the pair of t_suspend(), @@ -2882,7 +2882,7 @@ action *route) Return value: 0 - success, <0 - error. -6.2.5. int t_cancel_suspend(unsigned int hash_index, unsigned int label) +6.2.5. int t_cancel_suspend(unsigned int hash_index, unsigned int label) For programmatic use only. This function is for revoking t_suspend() from the same process as it was executed before. t_cancel_suspend() can @@ -2902,7 +2902,7 @@ action *route) 7.1. event_route[tm:branch-failure] -7.1. event_route[tm:branch-failure] +7.1. event_route[tm:branch-failure] Named branch failure routes can be defined to run when when a failure response is received. This allows handling failures on individual diff --git a/modules/tm/config.c b/modules/tm/config.c index ee290aec1..2fc745b79 100644 --- a/modules/tm/config.c +++ b/modules/tm/config.c @@ -34,6 +34,9 @@ #include "config.h" struct cfg_group_tm default_tm_cfg = { + "trying -- your call is important to us", /* tm_auto_inv_100_r */ + "Server Internal Error", /* default_reason */ + STR_NULL, /* ac_extra_hdrs */ /* should be request-uri matching used as a part of pre-3261 * transaction matching, as the standard wants us to do so * (and is reasonable to do so, to be able to distinguish @@ -65,16 +68,13 @@ struct cfg_group_tm default_tm_cfg = { MAX_NONINV_LIFETIME, /* tm_max_noninv_lifetime */ 1, /* noisy_ctimer */ 1, /* tm_auto_inv_100 */ - "trying -- your call is important to us", /* tm_auto_inv_100_r */ 500, /* tm_unix_tx_timeout -- 500 ms by default */ 1, /* restart_fr_on_each_reply */ 0, /* pass_provisional_replies */ 1, /* tm_aggregate_auth */ UM_CANCEL_STATEFULL, /* unmatched_cancel */ 500, /* default_code */ - "Server Internal Error", /* default_reason */ 1, /* reparse_invite */ - STR_NULL, /* ac_extra_hdrs */ 0, /* tm_blst_503 -- if 1 blacklist 503 sources, using tm_blst_503_min, * tm_blst_503_max, tm_blst_503_default and the Retry-After header @@ -100,6 +100,15 @@ struct cfg_group_tm default_tm_cfg = { void *tm_cfg = &default_tm_cfg; cfg_def_t tm_cfg_def[] = { + {"auto_inv_100_reason", CFG_VAR_STRING, 0, 0, 0, 0, + "reason text of the automatically send 100 to an INVITE"}, + {"default_reason", CFG_VAR_STRING, 0, 0, 0, 0, + "default SIP reason phrase sent by t_reply(), if the function " + "cannot retrieve its parameters"}, + {"ac_extra_hdrs", CFG_VAR_STR, 0, 0, 0, 0, + "header fields prefixed by this parameter value are included " + "in the CANCEL and negative ACK messages if they were present " + "in the outgoing INVITE (depends on reparse_invite)"}, {"ruri_matching", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0, "perform Request URI check in transaction matching"}, {"via1_matching", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0, @@ -136,8 +145,6 @@ cfg_def_t tm_cfg_def[] = { "will be always replied"}, {"auto_inv_100", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0, "automatically send 100 to an INVITE"}, - {"auto_inv_100_reason", CFG_VAR_STRING, 0, 0, 0, 0, - "reason text of the automatically send 100 to an INVITE"}, {"unix_tx_timeout", CFG_VAR_INT, 0, 0, 0, 0, "Unix socket transmission timeout, in milliseconds"}, {"restart_fr_on_each_reply", CFG_VAR_INT | CFG_ATOMIC , 0, 1, 0, 0, @@ -155,17 +162,10 @@ cfg_def_t tm_cfg_def[] = { {"default_code", CFG_VAR_INT | CFG_ATOMIC, 400, 699, 0, 0, "default SIP response code sent by t_reply(), if the function " "cannot retrieve its parameters"}, - {"default_reason", CFG_VAR_STRING, 0, 0, 0, 0, - "default SIP reason phrase sent by t_reply(), if the function " - "cannot retrieve its parameters"}, {"reparse_invite", CFG_VAR_INT, 0, 1, 0, 0, "if set to 1, the CANCEL and negative ACK requests are " "constructed from the INVITE message which was sent out " "instead of building them from the received request"}, - {"ac_extra_hdrs", CFG_VAR_STR, 0, 0, 0, 0, - "header fields prefixed by this parameter value are included " - "in the CANCEL and negative ACK messages if they were present " - "in the outgoing INVITE (depends on reparse_invite)"}, {"blst_503", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0, "if set to 1, blacklist 503 SIP response sources"}, {"blst_503_def_timeout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0, diff --git a/modules/tm/config.h b/modules/tm/config.h index 7081dd316..5e748894d 100644 --- a/modules/tm/config.h +++ b/modules/tm/config.h @@ -99,6 +99,9 @@ #define SUBST_CHAR '!' struct cfg_group_tm { + char *tm_auto_inv_100_r; + char *default_reason; + str ac_extra_hdrs; int ruri_matching; int via1_matching; int callid_matching; @@ -113,16 +116,13 @@ struct cfg_group_tm { unsigned int tm_max_noninv_lifetime; int noisy_ctimer; int tm_auto_inv_100; - char *tm_auto_inv_100_r; int tm_unix_tx_timeout; int restart_fr_on_each_reply; int pass_provisional_replies; int tm_aggregate_auth; int unmatched_cancel; int default_code; - char *default_reason; int reparse_invite; - str ac_extra_hdrs; int tm_blst_503; int tm_blst_503_default; int tm_blst_503_min; diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h index 0cbe24cfe..c6b334b03 100644 --- a/modules/tm/h_table.h +++ b/modules/tm/h_table.h @@ -182,13 +182,11 @@ typedef struct ua_server /* User Agent Client content */ -#define TM_UAC_FLAGS -#ifdef TM_UAC_FLAGS /* UAC internal flags */ -#define TM_UAC_FLAG_RR 1 /* Record-Route applied */ -#define TM_UAC_FLAG_R2 2 /* 2nd Record-Route applied */ -#define TM_UAC_FLAG_FB 4 /* Mark first entry in new branch set */ -#endif +#define TM_UAC_FLAG_RR (1) /* Record-Route applied */ +#define TM_UAC_FLAG_R2 (1<<1) /* 2nd Record-Route applied */ +#define TM_UAC_FLAG_FB (1<<2) /* Mark first entry in new branch set */ +#define TM_UAC_FLAG_BLIND (1<<3) /* A blind uac */ typedef struct ua_client { @@ -197,7 +195,7 @@ typedef struct ua_client char *end_reply; /* pointer to end of sip_msg so we know the shm blocked used in clone...(used in async replies) */ struct retr_buf request; /* we maintain a separate copy of cancel rather than - reuse the structure for original request; the + reuse the structure for original request; the original request is no longer needed but its delayed timer may fire and interfere with whoever tries to rewrite it @@ -216,10 +214,8 @@ typedef struct ua_client /* if we don't store, we at least want to know the status */ int last_received; -#ifdef TM_UAC_FLAGS /* internal flags per tm uac */ unsigned int flags; -#endif /* per branch flags */ flag_t branch_flags; /* internal processing code - (mapping over sip warning codes) diff --git a/modules/tm/t_cancel.c b/modules/tm/t_cancel.c index 9db7abe17..9702f65aa 100644 --- a/modules/tm/t_cancel.c +++ b/modules/tm/t_cancel.c @@ -43,7 +43,7 @@ typedef struct cancel_reason_map { } cancel_reason_map_t; static cancel_reason_map_t _cancel_reason_map[] = { - { 200, str_init("Answered elsewhere") }, + { 200, str_init("Call completed elsewhere") }, { 0, {0, 0} } }; diff --git a/modules/tm/t_cancel.h b/modules/tm/t_cancel.h index f8fe1189d..d3289388f 100644 --- a/modules/tm/t_cancel.h +++ b/modules/tm/t_cancel.h @@ -103,9 +103,14 @@ inline short static prepare_cancel_branch( struct cell *t, int b, int noreply ) int last_received; unsigned long old; + /* blind uac branch (e.g., suspend) without outgoing request */ + if((t->uac[b].flags & TM_UAC_FLAG_BLIND) + && t->uac[b].request.buffer==NULL) + return 0; + last_received=t->uac[b].last_received; - /* if noreply=1 cancel even if no reply received (in this case - * cancel_branch() won't actually send the cancel but it will do the + /* if noreply=1 cancel even if no reply received (in this case + * cancel_branch() won't actually send the cancel but it will do the * cleanup) */ if (last_received<200 && (noreply || last_received>=100)){ old=atomic_cmpxchg_long((void*)&t->uac[b].local_cancel.buffer, 0, diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c index 15f0969af..c85203112 100644 --- a/modules/tm/t_fwd.c +++ b/modules/tm/t_fwd.c @@ -536,13 +536,11 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req, memcpy( t->uac[branch].location_ua.s, i_req->location_ua.s, i_req->location_ua.len); } -#ifdef TM_UAC_FLAGS len = count_applied_lumps(i_req->add_rm, HDR_RECORDROUTE_T); if(len==1) t->uac[branch].flags = TM_UAC_FLAG_RR; else if(len==2) t->uac[branch].flags = TM_UAC_FLAG_RR|TM_UAC_FLAG_R2; -#endif ret=0; @@ -699,6 +697,8 @@ int add_blind_uac( /*struct cell *t*/ ) t->flags |= T_NOISY_CTIMER_FLAG; membar_write(); /* to allow lockless prepare_to_cancel() we want to be sure all the writes finished before updating branch number*/ + + t->uac[branch].flags |= TM_UAC_FLAG_BLIND; t->nr_of_outgoings=(branch+1); t->async_backup.blind_uac = branch; /* whenever we create a blind UAC, lets save the current branch * this is used in async tm processing specifically to be able to route replies @@ -1268,9 +1268,19 @@ void e2e_cancel( struct sip_msg *cancel_msg, t_reply( t_cancel, cancel_msg, 200, CANCEL_DONE ); return; } - + /* determine which branches to cancel ... */ prepare_to_cancel(t_invite, &cancel_bm, 0); + + /* no branches to cancel (e.g., a suspended transaction with blind uac) */ + if (cancel_bm==0){ + /* no outgoing branches yet => force a reply to the invite */ + t_reply( t_invite, t_invite->uas.request, 487, CANCELED ); + DBG("DEBUG: e2e_cancel: e2e cancel -- no active branches\n"); + t_reply( t_cancel, cancel_msg, 200, CANCEL_DONE ); + return; + } + #ifdef E2E_CANCEL_HOP_BY_HOP /* we don't need to set t_cancel label to be the same as t_invite if * we do hop by hop cancel. The cancel transaction will have a different @@ -1299,7 +1309,7 @@ void e2e_cancel( struct sip_msg *cancel_msg, } } #endif /* CANCEL_REASON_SUPPORT */ - for (i=0; inr_of_outgoings; i++) + for (i=0; inr_of_outgoings; i++) { if (cancel_bm & (1< free it */ @@ -1714,10 +1725,8 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg , return lowest_ret; } -#ifdef TM_UAC_FLAGS /* mark the fist branch in this fwd step */ t->uac[first_branch].flags |= TM_UAC_FLAG_FB; -#endif ser_error=0; /* clear branch adding errors */ /* send them out now */ diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c index dc783c92e..e8096bbee 100644 --- a/modules/tm/t_suspend.c +++ b/modules/tm/t_suspend.c @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -120,7 +120,7 @@ int t_suspend(struct sip_msg *msg, if (t_check( msg , &branch )==-1){ LOG(L_ERR, "ERROR: t_suspend_reply: " \ "failed find UAC branch\n"); - return -1; + return -1; } LM_DBG("found a a match with branch id [%d] - " "cloning reply message to t->uac[branch].reply\n", branch); @@ -176,6 +176,7 @@ int t_continue(unsigned int hash_index, unsigned int label, int reply_status; int do_put_on_wait; struct hdr_field *hdr, *prev = 0, *tmp = 0; + int route_type_bk; if (t_lookup_ident(&t, hash_index, label) < 0) { LM_ERR("transaction not found\n"); @@ -204,8 +205,11 @@ int t_continue(unsigned int hash_index, unsigned int label, t->flags |= T_ASYNC_CONTINUE; /* we can now know anywhere in kamailio * that we are executing post a suspend */ + /* transaction is no longer suspended, resetting the SUSPEND flag */ + t->flags &= ~T_ASYNC_SUSPENDED; + /* which route block type were we in when we were suspended */ - cb_type = FAILURE_CB_TYPE;; + cb_type = FAILURE_CB_TYPE; switch (t->async_backup.backup_route) { case REQUEST_ROUTE: cb_type = FAILURE_CB_TYPE; @@ -221,17 +225,17 @@ int t_continue(unsigned int hash_index, unsigned int label, break; } - if(t->async_backup.backup_route != TM_ONREPLY_ROUTE){ - branch = t->async_backup.blind_uac; /* get the branch of the blind UAC setup - * during suspend */ + if(t->async_backup.backup_route != TM_ONREPLY_ROUTE) { + /* resume processing of a sip request */ + /* get the branch of the blind UAC setup during suspend */ + branch = t->async_backup.blind_uac; if (branch >= 0) { stop_rb_timers(&t->uac[branch].request); - + if (t->uac[branch].last_received != 0) { /* Either t_continue() has already been * called or the branch has already timed out. * Needless to continue. */ - t->flags &= ~T_ASYNC_SUSPENDED; UNLOCK_ASYNC_CONTINUE(t); UNREF(t); /* t_unref would kill the transaction */ return 1; @@ -254,7 +258,7 @@ int t_continue(unsigned int hash_index, unsigned int label, /* We should not reset kr here to 0 as it's quite possible before continuing the dev. has correctly set the * kr by, for example, sending a transactional reply in code - resetting here will cause a dirty log message - * "WARNING: script writer didn't release transaction" to appear in log files. TODO: maybe we need to add + * "WARNING: script writer didn't release transaction" to appear in log files. TODO: maybe we need to add * a special kr for async? * reset_kr(); */ @@ -267,12 +271,15 @@ int t_continue(unsigned int hash_index, unsigned int label, } faked_env( t, &faked_req, 1); + route_type_bk = get_route_type(); + set_route_type(FAILURE_ROUTE); /* execute the pre/post -script callbacks based on original route block */ if (exec_pre_script_cb(&faked_req, cb_type)>0) { if (run_top_route(route, &faked_req, 0)<0) LM_ERR("failure inside run_top_route\n"); exec_post_script_cb(&faked_req, cb_type); } + set_route_type(route_type_bk); /* TODO: save_msg_lumps should clone the lumps to shm mem */ @@ -304,6 +311,7 @@ int t_continue(unsigned int hash_index, unsigned int label, } } else { + /* resume processing of a sip response */ branch = t->async_backup.backup_branch; init_cancel_info(&cancel_data); @@ -312,12 +320,11 @@ int t_continue(unsigned int hash_index, unsigned int label, " - resetting the suspend branch flag\n"); if (t->uac[branch].reply) { - t->uac[branch].reply->msg_flags &= ~FL_RPL_SUSPENDED; - } else { + t->uac[branch].reply->msg_flags &= ~FL_RPL_SUSPENDED; + } else { LM_WARN("no reply in t_continue for branch. not much we can do\n"); return 0; } - if (t->uas.request) t->uas.request->msg_flags&= ~FL_RPL_SUSPENDED; faked_env( t, t->uac[branch].reply, 1); @@ -372,7 +379,7 @@ int t_continue(unsigned int hash_index, unsigned int label, cleanup_uac_timers( t ); /* 2xx is a special case: we can have a COMPLETED request * with branches still open => we have to cancel them */ - if (is_invite(t) && cancel_data.cancel_bitmap) + if (is_invite(t) && cancel_data.cancel_bitmap) cancel_uacs( t, &cancel_data, F_CANCEL_B_KILL); /* FR for negative INVITES, WAIT anything else */ /* Call to set_final_timer is embedded in relay_reply to avoid @@ -404,7 +411,7 @@ int t_continue(unsigned int hash_index, unsigned int label, restart_rb_fr(& t->uac[branch].request, t->fr_inv_timeout); t->uac[branch].request.flags|=F_RB_FR_INV; /* mark fr_inv */ } - + } done: @@ -414,7 +421,7 @@ done: /* unref the transaction */ t_unref(t->uas.request); } else { - tm_ctx_set_branch_index(T_BR_UNDEFINED); + tm_ctx_set_branch_index(T_BR_UNDEFINED); /* unref the transaction */ t_unref(t->uac[branch].reply); LOG(L_DBG,"DEBUG: t_continue_reply: Freeing earlier cloned reply\n"); @@ -457,14 +464,10 @@ done: t->uac[branch].reply = 0; } - /*This transaction is no longer suspended so unsetting the SUSPEND flag*/ - t->flags &= ~T_ASYNC_SUSPENDED; - return 0; kill_trans: - t->flags &= ~T_ASYNC_SUSPENDED; /* The script has hopefully set the error code. If not, * let us reply with a default error. */ if ((kill_transaction_unsafe(t, @@ -495,7 +498,7 @@ kill_trans: * after t_suspend() has already been executed in the same * process, and it turns out that the transaction should * not have been suspended. - * + * * Return value: * 0 - success * <0 - failure @@ -504,7 +507,7 @@ int t_cancel_suspend(unsigned int hash_index, unsigned int label) { struct cell *t; int branch; - + t = get_t(); if (!t || t == T_UNDEFINED) { LOG(L_ERR, "ERROR: t_revoke_suspend: " \ @@ -519,7 +522,7 @@ int t_cancel_suspend(unsigned int hash_index, unsigned int label) "transaction id mismatch\n"); return -1; } - + if(t->async_backup.backup_route != TM_ONREPLY_ROUTE){ /* The transaction does not need to be locked because this * function is either executed from the original route block @@ -556,8 +559,8 @@ int t_cancel_suspend(unsigned int hash_index, unsigned int label) t->uac[branch].reply->msg_flags &= ~FL_RPL_SUSPENDED; if (t->uas.request) t->uas.request->msg_flags&= ~FL_RPL_SUSPENDED; - } - + } + return 0; } diff --git a/modules/tm/t_suspend.h b/modules/tm/t_suspend.h index df19f22fe..2e411b3bc 100644 --- a/modules/tm/t_suspend.h +++ b/modules/tm/t_suspend.h @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/modules/tmrec/README b/modules/tmrec/README index afee28b0b..c57347583 100644 --- a/modules/tmrec/README +++ b/modules/tmrec/README @@ -22,9 +22,9 @@ Richard Fuchs - Copyright 2012 asipto.com + Copyright © 2012 asipto.com - Copyright 2012 Sipwise GmbH + Copyright © 2012 Sipwise GmbH __________________________________________________________________ Table of Contents @@ -119,7 +119,7 @@ modparam("tmrec", "separator", ";") 4.2. is_leap_year([year]) 4.3. time_period_match(period [, timestamp]) -4.1. tmrec_match(timerec [, timestamp]) +4.1. tmrec_match(timerec [, timestamp]) Match a time recurrence rule against the timestamp (UNIX epoch format). If the timestamp parameter is missing, the current UNIX epoch time is @@ -142,43 +142,43 @@ modparam("tmrec", "separator", ";") Description of time recurrence attributes: * startdate - date for the start of the first period. * duration - the duration of the time period. For a recurring - interval, the "duration" parameter MUST be small enough such that + interval, the “duration” parameter MUST be small enough such that subsequent intervals do not overlap. For non-recurring intervals, durations of any positive length are permitted. Zero-length - duration means "forever". Negative-length durations are not + duration means “forever”. Negative-length durations are not allowed. See RFC 2445 for the format of duration. In short for common cases when the duration doesn't exeed a data, it must start with PT followed by the value for hours, minutes or seconds - e.g., a duration of 8 hours must be written as PT8H. - * frequency - can be one of the following values: "daily" - specify - repeating periods based on an interval of a day or more; "weekly" - + * frequency - can be one of the following values: “daily” - specify + repeating periods based on an interval of a day or more; “weekly” - specify repeating periods based on an interval of a week or more; - "monthly" - specify repeating periods based on an interval of a - month or more; "yearly" - specify repeating periods based on an + “monthly” - specify repeating periods based on an interval of a + month or more; “yearly” - specify repeating periods based on an interval of a year or more. These values are case-insensitive. * until - defines an iCalendar COS DATE or DATE-TIME value which bounds the recurrence rule in an inclusive manner. If the value - specified by "until" is synchronized with the specified recurrence, + specified by “until” is synchronized with the specified recurrence, this date or date-time becomes the last instance of the recurrence. If it is not present, the recurrence is considered to repeat forever. * interval - a positive integer representing how often the recurrence - rule repeats. The default value is "1", meaning every day for a - "daily" rule, every week for a "weekly" rule, every month for a - "monthly" rule and every year for a "yearly" rule. + rule repeats. The default value is “1”, meaning every day for a + “daily” rule, every week for a “weekly” rule, every month for a + “monthly” rule and every year for a “yearly” rule. * byday - a comma-separated list short codes of days of the week. The - days are specified as: "MO" for Monday; "TU" for Tuesday; "WE" for - Wednesday; "TH" for Thursday; "FR" for Friday; "SA" for Saturday; - "SU" for Sunday. These values are case insensitive. - Each "byday" value can also be prefixed by a positive (+n) or + days are specified as: “MO” for Monday; “TU” for Tuesday; “WE” for + Wednesday; “TH” for Thursday; “FR” for Friday; “SA” for Saturday; + “SU” for Sunday. These values are case insensitive. + Each “byday” value can also be prefixed by a positive (+n) or negative (-n) integer. If present, this indicates the n-th - occurrence of the specific day within the "monthly" or "yearly" - recurrence. For example, within a "monthly" rule, +1MO (or simply + occurrence of the specific day within the “monthly” or “yearly” + recurrence. For example, within a “monthly” rule, +1MO (or simply 1MO) represents the first Monday within the month, whereas -1MO represents the last Monday of the month. If an integer modifier is not present, it means all days of this type within the specified - frequency. For example, within a "monthly" rule, MO represents all + frequency. For example, within a “monthly” rule, MO represents all Mondays within the month. * bymonthday - a comma-separated list of days of the month. Valid values are 1 to 31 or -31 to -1. For example, -10 represents the @@ -192,43 +192,43 @@ modparam("tmrec", "separator", ";") * bymonth - parameter specifies a comma-separated list of months of the year. Valid values are 1 to 12. - A recurrence is specified by including the "frequency" parameter, which + A recurrence is specified by including the “frequency” parameter, which indicates the type of the recurrence rule. Parameters other than - "startdate" and "duration" SHOULD NOT be specified unless "frequency" + “startdate” and “duration” SHOULD NOT be specified unless “frequency” is set. - If invalid byxxx parameter values are found (ie, bymonthday="30" in + If invalid byxxx parameter values are found (ie, bymonthday=“30” in February), they are simply ignored. Byxxx parameters modify the recurrence rule matching. The Byxxx rule, as an attribute for a period of time which is greater than or equal to the frequency, generally reduces or limits the number of occurrences - for the recurrence definition. For example, frequency="daily" - bymonth="3" reduces the number of recurrence instances from all days - (if the "bymonth" parameter is not present) to all days in March. Byxxx + for the recurrence definition. For example, frequency=“daily” + bymonth=“3” reduces the number of recurrence instances from all days + (if the “bymonth” parameter is not present) to all days in March. Byxxx parameters for a period of time less than the frequency generally increases or expands the number of occurrences of the recurrence. For - example, frequency="yearly" bymonth="8,9" increases the number of days - within the yearly recurrence set from 1 (if "bymonth" parameter is not + example, frequency=“yearly” bymonth=“8,9” increases the number of days + within the yearly recurrence set from 1 (if “bymonth” parameter is not present) to 2. If multiple Byxxx parameters are specified, then after evaluating the - specified "frequency" and "interval" parameters, the Byxxx parameters + specified “frequency” and “interval” parameters, the Byxxx parameters are applied to the current set of evaluated occurrences in the - following order: "bymonth", "byweekno", "byyearday", "bymonthday", - "byday"; then "until" is evaluated. + following order: “bymonth”, “byweekno”, “byyearday”, “bymonthday”, + “byday”; then “until” is evaluated. Next is an example of evaluating multiple Byxxx parameters. - startdate="20100101T093000" duration="PT10H30M" frequency="yearly" - interval="4" bymonth="3" byday="SU" + startdate=“20100101T093000” duration=“PT10H30M” frequency=“yearly” + interval=“4” bymonth=“3” byday=“SU” - First, the interval="4" would be applied to frequency="yearly" to match - on "every 4th year" . Then, bymonth="1" would be applied to match on - "every March, every 4th year". Then, byday="SU" would be applied to - match on "every Sunday in March, every 4th year, from 9:30 to 20:00 ". + First, the interval=“4” would be applied to frequency=“yearly” to match + on “every 4th year” . Then, bymonth=“1” would be applied to match on + “every March, every 4th year”. Then, byday=“SU” would be applied to + match on “every Sunday in March, every 4th year, from 9:30 to 20:00 ”. The start and end hours:minutes have been retrieved from the - "startdate" and "duration" parameters. + “startdate” and “duration” parameters. This function can be used in ANY_ROUTE. @@ -240,7 +240,7 @@ modparam("tmrec", "separator", ";") xdbg("it is with working hours\n"); ... -4.2. is_leap_year([year]) +4.2. is_leap_year([year]) Return true if the value from parameter is a leap year. If the parameter is missing, then the year from the current time is taken. @@ -254,7 +254,7 @@ modparam("tmrec", "separator", ";") if(is_leap_year("2010")) ... -4.3. time_period_match(period [, timestamp]) +4.3. time_period_match(period [, timestamp]) Matches the point in time specified by the timestamp parameter, or the current time if the parameter is missing, against the given period @@ -287,26 +287,26 @@ if(is_leap_year("2010")) the current century. * month or mo - Month of the year, either a number between 1 and 12, or at least the first 3 letters of a spelled out month name, e.g. - "jan", "janua" or "january" will all work. + “jan”, “janua” or “january” will all work. * week or wk - Week of the month, a number between 1 and 6. The first day of the week is Sunday. * yday or yd - Day of the year, a number between 1 and 366. * mday or md - Day of the month, a number between 1 and 31. * wday or wd - Day of the week, either a number between 1 and 7, or at least the first 2 letters of a spelled out weekday name - (analogous to the "month" scale). Sunday is the first day of the + (analogous to the “month” scale). Sunday is the first day of the week. * hour or hr - A number between 0 and 23. Unlike the Perl - Time::Period module, "am" or "pm" specifications are not supported. + Time::Period module, “am” or “pm” specifications are not supported. * minute or min - A number between 0 and 59. * second or sec - A number between 0 and 60 (to allow for leap seconds). The parameters can include pseudo-variables. Whitespace (more precisely, the space character only) can occur anywhere, but is - optional. Ranges in all scales (with the exception of the "year" scale) - are allowed to wrap-around, e.g. a weekday scale of "{fri-tue}" is - equivalent to "{fri-sat,sun-tue}". + optional. Ranges in all scales (with the exception of the “year” scale) + are allowed to wrap-around, e.g. a weekday scale of “{fri-tue}” is + equivalent to “{fri-sat,sun-tue}”. Example 1.4. time_period_match usage ... diff --git a/modules/tmx/README b/modules/tmx/README index e56b139ab..961a54047 100644 --- a/modules/tmx/README +++ b/modules/tmx/README @@ -48,10 +48,11 @@ Juha Heinanen 4.5. t_is_failure_route() 4.6. t_is_branch_route() 4.7. t_is_reply_route() - 4.8. t_suspend() - 4.9. t_continue(tindex, tlabel, rtname) - 4.10. t_reuse_branch() - 4.11. t_precheck_trans() + 4.8. t_is_request_route() + 4.9. t_suspend() + 4.10. t_continue(tindex, tlabel, rtname) + 4.11. t_reuse_branch() + 4.12. t_precheck_trans() 5. Exported pseudo-variables 6. MI Commands @@ -89,10 +90,11 @@ Juha Heinanen 1.6. t_is_failure_route usage 1.7. t_is_branch_route usage 1.8. t_is_reply_route usage - 1.9. t_suspend usage - 1.10. t_continue usage - 1.11. t_reuse_branch usage - 1.12. t_precheck_trans usage + 1.9. t_is_request_route usage + 1.10. t_suspend usage + 1.11. t_continue usage + 1.12. t_reuse_branch usage + 1.13. t_precheck_trans usage Chapter 1. Admin Guide @@ -117,10 +119,11 @@ Chapter 1. Admin Guide 4.5. t_is_failure_route() 4.6. t_is_branch_route() 4.7. t_is_reply_route() - 4.8. t_suspend() - 4.9. t_continue(tindex, tlabel, rtname) - 4.10. t_reuse_branch() - 4.11. t_precheck_trans() + 4.8. t_is_request_route() + 4.9. t_suspend() + 4.10. t_continue(tindex, tlabel, rtname) + 4.11. t_reuse_branch() + 4.12. t_precheck_trans() 5. Exported pseudo-variables 6. MI Commands @@ -197,10 +200,11 @@ modparam("tmx", "precheck_trans", 0) 4.5. t_is_failure_route() 4.6. t_is_branch_route() 4.7. t_is_reply_route() - 4.8. t_suspend() - 4.9. t_continue(tindex, tlabel, rtname) - 4.10. t_reuse_branch() - 4.11. t_precheck_trans() + 4.8. t_is_request_route() + 4.9. t_suspend() + 4.10. t_continue(tindex, tlabel, rtname) + 4.11. t_reuse_branch() + 4.12. t_precheck_trans() 4.1. t_cancel_branches(which) @@ -329,7 +333,24 @@ route[abc] { } ... -4.8. t_suspend() +4.8. t_is_request_route() + + Returns true if the top-executed route block is request_route. + + This function can be used from ANY_ROUTE . + + Example 1.9. t_is_request_route usage +... +request_route[xyz] { + route(abc); +} + +route[abc] { + if(t_is_request_route()) { ... } +} +... + +4.9. t_suspend() Suspend the execution of SIP request in a transaction. If transaction was not created yet, it is created by this function. Returns true in @@ -338,7 +359,7 @@ route[abc] { This function can be used from ANY_ROUTE . - Example 1.9. t_suspend usage + Example 1.10. t_suspend usage ... if(t_suspend()) { @@ -347,7 +368,7 @@ if(t_suspend()) } ... -4.9. t_continue(tindex, tlabel, rtname) +4.10. t_continue(tindex, tlabel, rtname) Continue the execution of the transaction identified by tindex and tlabel with the actions defined in route[rtname]. @@ -362,12 +383,12 @@ if(t_suspend()) This function can be used in ANY_ROUTE. - Example 1.10. t_continue usage + Example 1.11. t_continue usage ... t_continue('123', '456', 'MYROUTE'); ... -4.10. t_reuse_branch() +4.11. t_reuse_branch() Creates new "main" branch by making copy of branch-failure branch. Currently the following branch attributes are copied from @@ -376,7 +397,7 @@ t_continue('123', '456', 'MYROUTE'); This function can be used from tm:branch-failure event_route. - Example 1.11. t_reuse_branch usage + Example 1.12. t_reuse_branch usage ... event_route [tm:branch-failure:contact] { t_reuse_branch(); @@ -386,7 +407,7 @@ event_route [tm:branch-failure:contact] { } ... -4.11. t_precheck_trans() +4.12. t_precheck_trans() Check if current processed message is handled by other process. This function is useful to catch retransmissions before transaction is @@ -398,7 +419,7 @@ event_route [tm:branch-failure:contact] { This function can be used from REQUEST_ROUTE . - Example 1.12. t_precheck_trans usage + Example 1.13. t_precheck_trans usage ... # handle retransmissions if(t_precheck_trans()) { diff --git a/modules/topoh/README b/modules/topoh/README index 8812b7b1a..213524545 100644 --- a/modules/topoh/README +++ b/modules/topoh/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2009 FhG FOKUS + Copyright © 2009 FhG FOKUS __________________________________________________________________ Table of Contents diff --git a/modules/topos/README b/modules/topos/README index 0c432f67c..acbe0770e 100644 --- a/modules/topos/README +++ b/modules/topos/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2016 FhG FOKUS + Copyright © 2016 FhG FOKUS __________________________________________________________________ Table of Contents @@ -103,7 +103,7 @@ Chapter 1. Admin Guide Database URL. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.1. Set db_url parameter ... diff --git a/modules/uac/README b/modules/uac/README index b2842afcb..dd54dfe17 100644 --- a/modules/uac/README +++ b/modules/uac/README @@ -836,9 +836,9 @@ event_route[uac:reply] { 8.6. uac.reg_refresh Load one record by l_uuid from database for remote registrations. If - the record exists in memory, its authentication password is updated, - otherwise a new record is added. The command has a parameter, which is - the value of l_uuid field. + the record exists in memory, its authentication password, flags and + proxy are updated, otherwise a new record is added. The command has a + parameter, which is the value of l_uuid field. Example 1.33. uac.reg_refresh usage ... diff --git a/modules/uac/doc/uac_admin.xml b/modules/uac/doc/uac_admin.xml index db5f695f6..b1dc06f05 100644 --- a/modules/uac/doc/uac_admin.xml +++ b/modules/uac/doc/uac_admin.xml @@ -995,9 +995,9 @@ event_route[uac:reply] { Load one record by l_uuid from database for remote registrations. - If the record exists in memory, its authentication password is - updated, otherwise a new record is added. The command has a - parameter, which is the value of l_uuid field. + If the record exists in memory, its authentication password, flags + and proxy are updated, otherwise a new record is added. + The command has a parameter, which is the value of l_uuid field. <function>uac.reg_refresh</function> usage diff --git a/modules/uac/uac_reg.c b/modules/uac/uac_reg.c index 8ff63bdef..b0f21b594 100644 --- a/modules/uac/uac_reg.c +++ b/modules/uac/uac_reg.c @@ -600,7 +600,10 @@ int reg_ht_update_attrs(reg_uac_t *reg) strncpy(ri->r->auth_proxy.s, reg->auth_proxy.s, reg->auth_proxy.len); ri->r->auth_proxy.len = reg->auth_proxy.len; ri->r->auth_proxy.s[reg->auth_proxy.len] = '\0'; - if(reg->flags & UAC_REG_DISABLED) ri->r->flags |= UAC_REG_DISABLED; + if(reg->flags & UAC_REG_DISABLED) + ri->r->flags |= UAC_REG_DISABLED; + else + ri->r->flags &= ~UAC_REG_DISABLED; lock_release(&_reg_htable->entries[slot].lock); return 0; } @@ -812,6 +815,10 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params *ps) goto done; } } + + LM_DBG("sip response %d while registering [%.*s] with no match\n", + ps->code, ri->l_uuid.len, ri->l_uuid.s); + goto done; } if(ps->code == 401 || ps->code == 407) @@ -848,7 +855,7 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params *ps) } } cred.realm = auth.realm; - cred.user = ri->auth_username; + cred.user = ri->auth_username; cred.passwd = ri->auth_password; cred.next = NULL; @@ -917,8 +924,7 @@ void uac_reg_tm_callback( struct cell *t, int type, struct tmcb_params *ps) ri->flags |= UAC_REG_AUTHSENT; return; - } else - { + } else { LM_ERR("got sip response %d while registering [%.*s]\n", ps->code, ri->l_uuid.len, ri->l_uuid.s); goto error; @@ -1079,7 +1085,7 @@ void uac_reg_timer(unsigned int ticks) if(reg.attr.len == 0) { \ LM_ERR("empty value not allowed for column[%d]='%.*s' - ignoring record\n", \ pos, db_cols[pos]->len, db_cols[pos]->s); \ - continue; \ + goto nextrec; \ } \ } \ } while(0); @@ -1162,7 +1168,7 @@ int uac_reg_load_db(void) } } else { if((ret=reg_dbf.query(reg_db_con, NULL, NULL, NULL, db_cols, - 0, 10, 0, &db_res))!=0 + 0, 12, 0, &db_res))!=0 || RES_ROW_N(db_res)<=0 ) { reg_dbf.free_result(reg_db_con, db_res); @@ -1178,7 +1184,7 @@ int uac_reg_load_db(void) do { for(i=0; i - Copyright 2002, 2003 FhG FOKUS - _________________________________________________________________ + Copyright © 2002, 2003 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -75,16 +74,16 @@ Chapter 1. Admin Guide 1. Overview - This module contains all authentication related functions that need - the access to the database. This module should be used together with - auth module, it cannot be used independently because it depends on the - module. Select this module if you want to use database to store + This module contains all authentication related functions that need the + access to the database. This module should be used together with auth + module, it cannot be used independently because it depends on the + module. Select this module if you want to use database to store authentication information like subscriber usernames and passwords. If you want to use radius authentication, then use auth_radius instead. 2. Dependencies - The module depends on the following modules (in the other words the + The module depends on the following modules (in the other words the listed modules must be loaded before this module): * auth. Generic authentication functions. * database. Any database module (currently mysql, postgres, dbtext) @@ -104,11 +103,10 @@ Chapter 1. Admin Guide 3.1. db_url (string) This is URL of the database to be used. Value of the parameter depends - on the database module used. For example for mysql and postgres - modules this is something like - mysql://username:password@host:port/database. For dbtext module (which - stores data in plaintext files) it is directory in which the database - resides. + on the database module used. For example for mysql and postgres modules + this is something like mysql://username:password@host:port/database. + For dbtext module (which stores data in plaintext files) it is + directory in which the database resides. Default value is "mysql://serro:47serro11@localhost/ser". @@ -117,9 +115,8 @@ modparam("auth_db", "db_url", "mysql://foo:bar@foobar.org/ser") 3.2. user_column (string) - This is the name of the column holding usernames. Default value is - fine for most people. Use the parameter if you really need to change - it. + This is the name of the column holding usernames. Default value is fine + for most people. Use the parameter if you really need to change it. Default value is "username". @@ -129,8 +126,8 @@ modparam("auth_db", "user_column", "user") 3.3. domain_column (string) This is the name of the column holding domains of users. Default value - is fine for most people. Use the parameter if you really need to - change it. + is fine for most people. Use the parameter if you really need to change + it. Default value is "domain". @@ -139,10 +136,10 @@ modparam("auth_db", "domain_column", "domain") 3.4. password_column (string) - This is the name of the column holding passwords. Passwords can be + This is the name of the column holding passwords. Passwords can be either stored as plain text or pre-calculated HA1 strings. HA1 strings - are MD5 hashes of username, password, and realm. HA1 strings are more - safe because the server doesn't need to know plaintext passwords and + are MD5 hashes of username, password, and realm. HA1 strings are more + safe because the server doesn't need to know plaintext passwords and they cannot be obtained from HA1 strings. Default value is "ha1". @@ -152,8 +149,8 @@ modparam("auth_db", "password_column", "password") 3.5. rpid_column (string) - This is the name of the column holding information for the - Remote-Party-ID header field. Default value is fine for most people. + This is the name of the column holding information for the + Remote-Party-ID header field. Default value is fine for most people. Use the parameter if you really need to change it. Default value is "rpid". @@ -163,24 +160,24 @@ modparam("auth_db", "rpid_column", "remote_party_id") 3.6. calculate_ha1 (integer) - This parameter tells server whether it should read plaintext password + This parameter tells server whether it should read plaintext password from the database or HA1 string. If the parameter is set to 1 then the server will assume that the column pointed to by plain_password_column - contains plaintext passwords and it will calculate HA1 strings on the + contains plaintext passwords and it will calculate HA1 strings on the fly. If the parameter is set to 0 then the server assumes that the database - contains HA1 strings directly and will not calculate them. In this - case it will use value of password_column as name of column with HA1 - password. If username parameter of credentials contains also @domain - (some user agents put domain in username parameter), then column - pointed to by password_column_2 parameter will be used instead. This - column should also contain HA1 strings but they should be calculated - including the domain in the username parameter (as opposed to - password_column which (when containing HA1 strings) should always + contains HA1 strings directly and will not calculate them. In this case + it will use value of password_column as name of column with HA1 + password. If username parameter of credentials contains also @domain + (some user agents put domain in username parameter), then column + pointed to by password_column_2 parameter will be used instead. This + column should also contain HA1 strings but they should be calculated + including the domain in the username parameter (as opposed to + password_column which (when containing HA1 strings) should always contains HA1 strings calculated without domain in username. - This ensures that the authentication will always work when using + This ensures that the authentication will always work when using pre-calculated HA1 string, not depending on the presence of the domain in username. @@ -191,7 +188,7 @@ modparam("auth_db", "calculate_ha1", 1) 3.7. plain_password_column (string) - This parameter holds the name of column holding plain text password. + This parameter holds the name of column holding plain text password. This column is used when calculate_ha1 is set. Default value is "password". @@ -201,9 +198,9 @@ modparam("auth_db", "plain_password_column", "password") 3.8. password_column_2 (string) - As described in the previous section this parameter contains name of - column holding pre-calculated HA1 string that were calculated - including the domain in the username. This parameter is used only when + As described in the previous section this parameter contains name of + column holding pre-calculated HA1 string that were calculated including + the domain in the username. This parameter is used only when calculate_ha1 is set to 0 and user agent send a credentials containing the domain in the username. @@ -214,10 +211,10 @@ modparam("auth_db", "password_column_2", "ha1_2") 3.9. use_rpid (integer) - This parameter specifies whether the server should fetch a value for + This parameter specifies whether the server should fetch a value for the Remote-Party-ID header field from the database. - If the parameter is set to 1 the server expects to find a value for + If the parameter is set to 1 the server expects to find a value for this header in the column specified by the rpid_column parameter. Default value of this parameter is 0. @@ -232,24 +229,24 @@ modparam("auth_db", "use_rpid", 1) 4.1. www_authorize(realm, table) - The function verifies credentials according to RFC2617. If the - credentials are verified successfully then the function will succeed - and mark the credentials as authorized (marked credentials can be - later used by some other functions). If the function was unable to - verify the credentials for some reason then it will fail and the - script should call www_challenge which will challenge the user again. + The function verifies credentials according to RFC2617. If the + credentials are verified successfully then the function will succeed + and mark the credentials as authorized (marked credentials can be later + used by some other functions). If the function was unable to verify the + credentials for some reason then it will fail and the script should + call www_challenge which will challenge the user again. Meaning of the parameters is as follows: - * realm. Realm is a opaque string that the user agent should - present to the user so he can decide what username and password to - use. Usually this is domain of the host the server is running on. - If an empty string "" is used then the server will generate it - from the request. In case of REGISTER requests To header field - domain will be used (because this header field represents a user - being registered), for all other messages From header field domain - will be used. - * table. Table to be used to lookup usernames and passwords - (usually subscribers table). + * realm. Realm is a opaque string that the user agent should present + to the user so he can decide what username and password to use. + Usually this is domain of the host the server is running on. If an + empty string "" is used then the server will generate it from the + request. In case of REGISTER requests To header field domain will + be used (because this header field represents a user being + registered), for all other messages From header field domain will + be used. + * table. Table to be used to lookup usernames and passwords (usually + subscribers table). Example 1.10. www_authorize usage ... @@ -260,22 +257,21 @@ if (www_authorize("iptel.org", "subscriber")) { 4.2. proxy_authorize(realm, table) - The function verifies credentials according to RFC2617. If the - credentials are verified successfully then the function will succeed - and mark the credentials as authorized (marked credentials can be - later used by some other functions). If the function was unable to - verify the credentials for some reason then it will fail and the - script should call proxy_challenge which will challenge the user - again. + The function verifies credentials according to RFC2617. If the + credentials are verified successfully then the function will succeed + and mark the credentials as authorized (marked credentials can be later + used by some other functions). If the function was unable to verify the + credentials for some reason then it will fail and the script should + call proxy_challenge which will challenge the user again. Meaning of the parameters is as follows: - * realm - Realm is a opaque string that the user agent should - present to the user so he can decide what username and password to - use. Usually this is domain of the host the server is running on. - If an empty string "" is used then the server will generate it - from the request. From header field domain will be used as realm. - * table - Table to be used to lookup usernames and passwords - (usually subscribers table). + * realm - Realm is a opaque string that the user agent should present + to the user so he can decide what username and password to use. + Usually this is domain of the host the server is running on. + If an empty string "" is used then the server will generate it from + the request. From header field domain will be used as realm. + * table - Table to be used to lookup usernames and passwords (usually + subscribers table). Example 1.11. proxy_authorize usage ... diff --git a/modules/uid_avp_db/README b/modules/uid_avp_db/README index a8eb8ca9f..d5a1803a4 100644 --- a/modules/uid_avp_db/README +++ b/modules/uid_avp_db/README @@ -1,4 +1,3 @@ - UID AVP DB Module Jiri Kuthan @@ -6,8 +5,8 @@ Jiri Kuthan FhG FOKUS - Copyright 2004, 2005 FhG FOKUS - _________________________________________________________________ + Copyright © 2004, 2005 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -81,22 +80,22 @@ Chapter 1. Admin Guide 1. Overview - This module contains several functions that can be used to manipulate - the contents of AVPs (Attribute-Value pairs). The AVPs are variables - attached to the SIP message being processed. Each variable has its - name and value. AVPs can be used to store arbitrary data or as a means - of inter-module comminication. + This module contains several functions that can be used to manipulate + the contents of AVPs (Attribute-Value pairs). The AVPs are variables + attached to the SIP message being processed. Each variable has its name + and value. AVPs can be used to store arbitrary data or as a means of + inter-module comminication. - You may also want to check the avpops module which is more flexible - and contains more functions. In future SER releases the avp module - will be probably deprecated in favor of avpops module. + You may also want to check the avpops module which is more flexible and + contains more functions. In future SER releases the avp module will be + probably deprecated in favor of avpops module. - Domain module operates in caching mode. Domain module reads the - default values of AVPs into cache memory when the module is loaded. - After that default values is re-read only when module is given - avp_list_reload fifo command. Any changes in usr_preferences_types - table must thus be followed by avp_list_reload command in order to - reflect them in module behavior. + Domain module operates in caching mode. Domain module reads the default + values of AVPs into cache memory when the module is loaded. After that + default values is re-read only when module is given avp_list_reload + fifo command. Any changes in usr_preferences_types table must thus be + followed by avp_list_reload command in order to reflect them in module + behavior. 2. Dependencies @@ -144,7 +143,7 @@ Chapter 1. Admin Guide 3.5. username_column (string) - Name of the column containing the username of the subscriber in uri + Name of the column containing the username of the subscriber in uri attributes table. Default value is "username". @@ -182,24 +181,24 @@ Chapter 1. Admin Guide 3.11. scheme_column (string) - The name of the column containing subscriber's scheme in uri + The name of the column containing subscriber's scheme in uri attributes. Default value is "scheme". 3.12. attr_group (string) - 'Extra attribute' group definition. It can be repeated to define more + 'Extra attribute' group definition. It can be repeated to define more attribute groups. - The group definition contains one or more assignments in the form + The group definition contains one or more assignments in the form key=value. Possible keys are: id Attribute group identifier. Must be set. table - Table name used for storing attributes from this attribute + Table name used for storing attributes from this attribute group. Must be set. flag @@ -207,29 +206,29 @@ Chapter 1. Admin Guide be set. key_column - Column name holding key. Default value is "id". + Column name holding key. Default value is “id”. name_column - Column name used for storing attribute name. Default value is - "name". + Column name used for storing attribute name. Default value is + “name”. value_column - Column name used for storing attribute value. Default value is - "value". + Column name used for storing attribute value. Default value is + “value”. type_column - Column name used for storing attribute type. Default value is - "type". + Column name used for storing attribute type. Default value is + “type”. flags_column - Column name used for storing attribute flags. Default value is - "flags". + Column name used for storing attribute flags. Default value is + “flags”. None defined by default. Example 1.1. attribute group definition -modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_c -olumn=dlg_id"); +modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_co +lumn=dlg_id"); Table used for these attributes: mysql> describe dlg_attrs; @@ -244,7 +243,7 @@ mysql> describe dlg_attrs; +--------+------------------+------+-----+---------+-------+ 5 rows in set (0.00 sec) - Setting flags from code (all attrs beginning with "dlg_"): + Setting flags from code (all attrs beginning with “dlg_”): avpflags dialog_flag; ... route { @@ -255,10 +254,10 @@ route { 3.13. auto_unlock_extra_attrs (string) - Determines the action when any of the 'extra attributes' lock is + Determines the action when any of the 'extra attributes' lock is detected when routing script execution was finished. When the value of - this parameter is zero (default) BUG level message is logged, but the - lock is kept, so another process trying to obtain the lock might get + this parameter is zero (default) BUG level message is logged, but the + lock is kept, so another process trying to obtain the lock might get stuck. If the value is nonzero, DEBUG level message is sent to the log and all the locks are released. @@ -280,24 +279,24 @@ route { track $fu - Load user attributes into from track. In this case the + Load user attributes into from track. In this case the second parameter is UID used to search attributes. $tu - Load user attributes into to track. In this case the + Load user attributes into to track. In this case the second parameter is UID used to search attributes. $fr - Load uri attributes into from track. In this case the + Load uri attributes into from track. In this case the second parameter is URI used to search attributes. $tr - Load uri attributes into to track. In this case the - second parameter is URI used to search attributes. + Load uri attributes into to track. In this case the second + parameter is URI used to search attributes. id - Identifier used for searching attributes. When searching for - user attributes it is UID, when searchnig uri attributes it is + Identifier used for searching attributes. When searching for + user attributes it is UID, when searchnig uri attributes it is URI. 4.2. load_extra_attrs (group_id, id) @@ -305,8 +304,8 @@ route { Loads 'extra attributes' stored by previous call to save_extra_attrs. group_id - Identifies attribute group, see Section 3.12, "attr_group - (string)". + Identifies attribute group, see Section 3.12, “attr_group + (string)”. id Identifies attributes which should be loaded. @@ -316,8 +315,8 @@ route { Saves 'extra attributes' flagged by group flag under given id. group_id - Identifies attribute group, see Section 3.12, "attr_group - (string)". + Identifies attribute group, see Section 3.12, “attr_group + (string)”. id Identifier stored with flagged attributes. @@ -327,20 +326,20 @@ route { Removes all extra attributes with given id. group_id - Identifies attribute group, see Section 3.12, "attr_group - (string)". + Identifies attribute group, see Section 3.12, “attr_group + (string)”. id Identifies attributes which should be removed. 4.5. lock_extra_attrs (group_id, id) - Locks extra attributes. Currently locks whole attribute group (not - only id). + Locks extra attributes. Currently locks whole attribute group (not only + id). group_id - Identifies attribute group, see Section 3.12, "attr_group - (string)". + Identifies attribute group, see Section 3.12, “attr_group + (string)”. id Identifies attributes which should be locked. @@ -351,8 +350,8 @@ route { only id). group_id - Identifies attribute group, see Section 3.12, "attr_group - (string)". + Identifies attribute group, see Section 3.12, “attr_group + (string)”. id Identifies attributes which should be unlocked. @@ -395,8 +394,8 @@ loadmodule "/home/kubartv/SER/lib/ser/modules/gflags.so" modparam("usrloc", "db_mode", 1); modparam("usrloc|avp_db", "db_url", "mysql://ser:heslo@127.0.0.1/ser") -modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_c -olumn=dlg_id"); +modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_co +lumn=dlg_id"); modparam("gflags", "load_global_attrs", 1); @@ -416,7 +415,7 @@ route["create_dialog"] { onreply_route["dialog_creation_reply"] { xplog("L_ERR", "dialog creation reply (%rs, %@cseq.method) [%@from.tag, - %@to.tag]\n"); +%@to.tag]\n"); $res = @msg.response.code; xplog("L_ERR", " ... response: %$res\n"); @@ -425,15 +424,15 @@ onreply_route["dialog_creation_reply"] { break; } if ($res < 101) { - xplog("L_ERR", " ... I won't create dialog from 100 response.\n -"); + xplog("L_ERR", " ... I won't create dialog from 100 response.\n" +); break; } - del_attr("$id"); # xlset_attr works strange when the attribute already -exists - xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:% -@to.tag"); + del_attr("$id"); # xlset_attr works strange when the attribute already e +xists + xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:%@ +to.tag"); if ($res > 299) { xplog("L_ERR", " ... dialog terminated\n"); remove_extra_attrs("dlg", "$id"); @@ -472,8 +471,8 @@ route["save_dialog"] { # use this if you want to delete destroyed dialogs: # remove_extra_attrs("dlg", "$id"); - # else if you want leave them in DB (with the time of terminati -on) + # else if you want leave them in DB (with the time of terminatio +n) $dlg_destroyed_at = @sys.now.local; # set flag for attributes with name beggining with dlg_ @@ -494,8 +493,8 @@ route["load_dialog_data"] { del_attr("$dlg_init_method"); # used as flag of succesful read of data - # delete all used dlg attrs (because load_extra_attrs doesn't delete th -em itself before adding) + # delete all used dlg attrs (because load_extra_attrs doesn't delete the +m itself before adding) del_attr("$dlg_init_method"); del_attr("$dlg_caller"); del_attr("$dlg_callee"); @@ -516,20 +515,20 @@ route["load_dialog"] { # tries to load dialog according tags and callid # try to load dialog - del_attr("$id"); # xlset_attr works strange when the attribute already -exists - xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:% -@to.tag"); + del_attr("$id"); # xlset_attr works strange when the attribute already e +xists + xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:%@ +to.tag"); if (route("load_dialog_data")) { $dir = "caller2callee"; return 1; } # try to load dialog in other direction - del_attr("$id"); # xlset_attr works strange when the attribute already -exists - xlset_attr("$id", "call-id:%@call_id caller_tag:%@to.tag callee_tag:%@f -rom.tag"); + del_attr("$id"); # xlset_attr works strange when the attribute already e +xists + xlset_attr("$id", "call-id:%@call_id caller_tag:%@to.tag callee_tag:%@fr +om.tag"); if (route("load_dialog_data")) { $dir = "callee2caller"; return 1; @@ -545,8 +544,8 @@ route["update_dialog_reply"] { # target refresh for INVITE dialogs if ($dir == "caller2calle") { # if request from caller - $dlg_callee = @contact; # update callee's contact (resp -onse!) + $dlg_callee = @contact; # update callee's contact (respo +nse!) } else { $dlg_caller = @contact; @@ -562,8 +561,8 @@ route["update_dialog"] { # target refresh for INVITE dialogs if ($dir == "caller2calle") { # if request from caller - $dlg_caller = @contact; # update caller's contact (requ -est!) + $dlg_caller = @contact; # update caller's contact (reque +st!) } else { $dlg_callee = @contact; @@ -571,19 +570,19 @@ est!) } if ($dir == "caller2callee") { # if request from caller - # TODO: verify CSeq before modifying and return 500 if lower th -an last one + # TODO: verify CSeq before modifying and return 500 if lower tha +n last one $dlg_caller_cseq = @cseq.num; } else { - # TODO: verify CSeq before modifying and return 500 if lower th -an last one + # TODO: verify CSeq before modifying and return 500 if lower tha +n last one $dlg_callee_cseq = @cseq.num; } if (method=="BYE") { - $dlg_status = "pre-destroyed"; # to see that BYE already went t -hrough + $dlg_status = "pre-destroyed"; # to see that BYE already went th +rough } return 1; } @@ -603,7 +602,7 @@ route["trace_dialog"] { onreply_route["dialog_reply"] { if ($id) { xplog("L_ERR", "In-dialog reply (%rs, %@cseq.method) [%@to.tag, - %@from.tag]\n"); +%@from.tag]\n"); if (!route("load_dialog")) { xplog("L_ERR", "Can't load dialog data\n"); } @@ -662,8 +661,7 @@ route { # initial request or non-dialog message if (method=="INVITE") { route("create_dialog"); - # we don't save the dialog here because AVPs will be se -t + # we don't save the dialog here because AVPs will be set # when reply comes and the dialog will be stored then } else { @@ -679,8 +677,8 @@ t t_on_reply("dialog_reply"); } else { - xplog("L_ERR", "Message within unknown dialog: %@cseq, -to_tag=%@to.tag from_tag=%@from.tag\n"); + xplog("L_ERR", "Message within unknown dialog: %@cseq, t +o_tag=%@to.tag from_tag=%@from.tag\n"); } } diff --git a/modules/uid_domain/README b/modules/uid_domain/README index 7c7af947e..08889ae5f 100644 --- a/modules/uid_domain/README +++ b/modules/uid_domain/README @@ -1,12 +1,11 @@ - UID Domain Module Juha Heinanen - Copyright 2002-2010 Juha Heinanen - _________________________________________________________________ + Copyright © 2002-2010 Juha Heinanen + __________________________________________________________________ Table of Contents @@ -116,49 +115,49 @@ Chapter 1. Admin Guide 1.2. Domain-level Configuration Attributes 1.3. Caching - Domain modules, as the name suggests, implements support for multiple - independent virtual domains hosted on one SIP server. This is often + Domain modules, as the name suggests, implements support for multiple + independent virtual domains hosted on one SIP server. This is often useful if you have multiple domain names and you want to make them all work and appear as one. Alternatively you might find the module useful - if you want to run a shared SIP service for multiple independent - customers. The module stores all supported domains and associated - configuration in a database table. Most of the information can be + if you want to run a shared SIP service for multiple independent + customers. The module stores all supported domains and associated + configuration in a database table. Most of the information can be cached in memory for performance reasons. 1.1. Virtual Domains - The domain module adds support for so-called virtual domains. A - virtual domain is just a collection of domain names and associated - configuration information identified by a unique identifier. We refer - to the domain identifier as DID elsewhere in the documentation. DID + The domain module adds support for so-called virtual domains. A virtual + domain is just a collection of domain names and associated + configuration information identified by a unique identifier. We refer + to the domain identifier as DID elsewhere in the documentation. DID stands for "Domain IDentifier". In traditional POST world the term DID has a different meaning though. Please be aware that this is just pure coincidence. - All domain names that belong to one virtual domain are - interchangeable. From SIP server's perspective there is no difference - between them. They can be used in SIP URIs interchangeably and the - behavior of the SIP server will not be affected. This is called - "domain name normalization" and it is one of the steps performed early - during SIP message processing. + All domain names that belong to one virtual domain are interchangeable. + From SIP server's perspective there is no difference between them. They + can be used in SIP URIs interchangeably and the behavior of the SIP + server will not be affected. This is called "domain name normalization" + and it is one of the steps performed early during SIP message + processing. - The DID identifier can be anything. To the SIP server DIDs are just + The DID identifier can be anything. To the SIP server DIDs are just opaque strings and what format you choose depends on your requirements - and the type of the setup. You can use numbers in smaller setups if - the size of the data is a concern. You can set the DID to the - canonical domain name of the domain. You can use RFC 4122 style UUIDs - if your setup is large and distributed. You can use anything as long - as it can be represented as string. The only requirement is that the - identifier of each virtual domain must be unique. - - The following example illustrates how one virtual domain can be + and the type of the setup. You can use numbers in smaller setups if the + size of the data is a concern. You can set the DID to the canonical + domain name of the domain. You can use RFC 4122 style UUIDs if your + setup is large and distributed. You can use anything as long as it can + be represented as string. The only requirement is that the identifier + of each virtual domain must be unique. + + The following example illustrates how one virtual domain can be represented. The iptel.org domain runs a public SIP service. The users - of the service can use SIP URIs of form sip:username@iptel.org. The - SIP service is distributed, there is a number of SIP servers. The SIP - servers are also available through a number of other domain names, - such as sip.iptel.org, proxy.iptel.org and so on. We created one - virtual domain in the domain module and added all such domain names to - the virtual domain: + of the service can use SIP URIs of form sip:username@iptel.org. The SIP + service is distributed, there is a number of SIP servers. The SIP + servers are also available through a number of other domain names, such + as sip.iptel.org, proxy.iptel.org and so on. We created one virtual + domain in the domain module and added all such domain names to the + virtual domain: Example 1.1. Virtual Domain iptel.org iptel @@ -168,17 +167,17 @@ iptel +---proxy.iptel.org +---213.192.59.75 - In the example above, we chose "iptel" as the unique identifier for - the virtual domain. This identifier is permanent. It never changes. - Over time we may change domain names assigned to this virtual domain, - but this identifier never changes. The main reason why virtual domain + In the example above, we chose "iptel" as the unique identifier for the + virtual domain. This identifier is permanent. It never changes. Over + time we may change domain names assigned to this virtual domain, but + this identifier never changes. The main reason why virtual domain identifiers must never change is that because they are referenced from - other tables, for example the accounting table. The data in the - accounting table is long-lived, usually archived, and this ensures - that the data will still reference correct virtual domain, no matter - what domain names are assigned to it. + other tables, for example the accounting table. The data in the + accounting table is long-lived, usually archived, and this ensures that + the data will still reference correct virtual domain, no matter what + domain names are assigned to it. - The virtual domain described above will be stored in the domain table + The virtual domain described above will be stored in the domain table in the database: Example 1.2. Database Representation of Virtual Domain @@ -191,42 +190,42 @@ iptel | iptel | 213.192.59.75 | 33 | +-------+-----------------+-------+ - Because all domain names that belong to one particular virtual domain - are equal, it does not matter which domain name is used in the host - part of the SIP URI. Thus an imaginary user joe with SIP URI - sip:joe@iptel.org will also be reachable as sip:joe@sip.iptel.org, - sip:joe@proxy.iptel.org, and sip:joe@213.192.59.75. If we add a new - domain name to this virtual domain then joe will also be able to use - the new domain name in his SIP URI, without the need to change + Because all domain names that belong to one particular virtual domain + are equal, it does not matter which domain name is used in the host + part of the SIP URI. Thus an imaginary user joe with SIP URI + sip:joe@iptel.org will also be reachable as sip:joe@sip.iptel.org, + sip:joe@proxy.iptel.org, and sip:joe@213.192.59.75. If we add a new + domain name to this virtual domain then joe will also be able to use + the new domain name in his SIP URI, without the need to change anything. 1.2. Domain-level Configuration Attributes - In addition to a number of domain names, each virtual domain can also - have extra configuration information associated with it. The - possibility to configure the SIP server sightly differently in each - virtual domain is, in fact, the main reason why we introduced the - concept of virtual domains. We wanted to have one SIP server which - will provide SIP service to multiple different customers and each of - the customers may have slightly different configuration requirements. + In addition to a number of domain names, each virtual domain can also + have extra configuration information associated with it. The + possibility to configure the SIP server sightly differently in each + virtual domain is, in fact, the main reason why we introduced the + concept of virtual domains. We wanted to have one SIP server which will + provide SIP service to multiple different customers and each of the + customers may have slightly different configuration requirements. That's how domain-level configuration attributes were born. Because the administrator of the SIP server seldom knows configuration - requirements in advance, we decided to implement a generic solution - and store all configuration options in named attributes. Named - attributes are just like variables, they have a name and they have a - value. Attributes are accessible from the configuration script of the - SIP server. Domain-level attributes are attributes that are associated - with a particular virtual domain. They can be used to store additional - configuration for the entire virtual domain, that is all users that - belong (or have SIP URI) in that particular virtual domain. - Domain-level attributes can be overridden be user-level attributes - with the same name configured for a particular user. In other words a - domain level attribute will only be effective if no user-level - attribute with the same name exists. - - Domain-level attributes are stored in a separate table. The name of - the table is domain_attrs and it is defined as follows: + requirements in advance, we decided to implement a generic solution and + store all configuration options in named attributes. Named attributes + are just like variables, they have a name and they have a value. + Attributes are accessible from the configuration script of the SIP + server. Domain-level attributes are attributes that are associated with + a particular virtual domain. They can be used to store additional + configuration for the entire virtual domain, that is all users that + belong (or have SIP URI) in that particular virtual domain. + Domain-level attributes can be overridden be user-level attributes with + the same name configured for a particular user. In other words a domain + level attribute will only be effective if no user-level attribute with + the same name exists. + + Domain-level attributes are stored in a separate table. The name of the + table is domain_attrs and it is defined as follows: Example 1.3. Table domain_attrs +-------+------------------+------+-----+---------+-------+ @@ -239,55 +238,54 @@ iptel | flags | int(10) unsigned | NO | | 0 | | +-------+------------------+------+-----+---------+-------+ - Each attribute has name, type and value. A single attribute can have - multiple values and in that case it will occupy more rows in the - table. Each attribute is associated with a particular virtual domain - using the DID identifier. Domain-level attributes can contain just - about anything. It is a generic configuration mechanism and it is up - to you to define a list of attribute that are meaningful in your setup - and use those attributes in the routing part of the configuration - file. - - Attributes for a particular virtual-domain are made available to - script function by the lookup_domain function. This is the function - that is used to map domain names to DIDs. One of the side-effects of - the function is that it makes domain-level attributes available to - script function if a matching virtual domain is found. - - When caching is enabled, all attributes from domain_attrs table are - cached in memory, just like virtual domain themselves. If you disable - caching then the domain module will attempt to load attributes from - the database each time you call lookup_domain. Attributes cached in - memory can be realoaded with the domain.reload management function. + Each attribute has name, type and value. A single attribute can have + multiple values and in that case it will occupy more rows in the table. + Each attribute is associated with a particular virtual domain using the + DID identifier. Domain-level attributes can contain just about + anything. It is a generic configuration mechanism and it is up to you + to define a list of attribute that are meaningful in your setup and use + those attributes in the routing part of the configuration file. + + Attributes for a particular virtual-domain are made available to script + function by the lookup_domain function. This is the function that is + used to map domain names to DIDs. One of the side-effects of the + function is that it makes domain-level attributes available to script + function if a matching virtual domain is found. + + When caching is enabled, all attributes from domain_attrs table are + cached in memory, just like virtual domain themselves. If you disable + caching then the domain module will attempt to load attributes from the + database each time you call lookup_domain. Attributes cached in memory + can be realoaded with the domain.reload management function. 1.3. Caching - Domain module operates in caching or non-caching mode depending on + Domain module operates in caching or non-caching mode depending on value of module parameter db_mode. In caching mode domain module reads - the contents of domain table into cache memory when the module is - loaded. After that domain table is re-read only when module is given - domain_reload fifo command. Any changes in domain table must thus be - followed by domain_reload command in order to reflect them in module - behavior. In non-caching mode domain module always queries domain - table in the database. - - Caching is implemented using a hash table. The size of the hash table - is given by HASH_SIZE constant defined in domain_mod.h. Its "factory - default" value is 128. Caching mode is highly recommended if you want + the contents of domain table into cache memory when the module is + loaded. After that domain table is re-read only when module is given + domain_reload fifo command. Any changes in domain table must thus be + followed by domain_reload command in order to reflect them in module + behavior. In non-caching mode domain module always queries domain table + in the database. + + Caching is implemented using a hash table. The size of the hash table + is given by HASH_SIZE constant defined in domain_mod.h. Its "factory + default" value is 128. Caching mode is highly recommended if you want to use domain-level attributes. 2. Dependencies - The module depends on the following modules (in the other words the + The module depends on the following modules (in the other words the listed modules must be loaded before this module): * database - Any database module 3. Known Limitations - There is an unlikely race condition on domain list update. If a - process uses a table, which is reloaded at the same time twice through - FIFO, the second reload will delete the original table still in use by - the process. + There is an unlikely race condition on domain list update. If a process + uses a table, which is reloaded at the same time twice through FIFO, + the second reload will delete the original table still in use by the + process. 4. Parameters @@ -316,8 +314,8 @@ modparam("domain", "db_url", "mysql://ser:pass@db_host/ser") 4.2. db_mode (integer) - Database mode. Value 0 means non-caching, 1 means caching is enabled. - It is highly recommended to enable caching if you want to use + Database mode. Value 0 means non-caching, 1 means caching is enabled. + It is highly recommended to enable caching if you want to use domain-level attributes. Default value is 1 (caching). @@ -327,8 +325,8 @@ modparam("domain", "db_mode", 0) # Do not use caching 4.3. domain_table (string) - Name of table containing names of local domains that the proxy is - responsible for. Local users must have in their SIP URI a host part + Name of table containing names of local domains that the proxy is + responsible for. Local users must have in their SIP URI a host part that is equal to one of the domains stored in this table. Default value is "domain". @@ -338,10 +336,10 @@ modparam("domain", "domain_table", "new_name") 4.4. did_col (string) - This is the name of the column in domain table that contains the - unique identifiers of virtual domains. Domains names found in this - table are arranged into virtual domains. Each virtual domain must have - a unique identifier and it can contain one or more domain names. + This is the name of the column in domain table that contains the unique + identifiers of virtual domains. Domains names found in this table are + arranged into virtual domains. Each virtual domain must have a unique + identifier and it can contain one or more domain names. Default value is "did". @@ -359,10 +357,10 @@ modparam("domain", "domain_col", "domain") 4.6. flags_col (string) - This is the name of the column in domain table which stores various - flags. Each row in the table has a bunch of generic flags that can be - used mark the row disabled, deleted, etc. The flags allow for more - flexible administration of the data in the database and they are + This is the name of the column in domain table which stores various + flags. Each row in the table has a bunch of generic flags that can be + used mark the row disabled, deleted, etc. The flags allow for more + flexible administration of the data in the database and they are present in several other tables too. Default value is "flags". @@ -372,11 +370,11 @@ modparam("domain", "flags_col", "domain") 4.7. domattr_table (string) - This parameter can be used to configure the name of the table that is - used to store domain-level attributes. Domain level attributes are - attributes that are associated with a particular virtual domain. They - are typically used to store additional domain-wide settings that - should apply to all users who belong to the domain. + This parameter can be used to configure the name of the table that is + used to store domain-level attributes. Domain level attributes are + attributes that are associated with a particular virtual domain. They + are typically used to store additional domain-wide settings that should + apply to all users who belong to the domain. Default value is "domain_attrs". @@ -386,10 +384,9 @@ modparam("domain", "domattr_table", "domain_attrs") 4.8. domattr_did (string) Use this parameter to configure the name of the column in domain_attrs - table that is used to store the did of the virtual domain the - attribute belongs to. Normally there is no need to configure this - parameter, unless you want adapt to module to a different database - schema. + table that is used to store the did of the virtual domain the attribute + belongs to. Normally there is no need to configure this parameter, + unless you want adapt to module to a different database schema. Default value is "did". @@ -399,9 +396,9 @@ modparam("domain", "domattr_did", "did") 4.9. domattr_name (string) Use this parameter to configure the name of the column in domain_attrs - table that is used to store the name of the attribute. Normally there - is no need to configure this parameter, unless you want adapt to - module to a different database schema. + table that is used to store the name of the attribute. Normally there + is no need to configure this parameter, unless you want adapt to module + to a different database schema. Default value is "name". @@ -411,9 +408,9 @@ modparam("domain", "domattr_name", "name") 4.10. domattr_type (string) Use this parameter to configure the name of the column in domain_attrs - table that is used to store the type of the attribute. Normally there - is no need to configure this parameter, unless you want adapt to - module to a different database schema. + table that is used to store the type of the attribute. Normally there + is no need to configure this parameter, unless you want adapt to module + to a different database schema. Default value is "type". @@ -424,8 +421,8 @@ modparam("domain", "domattr_type", "type") Use this parameter to configure the name of the column in domain_attrs table that is used to store the value of the attribute. Normally there - is no need to configure this parameter, unless you want adapt to - module to a different database schema. + is no need to configure this parameter, unless you want adapt to module + to a different database schema. Default value is "value". @@ -434,11 +431,11 @@ modparam("domain", "domattr_value", "value") 4.12. domattr_flags (string) - This is the name of the column in domain_attrs table which stores + This is the name of the column in domain_attrs table which stores various flags. Each row in the table has a bunch of generic flags that - can be used mark the row disabled, deleted, etc. The flags allow for - more flexible administration of the data in the database and they are - present in several other tables too. You do not have to touch this + can be used mark the row disabled, deleted, etc. The flags allow for + more flexible administration of the data in the database and they are + present in several other tables too. You do not have to touch this parameter under normal circumstances. Default value is "flags". @@ -448,16 +445,16 @@ modparam("domain", "domattr_flags", "flags") 4.13. load_domain_attrs (integer) - This parameter can be used to enable/disable user of domain-level - attributes. Domain-level attributes are variables that can be used to - store additional configuration that applies to the whole virtual - domain and all users within the virtual domain. Domain-level - attributes are stored in domain_attrs. If you set this parameter to a - non-zero value then the server will make domain-level attributes - available to the script every time you call function lookup_domain. If - you set the parameter to 0 then domain-level attributes will be - ignored, the domain module will not load them from the database and - the lookup function will not make them available to the script. + This parameter can be used to enable/disable user of domain-level + attributes. Domain-level attributes are variables that can be used to + store additional configuration that applies to the whole virtual domain + and all users within the virtual domain. Domain-level attributes are + stored in domain_attrs. If you set this parameter to a non-zero value + then the server will make domain-level attributes available to the + script every time you call function lookup_domain. If you set the + parameter to 0 then domain-level attributes will be ignored, the domain + module will not load them from the database and the lookup function + will not make them available to the script. Default value is 0. @@ -471,21 +468,21 @@ modparam("domain", "load_domain_attrs", 1) 5.1. is_local(domain) - This function can be used to test whether a given domain name in - parameter belongs to one of the virtual domains defined in the domain + This function can be used to test whether a given domain name in + parameter belongs to one of the virtual domains defined in the domain table. Such domain name is said to be local. The function returns 1 if the domain name is found in the domain table and -1 otherwise. - The first parameter of the function can be anything that returns a - string with domain name. In its simplest form it can be a string with - domain name: is_local("iptel.org"). You can also test a domain name - stored in an attribute: is_local("$my_domain"). And finally you can - test a domain name present in the SIP message with selects: + The first parameter of the function can be anything that returns a + string with domain name. In its simplest form it can be a string with + domain name: is_local("iptel.org"). You can also test a domain name + stored in an attribute: is_local("$my_domain"). And finally you can + test a domain name present in the SIP message with selects: is_local("@ruri.host"). - Note: Unlike function lookup_domain, this function does not make - domain attributes of the virtual domain available to the script. - Domain attributes are simply ignored by this function. + Note: Unlike function lookup_domain, this function does not make domain + attributes of the virtual domain available to the script. Domain + attributes are simply ignored by this function. Example 1.17. is_uri_host_local_local usage ... @@ -496,46 +493,46 @@ if (is_local("@ruri.host")) { 5.2. lookup_domain(attr_group, domain) - This is the main function of the domain module. It can be used to - implement support for virtual domains in the SIP server. Each virtual + This is the main function of the domain module. It can be used to + implement support for virtual domains in the SIP server. Each virtual domain is identified by a unique identifier (opaque string) and it can - have one or more associated domain names. Given a domain name in the - second parameter, this function finds the associated virtual domain - identifier (known as DID) and stores it in an attribute for later - user. In addition to that the function also loads all domain-level - attributes for the virtual domain and makes them available to the - configuration script. + have one or more associated domain names. Given a domain name in the + second parameter, this function finds the associated virtual domain + identifier (known as DID) and stores it in an attribute for later user. + In addition to that the function also loads all domain-level attributes + for the virtual domain and makes them available to the configuration + script. The first parameter of the function identifies the group of attributes - where the DID and domain-level attributes shall be stored. The value - of the first parameter can be either "$fd" for the domain-level - attribute group that belongs to the calling party (From), or "$td" for - the domain-level attribute group that belongs to the called party + where the DID and domain-level attributes shall be stored. The value of + the first parameter can be either "$fd" for the domain-level attribute + group that belongs to the calling party (From), or "$td" for the + domain-level attribute group that belongs to the called party (Request-URI). The value of the second parameter can be a simple string, an attribute name, or a select. See the documentation of function is_local for more details. - If a match is found then the DID of the virtual domain will be stored - either in $fd.did or in $td.did, depending on the value of the first - parameter. In addition to that domain-level attributes, if any, will - be available as either $fd. or $td.. + If a match is found then the DID of the virtual domain will be stored + either in $fd.did or in $td.did, depending on the value of the first + parameter. In addition to that domain-level attributes, if any, will be + available as either $fd. or $td.. - The function returns 1 when a matching virtual domain for the given + The function returns 1 when a matching virtual domain for the given domain name was found and -1 otherwise. - The following example shows a typical use of the function. In a multi - domain setup, one has to typically figure out where the both the - calling and the called domains are local (i.e. configured on the - server as the domains the server is responsible for). This is - typically done by calling function lookup_domain twice, once with the - hostname part of the From header as parameter and secondly with the - hostname part of the Request-URI as parameter. - - The type of the situation can be then determined from the value of - corresponding attributes ($td.did and $fd.did). A non-existing - attribute value indicates that the domain name is not local (it does + The following example shows a typical use of the function. In a multi + domain setup, one has to typically figure out where the both the + calling and the called domains are local (i.e. configured on the server + as the domains the server is responsible for). This is typically done + by calling function lookup_domain twice, once with the hostname part of + the From header as parameter and secondly with the hostname part of the + Request-URI as parameter. + + The type of the situation can be then determined from the value of + corresponding attributes ($td.did and $fd.did). A non-existing + attribute value indicates that the domain name is not local (it does not belong to any virtual domain configured in the domain table). Example 1.18. lookup_domain usage @@ -572,26 +569,26 @@ if ($fd.did && $td.did) { 6.1. domain.reload - Causes domain module to re-read the contents of domain table into - cache memory. If domain-level attributes are used then it will also - re-load the contents of the domain_attrs table in the memory cache. + Causes domain module to re-read the contents of domain table into cache + memory. If domain-level attributes are used then it will also re-load + the contents of the domain_attrs table in the memory cache. 6.2. domain.dump - Causes domain module to dump hash indexes and domain names in its - cache memory. + Causes domain module to dump hash indexes and domain names in its cache + memory. 7. Internal API - The domain module has an internal API which can be used to access - additional functions of the module (i.e. functions that are normally + The domain module has an internal API which can be used to access + additional functions of the module (i.e. functions that are normally not available from the routing script). Currently the API exports only - the function is_domain_local. That function can be used to determine - whether a given domain name is on the list of locally configured - domain names. + the function is_domain_local. That function can be used to determine + whether a given domain name is on the list of locally configured domain + names. - If you want to use the internal API of domain module from your module - then you need to include the header file domain_api.h and call + If you want to use the internal API of domain module from your module + then you need to include the header file domain_api.h and call load_domain_api first. Example 1.19. Calling load_domain_api @@ -603,7 +600,7 @@ if (load_domain_api(&dom_api) != 0) { /* error */ } - After that you can call function is_domain_local whose pointer is + After that you can call function is_domain_local whose pointer is stored in the initialized data structure: str tmp = STR_STATIC_INIT("mydomain.com"); diff --git a/modules/uid_domain/uid_domain_mod.c b/modules/uid_domain/uid_domain_mod.c index fda7bb960..abe43d5b3 100644 --- a/modules/uid_domain/uid_domain_mod.c +++ b/modules/uid_domain/uid_domain_mod.c @@ -433,7 +433,7 @@ static int db_load_domain(domain_t** d, unsigned long flags, str* domain) static int lookup_domain(struct sip_msg* msg, char* flags, char* fp) { str domain, tmp; - domain_t* d; + domain_t* d = NULL; int ret = -1; if (get_str_fparam(&domain, msg, (fparam_t*)fp) != 0) { @@ -527,13 +527,12 @@ int reload_domain_list(void) static int lookup_domain_fixup(void** param, int param_no) { - unsigned long flags; + unsigned long flags=0; char* s; if (param_no == 1) { /* Determine the track and class of attributes to be loaded */ s = (char*)*param; - flags = 0; if (*s != '$' || (strlen(s) != 3)) { ERR("Invalid parameter value, $xy expected\n"); return -1; diff --git a/modules/uid_gflags/README b/modules/uid_gflags/README index 4679fb7bf..89b2b514e 100644 --- a/modules/uid_gflags/README +++ b/modules/uid_gflags/README @@ -4,7 +4,7 @@ Jiri Kuthan - Copyright 2004 FhG FOKUS + Copyright © 2004 FhG FOKUS __________________________________________________________________ Table of Contents diff --git a/modules/uid_uri_db/README b/modules/uid_uri_db/README index 5926fe1fa..3853195a4 100644 --- a/modules/uid_uri_db/README +++ b/modules/uid_uri_db/README @@ -1,12 +1,11 @@ - UID Uri_db Module Jan Janak FhG FOKUS - Copyright 2003 FhG FOKUS - _________________________________________________________________ + Copyright © 2003 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -27,9 +26,9 @@ Jan Janak 4. Functions - 4.1. check_to() - 4.2. check_from() - 4.3. does_uri_exist() + 4.1. check_to() + 4.2. check_from() + 4.3. does_uri_exist() List of Examples @@ -64,9 +63,9 @@ Chapter 1. Admin Guide 4. Functions - 4.1. check_to() - 4.2. check_from() - 4.3. does_uri_exist() + 4.1. check_to() + 4.2. check_from() + 4.3. does_uri_exist() 1. Overview @@ -178,9 +177,9 @@ modparam("module", "subscriber_domain_column", "domain") 4. Functions - 4.1. check_to() - 4.2. check_from() - 4.3. does_uri_exist() + 4.1. check_to() + 4.2. check_from() + 4.3. does_uri_exist() 4.1. check_to() diff --git a/modules/uri_db/README b/modules/uri_db/README index 2a7d42c07..ee174ee7d 100644 --- a/modules/uri_db/README +++ b/modules/uri_db/README @@ -12,9 +12,9 @@ Edited by Bogdan-Andrei Iancu - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -118,7 +118,7 @@ Chapter 1. Admin Guide If the db_url string is empty, the default database URL will be used. - Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 1.1. Set db_url parameter ... @@ -127,11 +127,11 @@ modparam("uri_db", "db_url", "mysql://username:password@localhost/openser") 3.2. db_table (string) - The DB table that should be used. Its possible to use the "subscriber" - and "uri" table. If the "uri" table should be used, an additional - parameter "use-uri-table") must be set. + The DB table that should be used. Its possible to use the “subscriber” + and “uri” table. If the “uri” table should be used, an additional + parameter “use-uri-table”) must be set. - Default value is "subscriber". + Default value is “subscriber”. Example 1.2. Set uri_table parameter ... @@ -142,7 +142,7 @@ modparam("uri_db", "db_table", "uri") Column holding usernames in the table. - Default value is "username". + Default value is “username”. Example 1.3. Set user_column parameter ... @@ -153,7 +153,7 @@ modparam("uri_db", "user_column", "username") Column holding domain in the table. - Default value is "domain". + Default value is “domain”. Example 1.4. Set domain_column parameter ... @@ -164,7 +164,7 @@ modparam("uri_db", "domain_column", "domain") Column holding URI username in the table. - Default value is "uri_user". + Default value is “uri_user”. Example 1.5. Set uriuser_column parameter ... @@ -173,10 +173,10 @@ modparam("uri_db", "uriuser_column", "uri_user") 3.6. use_uri_table (integer) - Specify if the "uri" table should be used for checkings instead of - "subscriber" table. A non-zero value means true. + Specify if the “uri” table should be used for checkings instead of + “subscriber” table. A non-zero value means true. - Default value is "0 (false)". + Default value is “0 (false)”. Example 1.6. Set use_uri_table parameter ... @@ -189,11 +189,11 @@ modparam("uri_db", "use_uri_table", 1) users (along with username). This is useful in multi domain setups, a non-zero value means true. - This parameter is only evaluated for calls to "does_uri_exist", all + This parameter is only evaluated for calls to “does_uri_exist”, all other functions checks the digest username and realm against the given - username, if the "uri" table is used. + username, if the “uri” table is used. - Default value is "0 (false)". + Default value is “0 (false)”. Example 1.7. Set use_domain parameter ... @@ -206,9 +206,9 @@ modparam("uri_db", "use_domain", 1) 4.2. check_from() 4.3. does_uri_exist() -4.1. check_to() +4.1. check_to() - Check "To" username against URI table (if use_uri_table is set) or + Check “To” username against URI table (if use_uri_table is set) or digest credentials (no DB backend required). This function can be used from REQUEST_ROUTE. @@ -220,9 +220,9 @@ if (check_to()) { }; ... -4.2. check_from() +4.2. check_from() - Check "From" username against URI table (if use_uri_table is set) or + Check “From” username against URI table (if use_uri_table is set) or digest credentials (no DB backend required). This function can be used from REQUEST_ROUTE. @@ -234,7 +234,7 @@ if (check_from()) { }; ... -4.3. does_uri_exist() +4.3. does_uri_exist() Check if username in the request URI belongs to an existing user. diff --git a/modules/userblacklist/README b/modules/userblacklist/README index affcbe9d5..ec67c00a7 100644 --- a/modules/userblacklist/README +++ b/modules/userblacklist/README @@ -14,7 +14,7 @@ Pawel Kuzak 1&1 Internet AG - Copyright 2008 1&1 Internet AG + Copyright © 2008 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -58,6 +58,11 @@ Pawel Kuzak 5. MI Commands 5.1. reload_blacklist + 5.2. dump_blacklist + 5.3. check_blacklist prefix + 5.4. check_whitelist prefix + 5.5. check_userblacklist user [domain] prefix + 5.6. check_userwhitelist user [domain] prefix 6. Installation and Running @@ -84,8 +89,13 @@ Pawel Kuzak 1.17. check_blacklist usage 1.18. check_whitelist usage 1.19. reload_blacklist usage - 1.20. Example database content - globalblacklist table - 1.21. Example database content - userblacklist table + 1.20. dump_blacklist usage + 1.21. check_blacklist usage + 1.22. check_whitelist usage + 1.23. check_userblacklist usage + 1.24. check_userwhitelist usage + 1.25. Example database content - globalblacklist table + 1.26. Example database content - userblacklist table Chapter 1. Admin Guide @@ -128,6 +138,11 @@ Chapter 1. Admin Guide 5. MI Commands 5.1. reload_blacklist + 5.2. dump_blacklist + 5.3. check_blacklist prefix + 5.4. check_whitelist prefix + 5.5. check_userblacklist user [domain] prefix + 5.6. check_userwhitelist user [domain] prefix 6. Installation and Running @@ -200,7 +215,7 @@ Chapter 1. Admin Guide If set to non-zero value, the domain column in the userblacklist table is used. - Default value is "0". + Default value is “0”. Example 1.1. Set use_domain parameter ... @@ -216,7 +231,7 @@ modparam("userblacklist", "use_domain", 1) matching. Please be aware that memory requirements for storing the routing tree in shared memory will also increase by a factor of 12.8. - Default value is "10". + Default value is “10”. Example 1.2. Set match_mode parameter ... @@ -227,7 +242,7 @@ modparam("userblacklist", "match_mode", 128) URL to the database containing the data. - Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. Example 1.3. Set db_url parameter ... @@ -239,7 +254,7 @@ modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname" Name of the userblacklist table for the userblacklist module. - Default value is "userblacklist". + Default value is “userblacklist”. Example 1.4. Set userblacklist_table parameter ... @@ -297,7 +312,7 @@ modparam("userblacklist", "userblacklist_whitelist_col", "whitelist") note that this table is used when the check_blacklist function is called with no parameters. - Default value is "globalblacklist". + Default value is “globalblacklist”. Example 1.10. Set globalblacklist_table parameter ... @@ -351,7 +366,7 @@ modparam("userblacklist", "globalblacklist_description_col", "description") 4.3. check_blacklist ([string table]) 4.4. check_whitelist (string table) -4.1. check_user_blacklist (string user, string domain, string number, string +4.1. check_user_blacklist (string user, string domain, string number, string table) Finds the longest prefix that matches the request URI user (or the @@ -372,7 +387,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) { } ... -4.2. check_user_whitelist (string user, string domain, string number, string +4.2. check_user_whitelist (string user, string domain, string number, string table) Finds the longest prefix that matches the request URI user (or the @@ -393,7 +408,7 @@ if (!check_user_whitelist("$avp(i:80)", "$avp(i:82)")) { } ... -4.3. check_blacklist ([string table]) +4.3. check_blacklist ([string table]) Finds the longest prefix that matches the request URI for the given table. If a match is found and it is not set to whitelist, false is @@ -408,7 +423,7 @@ if (!check_blacklist("globalblacklist")) { } ... -4.4. check_whitelist (string table) +4.4. check_whitelist (string table) Finds the longest prefix that matches the request URI for the given table. If a match is found and it is set to whitelist, true is @@ -425,16 +440,93 @@ if (!check_whitelist("globalblacklist")) { 5. MI Commands 5.1. reload_blacklist + 5.2. dump_blacklist + 5.3. check_blacklist prefix + 5.4. check_whitelist prefix + 5.5. check_userblacklist user [domain] prefix + 5.6. check_userwhitelist user [domain] prefix -5.1. reload_blacklist +5.1. reload_blacklist Reload the internal global blacklist cache. This is necessary after the database tables for the global blacklist have been changed. Example 1.19. reload_blacklist usage -... -kamctl fifo reload_blacklist -... + ... + kamctl fifo reload_blacklist + ... + +5.2. dump_blacklist + + Dumps the default, in memory, global_blacklist content to stdout. Note + that a reload_blacklist should be issued before, in order to see the + latest content of the database. + + Example 1.20. dump_blacklist usage + ... + kamctl fifo reload_blacklist + kamctl fifo dump_blacklist + ... + +5.3. check_blacklist prefix + + Searches in the default, in memory, global list. Finds the longest + prefix that matches the given prefix parameter. Returns true if the + prefix is found and the whitelist is not set. Returns false otherwise - + either prefix found and whitelist set or prefix not found. Note that a + reload_blacklist should be issued before, in order to check through the + latest content of the database. + + Example 1.21. check_blacklist usage + ... + kamctl fifo reload_blacklist + kamctl fifo check_blacklist prefix + ... + +5.4. check_whitelist prefix + + Searches in the default, in memory, global list. Finds the longest + prefix that matches the given prefix parameter. Returns true if the + prefix is found and the whitelist is set. Returns false otherwise - + either prefix found and whitelist not set or prefix not found. Note + that a reload_blacklist should be issued before, in order to check + through the latest content of the database. + + Example 1.22. check_whitelist usage + ... + kamctl fifo reload_blacklist + kamctl fifo check_whitelist prefix + ... + +5.5. check_userblacklist user [domain] prefix + + Searches in the default user list table. Finds the longest prefix for + the given user@domain that matches the given prefix parameter. Returns + true if the prefix is found and the whitelist is not set. Returns false + otherwise - either prefix found and whitelist set or prefix not found. + Note that the domain parameter is optional. If not given, the second + parameter is the considered to be the prefix. + + Example 1.23. check_userblacklist usage + ... + kamctl fifo check_userblacklist user [do +main] prefix + ... + +5.6. check_userwhitelist user [domain] prefix + + Searches in the default user list table. Finds the longest prefix for + the given user@domain that matches the given prefix parameter. Returns + true if the prefix is found and the whitelist is set. Returns false + otherwise - either prefix found and whitelist not set or prefix not + found. Note that the domain parameter is optional. If not given, the + second parameter is the considered to be the prefix. + + Example 1.24. check_userwhitelist usage + ... + kamctl fifo check_userwhitelist user [do +main] prefix + ... 6. Installation and Running @@ -453,7 +545,7 @@ kamctl fifo reload_blacklist complete database documentation on the project webpage, http://www.kamailio.org/docs/db-tables/kamailio-db-devel.html. - Example 1.20. Example database content - globalblacklist table + Example 1.25. Example database content - globalblacklist table ... +----+-----------+-----------+ | id | prefix | whitelist | @@ -466,11 +558,11 @@ kamctl fifo reload_blacklist ... This table will setup a global blacklist for all numbers, only allowing - calls starting with "1". Numbers that starts with "123456" and - "123455787" are also blacklisted, because the longest prefix will be + calls starting with “1”. Numbers that starts with “123456” and + “123455787” are also blacklisted, because the longest prefix will be matched. - Example 1.21. Example database content - userblacklist table + Example 1.26. Example database content - userblacklist table ... +----+----------------+-------------+-----------+-----------+ | id | username | domain | prefix | whitelist | @@ -486,7 +578,7 @@ kamctl fifo reload_blacklist ... This table will setup user specific blacklists for certain usernames. - For example for user "49721123456788" the prefix "1234" will be not - allowed, but the number "123456788" is allowed. Additionally a domain + For example for user “49721123456788” the prefix “1234” will be not + allowed, but the number “123456788” is allowed. Additionally a domain could be specified that is used for username matching if the - "use_domain" parameter is set. + “use_domain” parameter is set. diff --git a/modules/userblacklist/userblacklist.c b/modules/userblacklist/userblacklist.c index 17aebc2fa..20416ed65 100644 --- a/modules/userblacklist/userblacklist.c +++ b/modules/userblacklist/userblacklist.c @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -75,7 +75,7 @@ typedef struct _avp_check struct check_blacklist_fs_t { - struct dtrie_node_t *dtrie_root; + struct dtrie_node_t *dtrie_root; }; str userblacklist_db_url = str_init(DEFAULT_RODB_URL); @@ -179,7 +179,7 @@ struct source_t { struct source_list_t { - struct source_t *head; + struct source_t *head; }; @@ -190,41 +190,13 @@ static struct dtrie_node_t *dtrie_root = NULL; static int check_user_blacklist_fixup(void** param, int param_no) { - pv_elem_t *model=NULL; - str s; - - /* convert to str */ - s.s = (char*)*param; - s.len = strlen(s.s); - if (param_no > 0 && param_no <= 4) { - if(s.len == 0 && param_no != 4) { + if(strlen((char*)*param) == 0 && param_no != 4) { LM_ERR("no parameter %d\n", param_no); return E_UNSPEC; } + return fixup_spve_null(param, 1); - if(pv_parse_format(&s, &model) < 0 || !model) { - LM_ERR("wrong format [%.*s] for parameter %d\n", s.len, s.s, param_no); - return E_UNSPEC; - } - - if(model->spec==NULL || model->spec->getf==NULL) { - if(param_no == 1) { - if(str2int(&s, (unsigned int*)&model->spec->pvp.pvn.u.isname.name.n) != 0) { - LM_ERR("wrong value [%.*s] for parameter %d\n", s.len, s.s, param_no); - return E_UNSPEC; - } - } else { - if(param_no == 2 || param_no == 3) { - LM_ERR("wrong value [%.*s] for parameter %d\n", s.len, s.s, param_no); - return E_UNSPEC; - } else { - // only a string - return 0; - } - } - } - *param = (void*)model; } else { LM_ERR("wrong number of parameters\n"); } @@ -233,7 +205,8 @@ static int check_user_blacklist_fixup(void** param, int param_no) } -static int check_user_list(struct sip_msg *msg, char* str1, char* str2, char* str3, char* str4, int listtype) +static int check_user_list(sip_msg_t *msg, char* str1, char* str2, + char* str3, char* str4, int listtype) { str user = { .len = 0, .s = NULL }; str domain = { .len = 0, .s = NULL}; @@ -245,32 +218,31 @@ static int check_user_list(struct sip_msg *msg, char* str1, char* str2, char* st char req_number[MAXNUMBERLEN+1]; /* user */ - if(((pv_elem_p)str1)->spec!=NULL && ((pv_elem_p)str1)->spec->getf!=NULL) { - if(pv_printf_s(msg, (pv_elem_p)str1, &user) != 0) { - LM_ERR("cannot print user pseudo-variable\n"); - return -1; - } + if(fixup_get_svalue(msg, (gparam_t*)str1, &user)!=0) { + LM_ERR("cannot print user pseudo-variable\n"); + return -1; } /* domain */ - if(((pv_elem_p)str2)->spec!=NULL && ((pv_elem_p)str2)->spec->getf) { - if(pv_printf_s(msg, (pv_elem_p)str2, &domain) != 0) { - LM_ERR("cannot print domain pseudo-variable\n"); - return -1; - } + if(fixup_get_svalue(msg, (gparam_t*)str2, &domain)!=0) { + LM_ERR("cannot print domain pseudo-variable\n"); + return -1; } /* source number */ - if(str3 != NULL && ((pv_elem_p)str3)->spec!=NULL && ((pv_elem_p)str3)->spec->getf!=NULL) { - if(pv_printf_s(msg, (pv_elem_p)str3, &number) != 0) { + if(str3 != NULL) { + if(fixup_get_svalue(msg, (gparam_t*)str3, &number)!=0) { LM_ERR("cannot print number pseudo-variable\n"); return -1; } } /* table name */ - if(str4 != NULL && strlen(str4) > 0) { - /* string */ - table.s=str4; - table.len=strlen(str4); - } else { + if(str4 != NULL) { + if(fixup_get_svalue(msg, (gparam_t*)str3, &table)!=0) { + LM_ERR("cannot print number pseudo-variable\n"); + return -1; + } + } + + if(table.len<=0) { /* use default table name */ table.len=userblacklist_table.len; table.s=userblacklist_table.s; @@ -283,7 +255,8 @@ static int check_user_list(struct sip_msg *msg, char* str1, char* str2, char* st if(number.s == NULL) { /* use R-URI */ - if ((parse_sip_msg_uri(msg) < 0) || (!msg->parsed_uri.user.s) || (msg->parsed_uri.user.len > MAXNUMBERLEN)) { + if ((parse_sip_msg_uri(msg) < 0) || (!msg->parsed_uri.user.s) + || (msg->parsed_uri.user.len > MAXNUMBERLEN)) { LM_ERR("cannot parse msg URI\n"); return -1; } @@ -473,7 +446,7 @@ static int check_blacklist_fixup(void **arg, int arg_no) char *table = (char *)(*arg); struct dtrie_node_t *node = NULL; struct check_blacklist_fs_t *new_arg; - + if (arg_no != 1) { LM_ERR("wrong number of parameters\n"); return -1; @@ -487,7 +460,7 @@ static int check_blacklist_fixup(void **arg, int arg_no) if (add_source(table) != 0) { LM_ERR("could not add table"); return -1; - } + } /* get the node that belongs to the table */ node = table2dt(table); @@ -705,8 +678,8 @@ static void dump_dtrie_mi(const struct dtrie_node_t *root, return ; } - /* If data found, add a new node to the reply tree */ - if (root->data) { + /* If data found, add a new node to the reply tree */ + if (root->data) { /* Create new node and add it to the roots's kids */ if(!(crt_node = add_mi_node_child(&reply->node, MI_DUP_NAME, prefix, *length, 0, 0)) ) { @@ -729,34 +702,34 @@ static void dump_dtrie_mi(const struct dtrie_node_t *root, LM_ERR("cannot add attributes to the node\n"); return ; } - } + } /* Perform a DFS search */ - for (i = 0; i < branches; i++) { - /* If child branch found, traverse it */ - if (root->child[i]) { - if (branches == 10) { - digit = i + '0'; - } else { - digit = i; - } - - /* Push digit in prefix stack */ + for (i = 0; i < branches; i++) { + /* If child branch found, traverse it */ + if (root->child[i]) { + if (branches == 10) { + digit = i + '0'; + } else { + digit = i; + } + + /* Push digit in prefix stack */ if (*length >= MAXNUMBERLEN + 1) { LM_ERR("prefix length exceeds %d\n", MAXNUMBERLEN + 1); return ; } - prefix[(*length)++] = digit; + prefix[(*length)++] = digit; - /* Recursive DFS call */ - dump_dtrie_mi(root->child[i], branches, prefix, length, reply); + /* Recursive DFS call */ + dump_dtrie_mi(root->child[i], branches, prefix, length, reply); - /* Pop digit from prefix stack */ - (*length)--; - } - } + /* Pop digit from prefix stack */ + (*length)--; + } + } - return ; + return ; } @@ -840,8 +813,8 @@ static struct mi_root * check_list_mi(struct mi_root* cmd, int list_type) switch (list_type) { case MARK_WHITELIST: - attr.s = WHITELISTED_S; - attr.len = WHITELISTED_LEN; + attr.s = WHITELISTED_S; + attr.len = WHITELISTED_LEN; if (ret == MARK_WHITELIST) { val.s = TRUE_S; @@ -850,8 +823,8 @@ static struct mi_root * check_list_mi(struct mi_root* cmd, int list_type) break; case MARK_BLACKLIST: - attr.s = BLACKLISTED_S; - attr.len = BLACKLISTED_LEN; + attr.s = BLACKLISTED_S; + attr.len = BLACKLISTED_LEN; if (ret == MARK_BLACKLIST) { val.s = TRUE_S; @@ -983,8 +956,8 @@ static struct mi_root * check_userlist_mi(struct mi_root* cmd, int list_type) switch (list_type) { case MARK_WHITELIST: - attr.s = WHITELISTED_S; - attr.len = WHITELISTED_LEN; + attr.s = WHITELISTED_S; + attr.len = WHITELISTED_LEN; if (ret == MARK_WHITELIST) { val.s = TRUE_S; @@ -993,8 +966,8 @@ static struct mi_root * check_userlist_mi(struct mi_root* cmd, int list_type) break; case MARK_BLACKLIST: - attr.s = BLACKLISTED_S; - attr.len = BLACKLISTED_LEN; + attr.s = BLACKLISTED_S; + attr.len = BLACKLISTED_LEN; if (ret == MARK_BLACKLIST) { val.s = TRUE_S; diff --git a/modules/usrloc/README b/modules/usrloc/README index b949dabf0..f49c25489 100644 --- a/modules/usrloc/README +++ b/modules/usrloc/README @@ -12,17 +12,21 @@ Edited by Jan Janak +Edited by + Bogdan-Andrei Iancu +Edited by + Carsten Bock ng-voice GmbH - Copyright 2003 FhG FOKUS + Copyright © 2003 FhG FOKUS - Copyright 2005 Voice Sistem SRL + Copyright © 2005 Voice Sistem SRL - Copyright 2015 ng-voice GmbH + Copyright © 2015 ng-voice GmbH __________________________________________________________________ Table of Contents @@ -308,8 +312,8 @@ Chapter 1. Admin Guide check the Call-ID only (independent of the Contact-Header or Path). To find out how to control/select the contact maching algorithm, please - see the module parameter matching_mode - Section 3.26, "matching_mode - (integer)". + see the module parameter matching_mode - Section 3.26, “matching_mode + (integer)”. 2. Dependencies @@ -378,7 +382,7 @@ Chapter 1. Admin Guide is or not natted). This is a branch flag and it will be imported and used by all other modules depending of usrloc module. - Default value is "not set". + Default value is “not set”. Example 1.1. Set nat_bflag parameter ... @@ -389,7 +393,7 @@ modparam("usrloc", "nat_bflag", 3) Name of database column containing usernames. - Default value is "username". + Default value is “username”. Example 1.2. Set user_column parameter ... @@ -400,7 +404,7 @@ modparam("usrloc", "user_column", "username") Name of database column containing domains. - Default value is "domain". + Default value is “domain”. Example 1.3. Set user_column parameter ... @@ -411,7 +415,7 @@ modparam("usrloc", "domain_column", "domain") Name of database column containing contacts. - Default value is "contact". + Default value is “contact”. Example 1.4. Set contact_column parameter ... @@ -422,7 +426,7 @@ modparam("usrloc", "contact_column", "contact") Name of database column containing expires value. - Default value is "expires". + Default value is “expires”. Example 1.5. Set expires_column parameter ... @@ -433,7 +437,7 @@ modparam("usrloc", "expires_column", "expires") Name of database column containing q values. - Default value is "q". + Default value is “q”. Example 1.6. Set q_column parameter ... @@ -444,7 +448,7 @@ modparam("usrloc", "q_column", "q") Name of database column containing Call-ID values. - Default value is "callid". + Default value is “callid”. Example 1.7. Set callid_column parameter ... @@ -455,7 +459,7 @@ modparam("usrloc", "callid_column", "callid") Name of database column containing Cseq. - Default value is "cseq". + Default value is “cseq”. Example 1.8. Set cseq_column parameter ... @@ -466,7 +470,7 @@ modparam("usrloc", "cseq_column", "cseq") Name of database column containing supported methods. - Default value is "methods". + Default value is “methods”. Example 1.9. Set methods_column parameter ... @@ -477,7 +481,7 @@ modparam("usrloc", "methods_column", "methods") Name of database column to save the internal flags of the record. - Default value is "flags". + Default value is “flags”. Example 1.10. Set flags_column parameter ... @@ -488,7 +492,7 @@ modparam("usrloc", "flags_column", "flags") Name of database column to save the branch/contact flags of the record. - Default value is "cflags". + Default value is “cflags”. Example 1.11. Set cflags_column parameter ... @@ -499,7 +503,7 @@ modparam("usrloc", "cflags_column", "cflags") Name of database column containing user-agent values. - Default value is "user_agent". + Default value is “user_agent”. Example 1.12. Set user_agent_column parameter ... @@ -511,7 +515,7 @@ modparam("usrloc", "user_agent_column", "user_agent") Name of database column containing the source IP, port, and protocol from the REGISTER message. - Default value is "received". + Default value is “received”. Example 1.13. Set received_column parameter ... @@ -523,7 +527,7 @@ modparam("usrloc", "received_column", "received") Name of database column containing the received socket information (IP:port) for the REGISTER message. - Default value is "socket". + Default value is “socket”. Example 1.14. Set socket_column parameter ... @@ -534,7 +538,7 @@ modparam("usrloc", "socket_column", "socket") Name of database column containing the Path header. - Default value is "path". + Default value is “path”. Example 1.15. Set path_column parameter ... @@ -545,7 +549,7 @@ modparam("usrloc", "path_column", "path") Name of database column containing the Kamailio record unique id. - Default value is "ruid". + Default value is “ruid”. Example 1.16. Set ruid_column parameter ... @@ -557,7 +561,7 @@ modparam("usrloc", "ruid_column", "myruid") Name of database column containing the SIP instance ID (GRUU - RFC5627). This is a unique device identifier - UUID. - Default value is "instance". + Default value is “instance”. Example 1.17. Set instance_column parameter ... @@ -568,7 +572,7 @@ modparam("usrloc", "instance_column", "myinstance") Name of database table column containing the value for server id. - Default value is "server_id". + Default value is “server_id”. Example 1.18. Set server_id_column parameter ... @@ -579,7 +583,7 @@ modparam("usrloc", "server_id_column", "srv_id") Name of database table column containing the value for connection id. - Default value is "connection_id". + Default value is “connection_id”. Example 1.19. Set connection_id_column parameter ... @@ -591,7 +595,7 @@ modparam("usrloc", "connection_id_column", "con_id") Name of database table column containing the value for keepalive status. - Default value is "keepalive". + Default value is “keepalive”. Example 1.20. Set keepalive_column parameter ... @@ -604,7 +608,7 @@ modparam("usrloc", "keepalive_column", "kalive") identifing the user (along with the username part). Useful in multi domain scenarios. Non 0 value means true. - Default value is "0 (false)". + Default value is “0 (false)”. Example 1.21. Set use_domain parameter ... @@ -616,7 +620,7 @@ modparam("usrloc", "use_domain", 1) If the user's contacts should be kept timestamp ordered; otherwise the contact will be ordered based on q value. Non 0 value means true. - Default value is "0 (false)". + Default value is “0 (false)”. Example 1.22. Set desc_time_order parameter ... @@ -640,7 +644,7 @@ modparam("usrloc", "timer_interval", 120) URL of the database that should be used. - Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.24. Set db_url parameter ... @@ -701,7 +705,7 @@ modparam("usrloc", "db_mode", 2) 3.26. matching_mode (integer) What contact matching algorithm to be used. Refer to section - Section 1.1, "Contact matching" for the description of the algorithms. + Section 1.1, “Contact matching” for the description of the algorithms. The parameter may take the following values: * 0 - CONTACT ONLY based matching algorithm. @@ -731,7 +735,7 @@ modparam("usrloc", "matching_mode", 1) A value of 0 disable the retransmission detection. - Default value is "20 seconds". + Default value is “20 seconds”. Example 1.27. Set cseq_delay parameter ... @@ -745,7 +749,7 @@ modparam("usrloc", "cseq_delay", 5) startup. For 1MB of private memory (default) it should be below 4000. The database driver must support fetch_result() capability. - Default value is "2000". + Default value is “2000”. Example 1.28. Set fetch_rows parameter ... @@ -758,7 +762,7 @@ modparam("usrloc", "fetch_rows", 3000) location records is 2^hash_size. For hash_size=4, the number of slots of the hash table is 16. - Default value is "10" (1024 slots). + Default value is “10” (1024 slots). Example 1.29. Set hash_size parameter ... @@ -772,7 +776,7 @@ modparam("usrloc", "hash_size", 12) parameter only to load tables that are not used by registrar module directly in configuration file. - Default value is "NULL". + Default value is “NULL”. Example 1.30. Set preload parameter ... @@ -785,7 +789,7 @@ modparam("usrloc", "preload", "location") UPDATE DB operations. It is recommended to set this parameter if you use Cassandra as a DB backend. - Default value is "0". + Default value is “0”. Example 1.31. Set db_update_as_insert parameter ... @@ -800,7 +804,7 @@ modparam("usrloc", "db_update_as_insert", 1) parameter is ignored - e.g., MySQL and Postgres DB connectors offer affected_rows(). - Default value is "0" (no DB INSERT). + Default value is “0” (no DB INSERT). Example 1.32. Set db_check_update parameter ... @@ -814,7 +818,7 @@ modparam("usrloc", "db_check_update", 1) set to 0, no dedicated timer is started, the one from core will be used. - Default value is "0". + Default value is “0”. Example 1.33. Set timer_procs parameter ... @@ -828,7 +832,7 @@ modparam("usrloc", "timer_procs", 4) xavp_contact must also be set to the same value to use the t_load_contacts and t_next_contacts functions. - Default value is "NULL". + Default value is “NULL”. Example 1.34. Set xavp_contact parameter ... @@ -841,7 +845,7 @@ modparam("usrloc", "xavp_contact", "ulattrs") value. If it is set to 0, the old style using aor, contact and call-id is done. - Default value is "1". + Default value is “1”. Example 1.35. Set db_ops_ruid parameter ... @@ -854,7 +858,7 @@ modparam("usrloc", "db_ops_ruid", 0) TCP/TLS/WS/WSS transports when it looses corresponding tcp connections. Does not currently work in DB-Only scheme. - Default value is "0". + Default value is “0”. Example 1.36. Set handle_lost_tcp parameter ... @@ -866,7 +870,7 @@ modparam("usrloc", "handle_lost_tcp", 1) If set to 1, Kamailio will close the TCP connection when a contact has expired, if the corresponding transport is TCP/TLS/WS/WSS. - Default value is "0". + Default value is “0”. Example 1.37. Set close_expired_tcp parameter ... @@ -881,7 +885,7 @@ modparam("usrloc", "close_expired_tcp", 1) expected to be on default type 'DATETIME'. When it is 1, the database columns types have to be changed manually to 'BIGINT'. - Default value is "0". + Default value is “0”. Example 1.38. Set expires_type parameter ... @@ -896,7 +900,7 @@ modparam("usrloc", "expires_type", 1) (working for MySQL, PostgreSQL, ...). If it is set to 1, the query required by Oracle is used. - Default value is "0". + Default value is “0”. Example 1.39. Set db_raw_fetch_type parameter ... @@ -908,7 +912,7 @@ modparam("usrloc", "db_raw_fetch_type", 1) If set to 1, the insert operation to database will add null values in the sql statement. - Default value is "0" (don't add null fields in insert statement). + Default value is “0” (don't add null fields in insert statement). Example 1.40. Set db_insert_null parameter ... @@ -921,7 +925,7 @@ modparam("usrloc", "db_insert_null", 1) database, if socket value of the record does not in kamailio listening socket list. - Default value is "0". + Default value is “0”. Example 1.41. Set skip_remote_socket parameter ... @@ -934,7 +938,7 @@ modparam("usrloc", "skip_remote_socket", 1) for db_mode WRITE-BACK and WRITE-THROUGH. It uses the secondary timer process. - Default value is "0". + Default value is “0”. Example 1.42. Set db_timer_clean parameter ... @@ -954,7 +958,7 @@ modparam("usrloc", "db_timer_clean", 1) 5.5. ul_add 5.6. ul_show_contact -5.1. ul_rm +5.1. ul_rm Deletes an entire AOR record (including its contacts). @@ -963,7 +967,7 @@ modparam("usrloc", "db_timer_clean", 1) * AOR - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on). -5.2. ul_rm_contact +5.2. ul_rm_contact Deletes a contact from an AOR record. @@ -973,20 +977,20 @@ modparam("usrloc", "db_timer_clean", 1) only if use_domain option is on). * contact - exact contact to be removed -5.3. ul_dump +5.3. ul_dump Dumps the entire content of the USRLOC in memory cache Parameters: * brief - (optional, may not be present); if equals to string - "brief", a brief dump will be done (only AOR and contacts, with no + “brief”, a brief dump will be done (only AOR and contacts, with no other details) -5.4. ul_flush +5.4. ul_flush Triggers the flush of USRLOC memory cache into DB. -5.5. ul_add +5.5. ul_add Adds a new contact for an user AOR. @@ -1002,7 +1006,7 @@ modparam("usrloc", "db_timer_clean", 1) * cflags - per branch flags of the contact * methods - mask with supported requests of the contact -5.6. ul_show_contact +5.6. ul_show_contact Dumps the contacts of an user AOR. @@ -1023,14 +1027,14 @@ modparam("usrloc", "db_timer_clean", 1) 6.8. ul.db_contacts 6.9. ul.db_expired_contacts -6.1. ul.dump +6.1. ul.dump Dumps the content of the location table Parameters: * None. -6.2. ul.lookup table AOR +6.2. ul.lookup table AOR Looks up the contents of an AOR entry in the location table @@ -1039,7 +1043,7 @@ modparam("usrloc", "db_timer_clean", 1) * AOR - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on). -6.3. ul.rm table AOR +6.3. ul.rm table AOR Deletes an entire AOR record (including its contacts). @@ -1048,7 +1052,7 @@ modparam("usrloc", "db_timer_clean", 1) * AOR - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on). -6.4. ul.rm_contact table AOR contact +6.4. ul.rm_contact table AOR contact Deletes a contact from an AOR record. @@ -1058,11 +1062,11 @@ modparam("usrloc", "db_timer_clean", 1) only if use_domain option is on). * contact - exact contact to be removed -6.5. ul.flush +6.5. ul.flush Triggers the flush of USRLOC memory cache into DB. -6.6. ul.add +6.6. ul.add Adds a new contact for an user AOR. @@ -1078,7 +1082,7 @@ modparam("usrloc", "db_timer_clean", 1) * cflags - per branch flags of the contact * methods - mask with supported requests of the contact -6.7. ul.db_users +6.7. ul.db_users Tell number of different users (AoRs) in a location table that have unexpired contacts. @@ -1087,7 +1091,7 @@ modparam("usrloc", "db_timer_clean", 1) * table name - location table where the users are looked for, for example, location. -6.8. ul.db_contacts +6.8. ul.db_contacts Tell number of unexpired contacts in a location table. @@ -1095,7 +1099,7 @@ modparam("usrloc", "db_timer_clean", 1) * table name - location table where the contacts are looked for, for example, location. -6.9. ul.db_expired_contacts +6.9. ul.db_expired_contacts Tell number of expired contacts in a location table. @@ -1184,7 +1188,7 @@ Chapter 2. Developer Guide 1.15. ul_register_ulcb(type ,callback, param) 1.16. ul_get_num_users() -1.1. ul_register_domain(name) +1.1. ul_register_domain(name) The function registers a new domain. Domain is just another name for table used in registrar. The function is called from fixups in @@ -1199,7 +1203,7 @@ Chapter 2. Developer Guide * const char* name - Name of the domain (also called table) to be registered. -1.2. ul_insert_urecord(domain, aor, rec) +1.2. ul_insert_urecord(domain, aor, rec) The function creates a new record structure and inserts it in the specified domain. The record is structure that contains all the @@ -1214,7 +1218,7 @@ Chapter 2. Developer Guide * urecord_t** rec - The newly created record structure. -1.3. ul_delete_urecord(domain, aor) +1.3. ul_delete_urecord(domain, aor) The function deletes all the contacts bound with the given Address Of Record. @@ -1226,7 +1230,7 @@ Chapter 2. Developer Guide * str* aor - Address of record (aka username) of the record, that should be deleted. -1.4. ul_delete_urecord_by_ruid(domain, ruid) +1.4. ul_delete_urecord_by_ruid(domain, ruid) The function deletes from given domain a contact with given ruid. @@ -1236,7 +1240,7 @@ Chapter 2. Developer Guide * str* ruid - ruid of contact that should be deleted. -1.5. ul_get_urecord(domain, aor) +1.5. ul_get_urecord(domain, aor) The function returns pointer to record with given Address of Record. @@ -1246,7 +1250,7 @@ Chapter 2. Developer Guide * str* aor - Address of Record of request record. -1.6. ul_lock_udomain(domain) +1.6. ul_lock_udomain(domain) The function lock the specified domain, it means, that no other processes will be able to access during the time. This prevents race @@ -1257,14 +1261,14 @@ Chapter 2. Developer Guide Meaning of the parameters is as follows: * udomain_t* domain - Domain to be locked. -1.7. ul_unlock_udomain(domain) +1.7. ul_unlock_udomain(domain) Unlock the specified domain previously locked by ul_lock_udomain. Meaning of the parameters is as follows: * udomain_t* domain - Domain to be unlocked. -1.8. ul_release_urecord(record) +1.8. ul_release_urecord(record) Do some sanity checks - if all contacts have been removed, delete the entire record structure. @@ -1272,7 +1276,7 @@ Chapter 2. Developer Guide Meaning of the parameters is as follows: * urecord_t* record - Record to be released. -1.9. ul_insert_ucontact(record, contact, expires, q, callid, cseq, flags, +1.9. ul_insert_ucontact(record, contact, expires, q, callid, cseq, flags, cont, ua, sock) The function inserts a new contact in the given record with specified @@ -1293,7 +1297,7 @@ cont, ua, sock) * struct socket_info *sock - socket on which the REGISTER message was received on. -1.10. ul_delete_ucontact (record, contact) +1.10. ul_delete_ucontact (record, contact) The function deletes given contact from record. @@ -1303,7 +1307,7 @@ cont, ua, sock) * ucontact_t* contact - Contact to be deleted. -1.11. ul_get_ucontact(record, contact) +1.11. ul_get_ucontact(record, contact) The function tries to find contact with given Contact URI and returns pointer to structure representing the contact. @@ -1313,13 +1317,13 @@ cont, ua, sock) * str_t* contact - URI of the request contact. -1.12. ul_get_all_ucontacts (buf, len, flags) +1.12. ul_get_all_ucontacts (buf, len, flags) The function retrieves all contacts of all registered users and returns them in the caller-supplied buffer. If the buffer is too small, the function returns positive value indicating how much additional space would be necessary to accommodate all of them. Please note that the - positive return value should be used only as a "hint", as there is no + positive return value should be used only as a “hint”, as there is no guarantee that during the time between two subsequent calls number of registered contacts will remain the same. @@ -1334,7 +1338,7 @@ cont, ua, sock) * unsigned int flags - Flags that must be set. -1.13. ul_update_ucontact(contact, expires, q, callid, cseq, set, res, ua, +1.13. ul_update_ucontact(contact, expires, q, callid, cseq, set, res, ua, sock) The function updates contact with new values. @@ -1353,7 +1357,7 @@ sock) * struct socket_info *sock - socket on which the REGISTER message was received on. -1.14. ul_bind_ursloc( api ) +1.14. ul_bind_ursloc( api ) The function imports all functions that are exported by the USRLOC module. Overs for other modules which want to user the internal USRLOC @@ -1362,7 +1366,7 @@ sock) Meaning of the parameters is as follows: * usrloc_api_t* api - USRLOC API -1.15. ul_register_ulcb(type ,callback, param) +1.15. ul_register_ulcb(type ,callback, param) The function register with USRLOC a callback function to be called when some event occures inside USRLOC. @@ -1375,6 +1379,6 @@ sock) * void *param - some parameter to be passed to the callback each time when it is called. -1.16. ul_get_num_users() +1.16. ul_get_num_users() The function loops through all domains summing up the number of users. diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c index fa72e2ba1..0e1a452d2 100644 --- a/modules/usrloc/ul_mod.c +++ b/modules/usrloc/ul_mod.c @@ -421,8 +421,10 @@ static int child_init(int _rank) return 0; case DB_ONLY: case WRITE_THROUGH: - /* connect to db only from SIP workers, TIMER and MAIN processes */ - if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN) + /* connect to db only from SIP workers, TIMER and MAIN processes, + * and RPC processes */ + if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN + && _rank!=PROC_RPC) return 0; break; case WRITE_BACK: diff --git a/modules/utils/README b/modules/utils/README index 73107b204..472abaf58 100644 --- a/modules/utils/README +++ b/modules/utils/README @@ -8,9 +8,9 @@ Carsten Bock ng-voice GmbH - Copyright 2008-2009 Juha Heinanen + Copyright © 2008-2009 Juha Heinanen - Copyright 2013-2015 Carsten Bock, ng-voice GmbH + Copyright © 2013-2015 Carsten Bock, ng-voice GmbH __________________________________________________________________ Table of Contents @@ -110,7 +110,7 @@ Chapter 1. Admin Guide deactivated. Function xcap_auth_status can be used to check from presence server - database, if watcher is authorized to subscribe event "presence" of + database, if watcher is authorized to subscribe event “presence” of presentity. 2. Dependencies @@ -179,7 +179,7 @@ modparam("utils", "http_response_trim", 1) Defines if the forwarding callback should be installed. - Default value is "0" - disabled. + Default value is “0” - disabled. Example 1.4. Set forward_active parameter ... @@ -203,7 +203,7 @@ modparam("utils", "pres_db_url", "mysql://foo:secret@localhost/pres") Defines the name of the xcap table in the presence server database. See the xcap_server module documentation for more information. - Default value is "xcap". + Default value is “xcap”. Example 1.6. Set xcap_table parameter ... @@ -215,21 +215,21 @@ modparam("utils", "xcap_table", "pres_xcap") 4.1. http_query(url, [post-data], [header-data], result) 4.2. xcap_auth_status(watcher_uri, presentity_uri) -4.1. http_query(url, [post-data], [header-data], result) +4.1. http_query(url, [post-data], [header-data], result) - Sends HTTP GET or POST request according to URL given in "url" + Sends HTTP GET or POST request according to URL given in “url” parameter, which is a string that may contain pseudo variables. - If you want to make a POST-Request, you have to define the "post"-data, + If you want to make a POST-Request, you have to define the “post”-data, that should be submitted in that request as the second parameter. If this parameter is empty, it is not set. If you want to add additional headers to the request, you have to - define the "header"-data, that should be submitted in that request as + define the “header”-data, that should be submitted in that request as the third parameter. If this parameter is empty, it is not set. If HTTP server returns a class 2xx, 3xx or 4xx reply, the first line of - the reply's body (if any) is stored in "result" parameter, which must + the reply's body (if any) is stored in “result” parameter, which must be a writable pseudo variable. Function returns reply code of HTTP reply or -1 if something went @@ -267,10 +267,10 @@ switch ($retcode) { } ... -4.2. xcap_auth_status(watcher_uri, presentity_uri) +4.2. xcap_auth_status(watcher_uri, presentity_uri) Function checks in the presence server database if a watcher is - authorized to subscribe to event "presence" of presentity. Sphere + authorized to subscribe to event “presence” of presentity. Sphere checking is not included. Both watcher_uri and presentity_uri are pseudo variables. The function diff --git a/modules/utils/functions.c b/modules/utils/functions.c index 5de92ad87..58f23cb88 100644 --- a/modules/utils/functions.c +++ b/modules/utils/functions.c @@ -228,5 +228,5 @@ int http_query(struct sip_msg* _m, char* _url, char* _dst, char* _post, char* _h curl_easy_cleanup(curl); pkg_free(stream.buf); - return stat; + return (stat!=0)?stat:-1; } diff --git a/modules/uuid/README b/modules/uuid/README index 1be3f53e3..3034dab70 100644 --- a/modules/uuid/README +++ b/modules/uuid/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright 2014 asipto.com + Copyright © 2014 asipto.com __________________________________________________________________ Table of Contents diff --git a/modules/websocket/README b/modules/websocket/README index 270b5e21c..ff16e9048 100644 --- a/modules/websocket/README +++ b/modules/websocket/README @@ -4,7 +4,7 @@ Peter Dunkley Crocodile RCS Ltd - Copyright 2012-2013 Crocodile RCS Ltd + Copyright © 2012-2013 Crocodile RCS Ltd __________________________________________________________________ Table of Contents @@ -129,11 +129,11 @@ Chapter 1. Admin Guide 2.1. Initiating a connection A WebSocket connection is initiated with an HTTP GET. The xhttp module - is used to handle this GET and call the Section 5.1, " - ws_handle_handshake() " exported function. + is used to handle this GET and call the Section 5.1, “ + ws_handle_handshake() ” exported function. event_route[xhttp:request] should perform some validation of the HTTP - headers before calling Section 5.1, " ws_handle_handshake() ". The + headers before calling Section 5.1, “ ws_handle_handshake() ”. The event_route can also be used to make sure the HTTP GET has the correct URI, perform HTTP authentication on the WebSocket connection, and check the Origin header (RFC 6454) to ensure a browser-based SIP UA or MSRP @@ -437,7 +437,7 @@ modparam("websocket", "cors_mode", 2) 5.1. ws_handle_handshake() 5.2. ws_close([status, reason[, connection_id]]) -5.1. ws_handle_handshake() +5.1. ws_handle_handshake() This function checks an HTTP GET request for the required headers and values, and (if successful) upgrades the connection from HTTP to @@ -456,7 +456,7 @@ Note ws_handle_handshake(); ... -5.2. ws_close([status, reason[, connection_id]]) +5.2. ws_close([status, reason[, connection_id]]) This function closes a WebSocket connection. @@ -497,7 +497,7 @@ ws_close(4000, "Because I say so"); Name: ws.dump Parameters: - * order (optional) - "id_hash", "used_desc", or "used_asc". + * order (optional) - “id_hash”, “used_desc”, or “used_asc”. Note @@ -582,7 +582,7 @@ Note 7.1. websocket:closed -7.1. websocket:closed +7.1. websocket:closed When defined, the module calls event_route[websocket:closed] when a connection closes. The connection may be identified using the the $si diff --git a/modules/xcap_client/README b/modules/xcap_client/README index 6ca0313f9..3606046f9 100644 --- a/modules/xcap_client/README +++ b/modules/xcap_client/README @@ -119,7 +119,7 @@ Chapter 1. Admin Guide The database url. - Default value is “mysql://openser:openserrw@localhost/openser”. + Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. Example 1.1. Set db_url parameter ... diff --git a/modules/xcap_server/README b/modules/xcap_server/README index ae3996509..b68559d0b 100644 --- a/modules/xcap_server/README +++ b/modules/xcap_server/README @@ -319,7 +319,7 @@ event_route[xhttp:request] { target, domain, uri_adoc. Exported pseudo-variables are documented at - http://www.kamailio.org/dokuwiki/. + http://www.kamailio.org/wiki/. Example 1.11. $xcapuri(...) PV ... diff --git a/modules/xhttp/README b/modules/xhttp/README index c40302b0a..46d4e94f5 100644 --- a/modules/xhttp/README +++ b/modules/xhttp/README @@ -16,7 +16,7 @@ Alex Balashov - Copyright 2010 asipto.com + Copyright © 2010 asipto.com __________________________________________________________________ Table of Contents @@ -169,7 +169,7 @@ modparam("xhttp", "url_match", "^/sip/") 5.1. xhttp_reply(code, reason, ctype, body) -5.1. xhttp_reply(code, reason, ctype, body) +5.1. xhttp_reply(code, reason, ctype, body) Send back a reply with content-type and body. diff --git a/modules/xhttp_rpc/README b/modules/xhttp_rpc/README index 62c6a5e78..13cdd50aa 100644 --- a/modules/xhttp_rpc/README +++ b/modules/xhttp_rpc/README @@ -10,11 +10,13 @@ Ovidiu Sas +Edited by + Alex Balashov - Copyright 2011 VoIPEmbedded Inc. + Copyright © 2011 VoIPEmbedded Inc. __________________________________________________________________ Table of Contents @@ -147,7 +149,7 @@ modparam("xhttp", "xhttp_rpc_buf_size", 1024) 4.1. dispatch_xhttp_rpc() -4.1. dispatch_xhttp_rpc() +4.1. dispatch_xhttp_rpc() Handle the HTTP request and generate a response. diff --git a/modules/xmlops/README b/modules/xmlops/README index 51893bfaa..0ecfcb5ca 100644 --- a/modules/xmlops/README +++ b/modules/xmlops/README @@ -1,4 +1,3 @@ - XMLOPS Module Daniel-Constantin Mierla @@ -6,8 +5,8 @@ Daniel-Constantin Mierla asipto.com - Copyright 2009 asipto.com - _________________________________________________________________ + Copyright © 2009 asipto.com + __________________________________________________________________ Table of Contents @@ -26,7 +25,7 @@ Daniel-Constantin Mierla 4. Pseudo-Variables - 4.1. $xml(name=>spec) + 4.1. $xml(name=>spec) List of Examples @@ -51,11 +50,11 @@ Chapter 1. Admin Guide 4. Pseudo-Variables - 4.1. $xml(name=>spec) + 4.1. $xml(name=>spec) 1. Overview - This is a module implementing functions and pseudo-variables for XML + This is a module implementing functions and pseudo-variables for XML operations. 2. Dependencies @@ -70,7 +69,7 @@ Chapter 1. Admin Guide 2.2. External Libraries or Applications - The following libraries or applications must be installed before + The following libraries or applications must be installed before running kamailio with this module loaded: * libxml - for compilation from source, the development headers from this library are needed as well. @@ -93,7 +92,7 @@ modparam("xmlops", "buf_size", 8192) 3.2. xml_ns (str) - Register xml namespace prefix. Parameter value must have the format: + Register xml namespace prefix. Parameter value must have the format: 'prefix=uri'. Example 1.2. Set xml_ns parameter @@ -103,11 +102,11 @@ modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid") 4. Pseudo-Variables - 4.1. $xml(name=>spec) + 4.1. $xml(name=>spec) 4.1. $xml(name=>spec) - Pseudo-variable for XML document operations using xpath syntax. For + Pseudo-variable for XML document operations using xpath syntax. For more see the Pseudo-Variables Cookbook. Example 1.3. xml usage diff --git a/modules/xmlrpc/README b/modules/xmlrpc/README index 1baff31fb..52554848e 100644 --- a/modules/xmlrpc/README +++ b/modules/xmlrpc/README @@ -4,7 +4,7 @@ Jan Janak iptelorg GmbH - Copyright 2005 iptelorg GmbH + Copyright © 2005 iptelorg GmbH __________________________________________________________________ Table of Contents @@ -430,7 +430,7 @@ Content-Length: 276 3.3. Type Conversion The data types of the RPC API are converted to the data types of - XML-RPC and vice versa. Table 1, "Data Type Conversion" shows for each + XML-RPC and vice versa. Table 1, “Data Type Conversion” shows for each RPC API data type corresponding XML-RPC data type. Table 1. Data Type Conversion @@ -512,6 +512,8 @@ route[XMLRPC]{ sends an XMLRPC request from its commandline parameters). * examples/xmlrpc_test.py (basic python application that builds and sends an XMLRPC request from its commandline parameters). + * examples/xmlrpc_test2.py (basic python application that builds and + sends an XMLRPC request from its commandline parameters). * ser_ctl (complex python application that uses the XML-RPC interface implemented by the xmlrpc module). * serweb (php application that can use the XML-RPC interface to call @@ -668,7 +670,7 @@ modparam("xmlrpc", "url_match", "^/RPC2") 3.1. dispatch_rpc() 3.2. xmlrpc_reply(code, reason) -3.1. dispatch_rpc() +3.1. dispatch_rpc() This function processes an XMLRPC request, found in the body of the request. @@ -695,7 +697,7 @@ route[XMLRPC]{ dispatch_rpc(); } -3.2. xmlrpc_reply(code, reason) +3.2. xmlrpc_reply(code, reason) This function can be called from the config script to directly generate an XML-RPC reply. diff --git a/modules/xmlrpc/xmlrpc.c b/modules/xmlrpc/xmlrpc.c index dabb526a9..98835f9d9 100644 --- a/modules/xmlrpc/xmlrpc.c +++ b/modules/xmlrpc/xmlrpc.c @@ -24,6 +24,7 @@ #endif #define _XOPEN_SOURCE_EXTENDED 1 /* solaris */ #define _SVID_SOURCE 1 /* timegm */ +#define _DEFAULT_SOURCE 1 /* _SVID_SOURCE is deprecated */ #include #include @@ -145,13 +146,6 @@ MODULE_VERSION -#if defined (__OS_darwin) || defined (__OS_freebsd) -/* redeclaration of functions from stdio.h throws errors */ -#else -int snprintf(char *str, size_t size, const char *format, ...); -int vsnprintf(char *str, size_t size, const char *format, va_list ap); -#endif - static int process_xmlrpc(sip_msg_t* msg); static int dispatch_rpc(sip_msg_t* msg, char* s1, char* s2); static int xmlrpc_reply(sip_msg_t* msg, char* code, char* reason); diff --git a/modules/xmpp/README b/modules/xmpp/README index a5605a1fb..a42a56a1e 100644 --- a/modules/xmpp/README +++ b/modules/xmpp/README @@ -10,7 +10,7 @@ Edited by Andreea Spirea - Copyright 2006 Voice Sistem SRL + Copyright © 2006 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -153,11 +153,11 @@ Chapter 1. Admin Guide Unless 'gwmap' parameter is set, in both modes (server or component), the destination address must have the same pattern: - "sip:usernamejabber_server@gateway_domain" + “sip:usernamejabber_server@gateway_domain” From a jabber client's point of view, the destination will look like: - "sip_usernamesip_domain@xmpp_domain" + “sip_usernamesip_domain@xmpp_domain” 'delim' is a character that can be set via 'domain_separator' parameter. @@ -343,7 +343,7 @@ Chapter 1. Admin Guide 4.1. xmpp_send_message() -4.1. xmpp_send_message() +4.1. xmpp_send_message() Converts SIP messages to XMPP(jabber) messages, in order to be relayed to a XMPP(jabber) client. diff --git a/modules/xprint/README b/modules/xprint/README index 3688619ba..4b0b4ee8c 100644 --- a/modules/xprint/README +++ b/modules/xprint/README @@ -1,12 +1,11 @@ - The Xprint Module Elena-Ramona Modroiu Asipto - Copyright 2003 FhG FOKUS - _________________________________________________________________ + Copyright © 2003 FhG FOKUS + __________________________________________________________________ Table of Contents @@ -20,8 +19,8 @@ Elena-Ramona Modroiu 4. Functions - 4.1. xplog(level, format) - 4.2. xpdbg(format) + 4.1. xplog(level, format) + 4.2. xpdbg(format) 2. Developer Guide @@ -29,21 +28,21 @@ Elena-Ramona Modroiu 1.1. Functions - 1.1.1. int xbind(xl_api_t *xl_api) - 1.1.2. int xparse(char *s, xl_elog_p *el) - 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.1.4. int xparse2(char *s, xl_elog_p *el, - xl_parse_cb cb) + 1.1.1. int xbind(xl_api_t *xl_api) + 1.1.2. int xparse(char *s, xl_elog_p *el) + 1.1.3. int shm_xparse(char *s, xl_elog_p *el) + 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb + cb) 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, - xl_parse_cb cb) + xl_parse_cb cb) - 1.1.6. xfree(xl_elog_p el) - 1.1.7. shm_xfree(xl_elog_p el) + 1.1.6. xfree(xl_elog_p el) + 1.1.7. shm_xfree(xl_elog_p el) 1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, - char *buf, int *len) + char *buf, int *len) - 1.1.9. str *xnulstr() + 1.1.9. str *xnulstr() List of Examples @@ -63,20 +62,20 @@ Chapter 1. Admin Guide 4. Functions - 4.1. xplog(level, format) - 4.2. xpdbg(format) + 4.1. xplog(level, format) + 4.2. xpdbg(format) 1. Overview - IMPORTANT: this is former xlog module from SIP Express Router (SER) - kept because it is used by other modules via API to get the value for - strings with specifiers. If you want to print log messages from + IMPORTANT: this is former xlog module from SIP Express Router (SER) + kept because it is used by other modules via API to get the value for + strings with specifiers. If you want to print log messages from configuration file, use the real module named 'xlog'. - This module provides the possibility to print user formatted log or - debug messages from SER scripts, similar to printf function but now a - specifier is replaced with a part of the SIP request. Section 2, - "Implemented Specifiers" shows what can be printed out. + This module provides the possibility to print user formatted log or + debug messages from SER scripts, similar to printf function but now a + specifier is replaced with a part of the SIP request. Section 2, + “Implemented Specifiers” shows what can be printed out. 2. Implemented Specifiers @@ -86,14 +85,14 @@ Chapter 1. Admin Guide * %ci : call-id * %cs : cseq * %ct : contact header - * %Cxy : color printing based on escape sequences (x - foreground - color, y - background color). The values for colors: x - default - color of the terminal; s - Black; r - Red; g - Green; y - Yellow; - b - Blue; p - Purple; c - Cyan; w - White + * %Cxy : color printing based on escape sequences (x - foreground + color, y - background color). The values for colors: x - default + color of the terminal; s - Black; r - Red; g - Green; y - Yellow; b + - Blue; p - Purple; c - Cyan; w - White * %ds : destination set * %fu : 'From' uri * %ft : 'From' tag - * %Hn : host's hostname (if system hostname is FQDN, part before + * %Hn : host's hostname (if system hostname is FQDN, part before first .) * %Hd : host's domain (if system hosntame is FQDN, part behind first .) @@ -112,7 +111,7 @@ Chapter 1. Admin Guide * %rr : reply's reason * %rs : reply's status * %rt : 'Refer-To' uri - * %Ri : IP address of the interface where the request has been + * %Ri : IP address of the interface where the request has been received * %Rp : received port * %si : IP source address @@ -125,32 +124,32 @@ Chapter 1. Admin Guide * %ua : User agent header field * %uq : unique id (per SER's process) - to make really unique id use %uq-%px-%mx or %uq-%px-%Tx - * %{name[N]} : print the body of the Nth header identified by - 'name'. If [N] is omitted then the body of the first header is - printed. The first header is got when N=0, for the second N=1, - a.s.o. To print the last header of that type, use -1, no other - negative values are supported now. No white spaces are allowed - inside the specifier (before }, before or after {, [, ] symbols). - When N='*', all headers of that type are printed. - The module should identify most of compact header names (the ones + * %{name[N]} : print the body of the Nth header identified by 'name'. + If [N] is omitted then the body of the first header is printed. The + first header is got when N=0, for the second N=1, a.s.o. To print + the last header of that type, use -1, no other negative values are + supported now. No white spaces are allowed inside the specifier + (before }, before or after {, [, ] symbols). When N='*', all + headers of that type are printed. + The module should identify most of compact header names (the ones recognized by ser which should be all at this moment), if not, the compact form has to be specified explicitely. It is recommended to - use dedicated specifiers for headers (e.g., %ua for user agent + use dedicated specifiers for headers (e.g., %ua for user agent header), if they are available -- they are faster. * % : print the value of AVP optionally %indexed by the [N] value It uses AVPs subindexing, e.g. if you don't specify subindex and there are more AVPs with the same name, the result is NULL. To - specify first AVP use [1], negative values are indexes counted + specify first AVP use [1], negative values are indexes counted backward through the list. - * %@select.framework[N].value : print the value of select framework - call. For detailed info what calls are available see select + * %@select.framework[N].value : print the value of select framework + call. For detailed info what calls are available see select framework documentation (and modules documentation, as modules can extend select framework calls). * %| or %(space) : end of %@select.framework identifier. If you need - to concatenate select framework call and another non-whitespace - literal, you need to explicitelly set the end of the select + to concatenate select framework call and another non-whitespace + literal, you need to explicitelly set the end of the select framework identifier. - E.g. %@ruri.user%|@%@ruri.host converts all featured request uri + E.g. %@ruri.user%|@%@ruri.host converts all featured request uri into user@host form only. 3. Parameters @@ -170,8 +169,8 @@ modparam("xprint", "buf_size", 8192) 4. Functions - 4.1. xplog(level, format) - 4.2. xpdbg(format) + 4.1. xplog(level, format) + 4.2. xpdbg(format) 4.1. xplog(level, format) @@ -214,35 +213,35 @@ Chapter 2. Developer Guide 1.1. Functions - 1.1.1. int xbind(xl_api_t *xl_api) - 1.1.2. int xparse(char *s, xl_elog_p *el) - 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 1.1.1. int xbind(xl_api_t *xl_api) + 1.1.2. int xparse(char *s, xl_elog_p *el) + 1.1.3. int shm_xparse(char *s, xl_elog_p *el) + 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb - cb) + cb) - 1.1.6. xfree(xl_elog_p el) - 1.1.7. shm_xfree(xl_elog_p el) + 1.1.6. xfree(xl_elog_p el) + 1.1.7. shm_xfree(xl_elog_p el) 1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char - *buf, int *len) + *buf, int *len) - 1.1.9. str *xnulstr() + 1.1.9. str *xnulstr() 1. Module API 1.1. Functions - 1.1.1. int xbind(xl_api_t *xl_api) - 1.1.2. int xparse(char *s, xl_elog_p *el) - 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - 1.1.6. xfree(xl_elog_p el) - 1.1.7. shm_xfree(xl_elog_p el) + 1.1.1. int xbind(xl_api_t *xl_api) + 1.1.2. int xparse(char *s, xl_elog_p *el) + 1.1.3. int shm_xparse(char *s, xl_elog_p *el) + 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 1.1.6. xfree(xl_elog_p el) + 1.1.7. shm_xfree(xl_elog_p el) 1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, - int *len) + int *len) - 1.1.9. str *xnulstr() + 1.1.9. str *xnulstr() 1.1. Functions @@ -251,8 +250,8 @@ Chapter 2. Developer Guide Bind to the xprint module API. Meaning of the parameters is as follows: - * xl_api - structure that the xprint module functions are bind to. - The functions can be executed as xl_api.xparse(), + * xl_api - structure that the xprint module functions are bind to. + The functions can be executed as xl_api.xparse(), xl_api.xprint()... Return value: 0 - success, <0 - error. @@ -269,28 +268,28 @@ Chapter 2. Developer Guide 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - Parse an xl-formatted string in shared memory. See xparse() function + Parse an xl-formatted string in shared memory. See xparse() function for details. 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - Parse an xl-formatted string in private memory. This function is able - to identify regular expression back references, for example \1, \2, - \3... When a back reference is found the callback function is called - that is supposed to farther parse the back reference and fill in the + Parse an xl-formatted string in private memory. This function is able + to identify regular expression back references, for example \1, \2, + \3... When a back reference is found the callback function is called + that is supposed to farther parse the back reference and fill in the xl_elog structure. Meaning of the parameters is as follows: * s - string to be parsed. * el - returned xl-lib list. - * cb - callback function for parsing the regular expression back + * cb - callback function for parsing the regular expression back references. - The prototype of the callback function is: typedef int (*xl_parse_cb) + The prototype of the callback function is: typedef int (*xl_parse_cb) (str *s, int shm, xl_elog_p el); Parameters of the callback function: - * s - regular expression back reference to be parsed (without the + * s - regular expression back reference to be parsed (without the leading '\' character). * shm - indicates whether or not shared memory needs to be used. (1: shared memory, 0: private memory) @@ -301,7 +300,7 @@ Chapter 2. Developer Guide 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - Parse an xl-formatted string in shared memory supporting regular + Parse an xl-formatted string in shared memory supporting regular expression back references. See xparse2() function for details. 1.1.6. xfree(xl_elog_p el) @@ -326,7 +325,7 @@ Chapter 2. Developer Guide * msg - SIP message pointer. * el - xl-lib list to be evaluated. * buf - pre-allocated buffer that is filled in with the result. - * len - length of the printed string. len needs to be set to the + * len - length of the printed string. len needs to be set to the maximum length of the result buffer before calling this function. Return value: 0 - success, <0 - error. diff --git a/pkg/kamailio/centos/6/kamailio.spec b/pkg/kamailio/centos/6/kamailio.spec index 716200511..9e8b8cfbd 100644 --- a/pkg/kamailio/centos/6/kamailio.spec +++ b/pkg/kamailio/centos/6/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0.0%{dist} diff --git a/pkg/kamailio/deb/debian/changelog b/pkg/kamailio/deb/debian/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/debian/changelog +++ b/pkg/kamailio/deb/debian/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/debian/control b/pkg/kamailio/deb/debian/control index 4fa77aece..7cf301006 100644 --- a/pkg/kamailio/deb/debian/control +++ b/pkg/kamailio/deb/debian/control @@ -498,6 +498,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/debian/rules b/pkg/kamailio/deb/debian/rules index 1d4c6de68..6cb058b5e 100755 --- a/pkg/kamailio/deb/debian/rules +++ b/pkg/kamailio/deb/debian/rules @@ -57,12 +57,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -81,6 +80,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -133,6 +139,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/jessie/changelog b/pkg/kamailio/deb/jessie/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/jessie/changelog +++ b/pkg/kamailio/deb/jessie/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/jessie/control b/pkg/kamailio/deb/jessie/control index 084a4642e..81835e65b 100644 --- a/pkg/kamailio/deb/jessie/control +++ b/pkg/kamailio/deb/jessie/control @@ -497,6 +497,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/jessie/rules b/pkg/kamailio/deb/jessie/rules index 4e0182a8d..c8c655ea4 100755 --- a/pkg/kamailio/deb/jessie/rules +++ b/pkg/kamailio/deb/jessie/rules @@ -57,12 +57,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -81,6 +80,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -133,6 +139,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/precise/changelog b/pkg/kamailio/deb/precise/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/precise/changelog +++ b/pkg/kamailio/deb/precise/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/precise/control b/pkg/kamailio/deb/precise/control index 589aba591..9d5789e3b 100644 --- a/pkg/kamailio/deb/precise/control +++ b/pkg/kamailio/deb/precise/control @@ -494,6 +494,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/precise/rules b/pkg/kamailio/deb/precise/rules index 437d954e8..7bbf437c9 100755 --- a/pkg/kamailio/deb/precise/rules +++ b/pkg/kamailio/deb/precise/rules @@ -56,12 +56,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -80,6 +79,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -132,6 +138,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/sid/changelog b/pkg/kamailio/deb/sid/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/sid/changelog +++ b/pkg/kamailio/deb/sid/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/sid/control b/pkg/kamailio/deb/sid/control index 6df63a53a..810b8a2f6 100644 --- a/pkg/kamailio/deb/sid/control +++ b/pkg/kamailio/deb/sid/control @@ -497,6 +497,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/sid/rules b/pkg/kamailio/deb/sid/rules index 5f4352d36..a428e8997 100755 --- a/pkg/kamailio/deb/sid/rules +++ b/pkg/kamailio/deb/sid/rules @@ -57,12 +57,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -81,6 +80,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -133,6 +139,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/squeeze/changelog b/pkg/kamailio/deb/squeeze/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/squeeze/changelog +++ b/pkg/kamailio/deb/squeeze/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/squeeze/control b/pkg/kamailio/deb/squeeze/control index a6c953005..6c6691aae 100644 --- a/pkg/kamailio/deb/squeeze/control +++ b/pkg/kamailio/deb/squeeze/control @@ -420,6 +420,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-tls-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/squeeze/rules b/pkg/kamailio/deb/squeeze/rules index e4136d643..5d65503b4 100755 --- a/pkg/kamailio/deb/squeeze/rules +++ b/pkg/kamailio/deb/squeeze/rules @@ -54,12 +54,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -78,6 +77,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -130,6 +136,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/stretch/changelog b/pkg/kamailio/deb/stretch/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/stretch/changelog +++ b/pkg/kamailio/deb/stretch/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/stretch/control b/pkg/kamailio/deb/stretch/control index 6df63a53a..810b8a2f6 100644 --- a/pkg/kamailio/deb/stretch/control +++ b/pkg/kamailio/deb/stretch/control @@ -497,6 +497,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/stretch/rules b/pkg/kamailio/deb/stretch/rules index 5f4352d36..a428e8997 100755 --- a/pkg/kamailio/deb/stretch/rules +++ b/pkg/kamailio/deb/stretch/rules @@ -57,12 +57,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -81,6 +80,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -133,6 +139,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/trusty/changelog b/pkg/kamailio/deb/trusty/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/trusty/changelog +++ b/pkg/kamailio/deb/trusty/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/trusty/control b/pkg/kamailio/deb/trusty/control index 7a0d1ace6..05965a0ba 100644 --- a/pkg/kamailio/deb/trusty/control +++ b/pkg/kamailio/deb/trusty/control @@ -496,6 +496,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/trusty/rules b/pkg/kamailio/deb/trusty/rules index a9e8cd443..139909a81 100755 --- a/pkg/kamailio/deb/trusty/rules +++ b/pkg/kamailio/deb/trusty/rules @@ -57,12 +57,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -81,6 +80,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -133,6 +139,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/deb/wheezy/changelog b/pkg/kamailio/deb/wheezy/changelog index 5a8000fae..f1cef32e3 100644 --- a/pkg/kamailio/deb/wheezy/changelog +++ b/pkg/kamailio/deb/wheezy/changelog @@ -1,3 +1,9 @@ +kamailio (4.4.2) unstable; urgency=medium + + * version set to 4.4.2 + + -- Victor Seva Tue, 28 Jun 2016 14:22:03 +0200 + kamailio (4.4.1) unstable; urgency=medium * version set to 4.4.1 diff --git a/pkg/kamailio/deb/wheezy/control b/pkg/kamailio/deb/wheezy/control index efa509151..9518bb78c 100644 --- a/pkg/kamailio/deb/wheezy/control +++ b/pkg/kamailio/deb/wheezy/control @@ -478,6 +478,8 @@ Description: Provides a set utility functions for Kamailio . Provides a set of utility functions for Kamailio, which are not related to the server configuration. + . + Includes http client (http_client) module too Package: kamailio-sctp-modules Architecture: linux-any diff --git a/pkg/kamailio/deb/wheezy/rules b/pkg/kamailio/deb/wheezy/rules index 9668a2769..570b8b87f 100755 --- a/pkg/kamailio/deb/wheezy/rules +++ b/pkg/kamailio/deb/wheezy/rules @@ -56,12 +56,11 @@ mod_name=$(subst db_,,$(lastword $(subst /, ,$(1)))) define PACKAGE_GRP_BUILD_template # package all the modules in PACKAGE_GROUPS in separate packages - $(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\ + $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) every-module group_include="k$(grp)" ) endef - define PACKAGE_GRP_INSTALL_template $(foreach grp,$(PACKAGE_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -80,6 +79,13 @@ define PACKAGE_GRP_INSTALL_template ) endef +define PACKAGE_EXTRA_BUILD_template + # package all the modules in EXTRA_GROUPS in separate packages + $(foreach grp,$(EXTRA_GROUPS),\ + $(MAKE) every-module group_include="k$(grp)" + ) +endef + define PACKAGE_EXTRA_INSTALL_template $(foreach grp,$(EXTRA_GROUPS),\ $(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \ @@ -132,6 +138,7 @@ build-stamp: configure-stamp $(MAKE) all # make groups $(call PACKAGE_GRP_BUILD_template) + $(call PACKAGE_EXTRA_BUILD_template) touch build-stamp clean: diff --git a/pkg/kamailio/fedora/17/kamailio.spec b/pkg/kamailio/fedora/17/kamailio.spec index 54e9e5c28..2355b00ad 100644 --- a/pkg/kamailio/fedora/17/kamailio.spec +++ b/pkg/kamailio/fedora/17/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0%{dist} diff --git a/pkg/kamailio/freebsd/Makefile b/pkg/kamailio/freebsd/Makefile index dee636094..a22ab3bb7 100644 --- a/pkg/kamailio/freebsd/Makefile +++ b/pkg/kamailio/freebsd/Makefile @@ -6,7 +6,7 @@ # PORTNAME= kamailio -PORTVERSION= 1.3.0 +PORTVERSION= 4.4.2 CATEGORIES= net MASTER_SITES= http://kamailio.org/pub/kamailio/${PORTVERSION}/src/ DISTNAME= ${PORTNAME}-${PORTVERSION}-tls_src diff --git a/pkg/kamailio/netbsd/Makefile b/pkg/kamailio/netbsd/Makefile index a5c62b06c..2d3b92ffc 100644 --- a/pkg/kamailio/netbsd/Makefile +++ b/pkg/kamailio/netbsd/Makefile @@ -8,9 +8,9 @@ COMMENT= "Kamailio" PORTNAME= kamailio -PORTVERSION= 1.2.0-notls +PORTVERSION= 4.2.4 CATEGORIES= net -MASTER_SITES= http://kamailio.org/pub/kamailio/1.2.0/src/ +MASTER_SITES= http://kamailio.org/pub/kamailio/4.4.2/src/ MAINTAINER= miconda@gmail.com diff --git a/pkg/kamailio/openbsd/Makefile b/pkg/kamailio/openbsd/Makefile index cf481de8b..727fb3d34 100644 --- a/pkg/kamailio/openbsd/Makefile +++ b/pkg/kamailio/openbsd/Makefile @@ -12,7 +12,7 @@ COMMENT-carrierroute = kamailio carrierroute module COMMENT-snmpstats = kamailio snmpstats module COMMENT-perl = kamailio perl modules -VERSION = 1.5.0 +VERSION = 4.4.2 DISTNAME = kamailio-${VERSION} PKGNAME-main = kamailio-${VERSION} PKGNAME-mysql = kamailio-mysql-${VERSION} diff --git a/pkg/kamailio/oracle/el6/kamailio.spec b/pkg/kamailio/oracle/el6/kamailio.spec index 03a1098f8..005933121 100644 --- a/pkg/kamailio/oracle/el6/kamailio.spec +++ b/pkg/kamailio/oracle/el6/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0 %define _sharedir %{_prefix}/share diff --git a/pkg/kamailio/oracle/el7/kamailio.spec b/pkg/kamailio/oracle/el7/kamailio.spec index d12c4155d..62bddd198 100644 --- a/pkg/kamailio/oracle/el7/kamailio.spec +++ b/pkg/kamailio/oracle/el7/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0 %define _sharedir %{_prefix}/share diff --git a/pkg/kamailio/rpm/kamailio.spec-4.1 b/pkg/kamailio/rpm/kamailio.spec-4.1 index cb48364ae..ed368e736 100644 --- a/pkg/kamailio/rpm/kamailio.spec-4.1 +++ b/pkg/kamailio/rpm/kamailio.spec-4.1 @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0 %define EXCLUDED_MODULES mysql jabber cpl-c avp_radius auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc diff --git a/pkg/kamailio/rpm/kamailio.spec.CenOS b/pkg/kamailio/rpm/kamailio.spec.CenOS index f7b4bf29a..717304db3 100644 --- a/pkg/kamailio/rpm/kamailio.spec.CenOS +++ b/pkg/kamailio/rpm/kamailio.spec.CenOS @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0 %define _sharedir %{_prefix}/share diff --git a/pkg/kamailio/rpm/kamailio.spec.SuSE b/pkg/kamailio/rpm/kamailio.spec.SuSE index 349234f8f..472befbbb 100644 --- a/pkg/kamailio/rpm/kamailio.spec.SuSE +++ b/pkg/kamailio/rpm/kamailio.spec.SuSE @@ -1,5 +1,5 @@ %define name kamailio -%define ver 4.4.1 +%define ver 4.4.2 %define rel 0 %define EXCLUDED_MODULES mysql jabber cpl-c auth_radius misc_radius peering postgress pa unixodbc osp tlsops diff --git a/tcp_main.c b/tcp_main.c index d14725771..5b647e17c 100644 --- a/tcp_main.c +++ b/tcp_main.c @@ -2707,7 +2707,7 @@ int tcp_init(struct socket_info* sock_info) } } #endif - + addr=&sock_info->su; /* sock_info->proto=PROTO_TCP; */ if (init_su(addr, &sock_info->address, sock_info->port_no)<0){ @@ -2749,10 +2749,18 @@ int tcp_init(struct socket_info* sock_info) #endif /* tos */ optval = tos; - if (setsockopt(sock_info->socket, IPPROTO_IP, IP_TOS, (void*)&optval, - sizeof(optval)) ==-1){ - LM_WARN("setsockopt tos: %s (%d)\n", strerror(errno), tos); - /* continue since this is not critical */ + if(sock_info->address.af==AF_INET){ + if (setsockopt(sock_info->socket, IPPROTO_IP, IP_TOS, (void*)&optval, + sizeof(optval)) ==-1){ + LM_WARN("setsockopt tos: %s (%d)\n", strerror(errno), tos); + /* continue since this is not critical */ + } + } else if(sock_info->address.af==AF_INET6){ + if (setsockopt(sock_info->socket, IPPROTO_IPV6, IPV6_TCLASS, + (void*)&optval, sizeof(optval)) ==-1) { + LM_WARN("setsockopt v6 tos: %s (%d)\n", strerror(errno), tos); + /* continue since this is not critical */ + } } #ifdef HAVE_TCP_DEFER_ACCEPT /* linux only */ diff --git a/utils/kamctl/Makefile b/utils/kamctl/Makefile index efbda6ca3..5b70ab4e0 100644 --- a/utils/kamctl/Makefile +++ b/utils/kamctl/Makefile @@ -1,4 +1,3 @@ -# $Id$ COREPATH=../.. include $(COREPATH)/Makefile.defs include $(COREPATH)/config.mak diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base index bd2817b5c..fba5784e8 100644 --- a/utils/kamctl/kamctl.base +++ b/utils/kamctl/kamctl.base @@ -1,6 +1,4 @@ # -# $Id$ -# # control tool for maintaining Kamailio # #=================================================================== diff --git a/utils/kamctl/kamctl.ctlbase b/utils/kamctl/kamctl.ctlbase index a605b1009..a668e22d1 100644 --- a/utils/kamctl/kamctl.ctlbase +++ b/utils/kamctl/kamctl.ctlbase @@ -1,6 +1,4 @@ # -# $Id$ -# # control tool for maintaining Kamailio # #=================================================================== diff --git a/utils/kamctl/kamctl.db_berkeley b/utils/kamctl/kamctl.db_berkeley index 8eaf80aab..c8b77ec16 100644 --- a/utils/kamctl/kamctl.db_berkeley +++ b/utils/kamctl/kamctl.db_berkeley @@ -1,10 +1,6 @@ -# $Id$ # # control tool for maintaining Kamailio # -# History: -# -------- -# 2007-11-05 genesis (wiquan) #=================================================================== diff --git a/utils/kamctl/kamctl.dbtext b/utils/kamctl/kamctl.dbtext index 0c1ac9aa9..2198d30db 100644 --- a/utils/kamctl/kamctl.dbtext +++ b/utils/kamctl/kamctl.dbtext @@ -1,4 +1,3 @@ -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.fifo b/utils/kamctl/kamctl.fifo index c94a5cc72..b71c5fcfc 100644 --- a/utils/kamctl/kamctl.fifo +++ b/utils/kamctl/kamctl.fifo @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.mysql b/utils/kamctl/kamctl.mysql index 1b25d2ae2..7fda5e7f4 100644 --- a/utils/kamctl/kamctl.mysql +++ b/utils/kamctl/kamctl.mysql @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.oracle b/utils/kamctl/kamctl.oracle index f602404d6..edf70b76f 100644 --- a/utils/kamctl/kamctl.oracle +++ b/utils/kamctl/kamctl.oracle @@ -1,7 +1,5 @@ #!/bin/sh # -# $Id$ -# # control tool for maintaining Kamailio # #=================================================================== diff --git a/utils/kamctl/kamctl.pgsql b/utils/kamctl/kamctl.pgsql index 7112d3962..60cbd92f0 100644 --- a/utils/kamctl/kamctl.pgsql +++ b/utils/kamctl/kamctl.pgsql @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.ser b/utils/kamctl/kamctl.ser index 25f226449..045709e51 100644 --- a/utils/kamctl/kamctl.ser +++ b/utils/kamctl/kamctl.ser @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.ser_mi b/utils/kamctl/kamctl.ser_mi index 13f111769..acb0f2655 100644 --- a/utils/kamctl/kamctl.ser_mi +++ b/utils/kamctl/kamctl.ser_mi @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.sqlbase b/utils/kamctl/kamctl.sqlbase index 06481e775..2aef9801a 100644 --- a/utils/kamctl/kamctl.sqlbase +++ b/utils/kamctl/kamctl.sqlbase @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.sqlite b/utils/kamctl/kamctl.sqlite index 35cf45a27..c2ea07171 100644 --- a/utils/kamctl/kamctl.sqlite +++ b/utils/kamctl/kamctl.sqlite @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctl.unixsock b/utils/kamctl/kamctl.unixsock index 4d5d17dd5..d82e66042 100644 --- a/utils/kamctl/kamctl.unixsock +++ b/utils/kamctl/kamctl.unixsock @@ -1,5 +1,4 @@ # -# $Id$ # # control tool for maintaining Kamailio # diff --git a/utils/kamctl/kamctlrc b/utils/kamctl/kamctlrc index f96cab6f1..c54947a2f 100644 --- a/utils/kamctl/kamctlrc +++ b/utils/kamctl/kamctlrc @@ -1,5 +1,3 @@ -# $Id$ -# # The Kamailio configuration file for the control tools. # # Here you can set variables used in the kamctl and kamdbctl setup diff --git a/utils/kamctl/kamdbctl.db_berkeley b/utils/kamctl/kamdbctl.db_berkeley index e11e783db..8e5b4a60e 100644 --- a/utils/kamctl/kamdbctl.db_berkeley +++ b/utils/kamctl/kamdbctl.db_berkeley @@ -18,9 +18,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# History: -# -------- -# 2007-09-19 genesis (wiquan) # #constants diff --git a/utils/kamctl/kamdbctl.dbtext b/utils/kamctl/kamdbctl.dbtext index bd40e034c..8c2019ec3 100644 --- a/utils/kamctl/kamdbctl.dbtext +++ b/utils/kamctl/kamdbctl.dbtext @@ -1,4 +1,3 @@ -# $Id$ # # Script for adding and dropping Kamailio DBTEXT tables # diff --git a/utils/kamctl/kamdbctl.mysql b/utils/kamctl/kamdbctl.mysql index dea0d957c..f8fea39a1 100644 --- a/utils/kamctl/kamdbctl.mysql +++ b/utils/kamctl/kamdbctl.mysql @@ -1,4 +1,3 @@ -# $Id$ # # Script for adding and dropping Kamailio MySQL tables # diff --git a/utils/kamctl/kamdbctl.oracle b/utils/kamctl/kamdbctl.oracle index e074006ce..0b65027d6 100644 --- a/utils/kamctl/kamdbctl.oracle +++ b/utils/kamctl/kamdbctl.oracle @@ -1,5 +1,4 @@ #!/bin/sh -# $Id$ # # Script for adding and dropping Kamailio Oracle tables # diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql index ae39f62e1..cf3309c65 100644 --- a/utils/kamctl/kamdbctl.pgsql +++ b/utils/kamctl/kamdbctl.pgsql @@ -1,4 +1,3 @@ -# $Id$ # # Script for adding and dropping Kamailio Postgres tables # @@ -44,8 +43,10 @@ fi if [ -z "$DBROOTUSER" ]; then DBROOTUSER="postgres" if [ ! -r ~/.pgpass ]; then - merr "~./pgpass does not exist, please create this file and support proper credentials for user postgres." + merr "~/.pgpass does not exist" + merr "create this file and add proper credentials for user postgres" merr "Note: you need at least postgresql>= 7.3" + merr "Hint: .pgpass hostname must match DBHOST" exit 1 fi fi diff --git a/utils/kamctl/kamdbctl.sqlite b/utils/kamctl/kamdbctl.sqlite index 5209493bc..4915b81a4 100644 --- a/utils/kamctl/kamdbctl.sqlite +++ b/utils/kamctl/kamdbctl.sqlite @@ -1,4 +1,3 @@ -# $Id$ # # Script for adding and dropping Kamailio sqlite tables # diff --git a/utils/kamctl/kamdbfunc.oracle b/utils/kamctl/kamdbfunc.oracle index 3061991b9..db71fe42c 100644 --- a/utils/kamctl/kamdbfunc.oracle +++ b/utils/kamctl/kamdbfunc.oracle @@ -1,5 +1,4 @@ #!/bin/sh -# $Id$ # # Script for common functions for Oracle engine in Kamailio # diff --git a/utils/misc/vim/syntax/kamailio.vim b/utils/misc/vim/syntax/kamailio.vim index 6bad5f776..b32a12564 100644 --- a/utils/misc/vim/syntax/kamailio.vim +++ b/utils/misc/vim/syntax/kamailio.vim @@ -45,7 +45,7 @@ syn region kamailioString matchgroup=Normal start='"' skip='\\"' end='"' conta syn match kamailioVariable "$[a-zA-Z_][a-zA-Z0-9_]*\(([^)]\+)\)\?" contained syn match kamailioIdentifier '[a-zA-Z_][a-zA-Z0-9_]*' contained syn keyword kamailioStatement route if else switch case default break exit return drop while include_file import_file contained -syn keyword kamailioSpecial yes no on off true false enabled disabled contained +syn keyword kamailioSpecial yes no on off true false enabled disabled LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 contained syn keyword kamailioCoreKeyword af dst_ip dst_port from_uri method msg:len proto status snd_af snd_ip snd_port snd_proto src_ip src_port to_af to_ip to_port to_proto to_uri uri uri:host uri:port contained @@ -53,7 +53,7 @@ syn keyword kamailioCoreValue udp UDP tcp TCP tls TLS sctp SCTP ws WS wss WSS i syn keyword kamailioCoreFunction forward forward_tcp forward_udp forward_tls forward_sctp send send_tcp log error exec force_rport add_rport force_tcp_alias add_tcp_alias udp_mtu udp_mtu_try_proto setflag resetflag isflagset flags bool setavpflag resetavpflag isavpflagset avpflags rewritehost sethost seth rewritehostport sethostport sethp rewritehostporttrans sethostporttrans sethpt rewriteuser setuser setu rewriteuserpass setuserpass setup rewriteport setport setp rewriteuri seturi revert_uri prefix strip strip_tail userphone append_branch set_advertised_address set_advertised_port force_send_socket remove_branch clear_branches cfg_select cfg_reset contained -syn keyword kamailioCoreParameter debug fork log_stderror log_facility log_name log_color log_prefix listen alias auto_aliases dns rev_dns dns_try_ipv6 dns_try_naptr dns_srv_lb dns_srv_loadbalancing dns_udp_pref dns_udp_preference dns_tcp_pref dns_tcp_preference dns_tls_pref dns_tls_preference dns_sctp_pref dns_sctp_preference dns_retr_time dns_retr_no dns_servers_no dns_use_search_list dns_search_full_match dns_cache_init use_dns_cache use_dns_failover dns_cache_flags dns_cache_negative_ttl dns_cache_min_ttl dns_cache_max_ttl dns_cache_mem dns_cache_gc_interval dns_cache_del_nonexp dns_cache_delete_nonexpired dst_blacklist_init use_dst_blacklist dst_blacklist_mem dst_blacklist_expire dst_blacklist_ttl dst_blacklist_gc_interval port statistics maxbuffer children check_via phone2tel syn_branch memlog mem_log memdbg mem_dbg sip_warning server_signature reply_to_via user uid group gid chroot workdir wdir mhomed disable_tcp tcp_children tcp_accept_aliases tcp_send_timeout tcp_connect_timeout tcp_connection_lifetime tcp_poll_method tcp_max_connections tcp_no_connect tcp_source_ipv4 tcp_source_ipv6 tcp_fd_cache tcp_buf_write tcp_async tcp_conn_wq_max tcp_wq_max tcp_rd_buf_size tcp_wq_blk_size tcp_defer_accept tcp_delayed_ack tcp_syncnt tcp_linger2 tcp_keepalive tcp_keepidle tcp_keepintvl tcp_keepcnt tcp_crlf_ping disable_tls tls_disable enable_tls tls_enable tlslog tls_log tls_port_no tls_method tls_verify tls_require_certificate tls_certificate tls_private_key tls_ca_list tls_handshake_timeout tls_send_timeout disable_sctp enable_sctp sctp_children sctp_socket_rcvbuf sctp_socket_receive_buffer sctp_socket_sndbuf sctp_socket_send_buffer sctp_autoclose sctp_send_ttl sctp_send_retries socket_workers advertised_address advertised_port disable_core_dump open_files_limit shm_force_alloc mlock_pages real_time rt_prio rt_policy rt_timer1_prio rt_fast_timer_prio rt_ftimer_prio rt_timer1_policy rt_ftimer_policy rt_timer2_prio rt_stimer_prio rt_timer2_policy rt_stimer_policy mcast_loopback mcast_ttl tos pmtu_discovery exit_timeout ser_kill_timeout max_while_loops stun_refresh_interval stun_allow_stun stun_allow_fp server_id description descr desc loadpath mpath fork_delay modinit_delay http_reply_hack latency_log latency_limit_action latency_limit_db mem_join mem_safety msg_time tcp_clone_rcvbuf tls_max_connections async_workers max_recursive_level dns_naptr_ignore_rfc http_reply_parse version_table tcp_accept_no_cl advertise auto_bind_ipv6 sql_buffer_size pv_buffer_size pv_buffer_slots corelog core_log udp4_raw udp4_raw_mtu udp4_raw_ttl onsend_route_reply max_branches dns_cache_rec_pref run_dir async_usleep log_engine_type log_engine_data contained +syn keyword kamailioCoreParameter debug fork log_stderror log_facility log_name log_color log_prefix log_prefix_mode listen alias auto_aliases dns rev_dns dns_try_ipv6 dns_try_naptr dns_srv_lb dns_srv_loadbalancing dns_udp_pref dns_udp_preference dns_tcp_pref dns_tcp_preference dns_tls_pref dns_tls_preference dns_sctp_pref dns_sctp_preference dns_retr_time dns_retr_no dns_servers_no dns_use_search_list dns_search_full_match dns_cache_init use_dns_cache use_dns_failover dns_cache_flags dns_cache_negative_ttl dns_cache_min_ttl dns_cache_max_ttl dns_cache_mem dns_cache_gc_interval dns_cache_del_nonexp dns_cache_delete_nonexpired dst_blacklist_init use_dst_blacklist dst_blacklist_mem dst_blacklist_expire dst_blacklist_ttl dst_blacklist_gc_interval port statistics maxbuffer children check_via phone2tel syn_branch memlog mem_log memdbg mem_dbg sip_warning server_signature reply_to_via user uid group gid chroot workdir wdir mhomed disable_tcp tcp_children tcp_accept_aliases tcp_send_timeout tcp_connect_timeout tcp_connection_lifetime tcp_poll_method tcp_max_connections tcp_no_connect tcp_source_ipv4 tcp_source_ipv6 tcp_fd_cache tcp_buf_write tcp_async tcp_conn_wq_max tcp_wq_max tcp_rd_buf_size tcp_wq_blk_size tcp_defer_accept tcp_delayed_ack tcp_syncnt tcp_linger2 tcp_keepalive tcp_keepidle tcp_keepintvl tcp_keepcnt tcp_crlf_ping disable_tls tls_disable enable_tls tls_enable tlslog tls_log tls_port_no tls_method tls_verify tls_require_certificate tls_certificate tls_private_key tls_ca_list tls_handshake_timeout tls_send_timeout disable_sctp enable_sctp sctp_children sctp_socket_rcvbuf sctp_socket_receive_buffer sctp_socket_sndbuf sctp_socket_send_buffer sctp_autoclose sctp_send_ttl sctp_send_retries socket_workers advertised_address advertised_port disable_core_dump open_files_limit shm_force_alloc mlock_pages real_time rt_prio rt_policy rt_timer1_prio rt_fast_timer_prio rt_ftimer_prio rt_timer1_policy rt_ftimer_policy rt_timer2_prio rt_stimer_prio rt_timer2_policy rt_stimer_policy mcast_loopback mcast_ttl tos pmtu_discovery exit_timeout ser_kill_timeout max_while_loops stun_refresh_interval stun_allow_stun stun_allow_fp server_id description descr desc loadpath mpath fork_delay modinit_delay http_reply_hack latency_log latency_cfg_log latency_limit_action latency_limit_db mem_join mem_safety msg_time tcp_clone_rcvbuf tls_max_connections async_workers max_recursive_level dns_naptr_ignore_rfc http_reply_parse version_table tcp_accept_no_cl advertise auto_bind_ipv6 sql_buffer_size pv_buffer_size pv_buffer_slots corelog core_log udp4_raw udp4_raw_mtu udp4_raw_ttl onsend_route_reply max_branches dns_cache_rec_pref run_dir async_usleep log_engine_type log_engine_data cfgengine contained syn region kamailioBlock start='{' end='}' contained contains=kamailioBlock,@kamailioCodeElements