Module: sip-router
Branch: master
Commit: 36b8a21cc8ec1cd89cfdea60a11e83711c0694b5
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=36b8a21…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Aug 29 22:40:19 2014 +0200
utils/misc/vim: syntax highlight rules for // comments
---
utils/misc/vim/syntax/kamailio.vim | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/utils/misc/vim/syntax/kamailio.vim b/utils/misc/vim/syntax/kamailio.vim
index b6a7df5..9ec8f4a 100644
--- a/utils/misc/vim/syntax/kamailio.vim
+++ b/utils/misc/vim/syntax/kamailio.vim
@@ -25,7 +25,7 @@ if exists("b:current_syntax")
finish
endif
-syn match kamailioConfigParamLine '^[^=]\+=.*$' contains=kamailioCoreParameter,kamailioString,kamailioConfigConstant,kamailioSpecial,kamailioNumber,kamailioCppComment,kamailioHashComment
+syn match kamailioConfigParamLine '^[^=]\+=.*$' contains=kamailioCoreParameter,kamailioString,kamailioConfigConstant,kamailioSpecial,kamailioNumber,kamailioCppComment,kamailioHashComment,kamailioSlashSlashComment
syn region kamailioConfigModparam start='^\s*modparam\s*(' end=')' contains=kamailioString,kamailioNumber
syn match kamailioConfigModule '^\s*loadmodule\s*"[^"]\+"' contains=kamailioString
@@ -37,6 +37,7 @@ syn region kamailioCppComment start='/\*' end='\*/' contains=kamailioTodo
syn match kamailioHashDefine '#!define\s\|#!ifdef\s\|#!ifndef\s\|#!endif\|#!else\|#!substdef\|#!substdefs\|#!subst\|#!trydef\|#!trydefine\|#!redef\|#!redefine\|!!define\s\|!!ifdef\s\|!!ifndef\s\|!!endif\|!!else\|!!substdef\|!!substdefs\|!!subst\|!!trydef\|!!trydefine\|!!redef\|!!redefine\|#!KAMAILIO\|#!OPENSER\|#!SER\|#!MAXCOMPAT\|#!ALL\|#!include_file\|#!import_file\|!!include_file\|!!import_file'
" syn match kamailioHashDefine '^\s*#!.+$'
syn match kamailioHashComment '#[^!].*$\|#$' contains=kamailioTodo
+syn match kamailioSlashSlashComment '//.*$\|//#$' contains=kamailioTodo
syn match kamailioStringEscape '\\.' contained
syn match kamailioNumber '[0-9]\+' contained
@@ -59,10 +60,11 @@ syn region kamailioBlock start='{' end='}' contained contains=kamailioBlock,@kam
syn match kamailioRouteBlock '\(failure_\|onreply_\|branch_\|event_\|onsend_\|request_\|reply_\)\?route\(\s*\[[^\]]\+\]\)\?' contained contains=kamailioNumber,kamailioString,kamailioIdentifier
syn region kamailioRrouteBlockFold matchgroup=kamailioRouteBlock start="\(failure_\|onreply_\|branch_\|event_\|onsend_\|request_\|reply_\)\?route\(\s*\[[^\]]\+\]\)\?\s*\n\?{" matchgroup=NONE end="}" contains=kamailioBlock,@kamailioCodeElements
-syn cluster kamailioCodeElements contains=kamailioHashDefine,kamailioCppComment,kamailioHashComment,kamailioNumber,kamailioString,kamailioVariable,kamailioOperator,kamailioStatement,kamailioKeyword,kamailioCoreKeyword,kamailioCoreValue,kamailioCoreFunction,kamailioIdentifier
+syn cluster kamailioCodeElements contains=kamailioHashDefine,kamailioCppComment,kamailioHashComment,kamailioSlashSlashComment,kamailioNumber,kamailioString,kamailioVariable,kamailioOperator,kamailioStatement,kamailioKeyword,kamailioCoreKeyword,kamailioCoreValue,kamailioCoreFunction,kamailioIdentifier
hi def link kamailioCppComment Comment
hi def link kamailioHashComment Comment
+hi def link kamailioSlashSlashComment Comment
hi def link kamailioHashDefine Special
hi def link kamailioTodo Todo
Module: sip-router
Branch: master
Commit: e4b6e43605bb530a44cd42f4f4a7cb4ff77332bf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e4b6e43…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Aug 29 14:58:39 2014 +0200
utils/misc/vim: vim specific files migrated to name kamailio
- vim syntax and autodetect files use now kamailio, to be easier
correlated with the name of packaged distribution
- syntax highlighting is identified now my kamailio (e.g., 'setf kamailio')
---
utils/misc/vim/Makefile | 4 +-
utils/misc/vim/README | 10 ++-
utils/misc/vim/ftdetect/{ser.vim => kamailio.vim} | 12 ++--
utils/misc/vim/syntax/kamailio.vim | 91 +++++++++++++++++++++
utils/misc/vim/syntax/ser.vim | 91 ---------------------
5 files changed, 105 insertions(+), 103 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=e4b…
Hello,
if you are on sr-dev list, you should have seen the last commits to
dialog module, which add support for remote profiles.
As most of you know (or at least the users of dialog module), profiles
are used to group active calls, their main purposes being counting
dialogs belonging to a profile for implementing active call limits
(e.g., all calls in the system, call from/to a specif user/address).
It was working on a single Kamailio instance, but one could use other
meanings to interact with other kamailio instance to get the number of
calls across multiple instances.
The purpose of remote profiles is to make the whole process easier and
more transparent for config file, simplifying the maintenance.
A remote profile is an item stored in local profile list not bound to a
local dialog. At this moment, dialog module in master branch exports a
function dlg_remote_profile() that allows to add/remove a remote profile.
The next step is to build the notification system between kamailio
instances. There are couple of options, as well as questions, that I
want to discuss before going to implement the mechanism. There are two
major aspects to care of:
A) Distribution, I thought of two options for it:
1) using dmq module to publish the operations done with local profiles
(add/remove) -- this seems to be the natural choice right now, Charles
Chance is also willing to put effort in this direction
This will be coded inside the module, so config won't be affected much
(eventually some extra parameters of dialog flags).
2) add event routes for adding/removing a local profile. The attributes
of the profile can be made available via some PV, then in config use
what so ever option (e.g., http query, json rpc, etc) for distributing
the information.
This will require changes in config file and might not be trivial for
new users
B) Persistence, with the options:
1) store remote profiles in local database.
It is good for restart, but if there is big downtime, then some
notifications can be lost and the list of remote profiles might be
inaccurate
2) keep in memory only and at startup send a 'request-for-update' to the
other instances -- these instances will send the list of their local
profiles.
It can take a bit between request-for-update and receiving data from the
other servers -- during this interval, the checks of overall call limits
might not give the desired answer
Of course, there can be enhancements/combinations, but it has to be
analysed if the benefit worth the complexity. For 1), store also the IP
of each remote profile and then interrogate for each profile to see if
its still active. For 2), add a mechanism to reject new calls until the
request-for-update is completed.
Anyone having other ideas or comments to the above?
Note that each profile got a unique id, so if you upgrade your dialog
module, profiles for existing active calls will not be loaded. Also, the
code was barely tested, report here any issue you have with dialog from
master branch.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA