Browse Source

Merge pull request #39 from siplabs/KAZOO-3507

KAZOO-3507: System-based call waiting feature on Kamailio side
3.20
lazedo 11 years ago
parent
commit
9605977234
3 changed files with 19 additions and 0 deletions
  1. +6
    -0
      kamailio/default.cfg
  2. +1
    -0
      kamailio/local.cfg
  3. +12
    -0
      kamailio/responder-role.cfg

+ 6
- 0
kamailio/default.cfg View File

@ -201,6 +201,9 @@ include_file "traffic-filter-role.cfg"
#!ifdef PUSHER-ROLE #!ifdef PUSHER-ROLE
include_file "pusher-role.cfg" include_file "pusher-role.cfg"
#!endif #!endif
#!ifdef RESPONDER-ROLE
include_file "responder-role.cfg"
#!endif
####### Permissions module ########## ####### Permissions module ##########
loadmodule "permissions.so" loadmodule "permissions.so"
@ -253,6 +256,9 @@ route
route(PREPARE_INITIAL_REQUESTS); route(PREPARE_INITIAL_REQUESTS);
if (isflagset(FLAG_INTERNALLY_SOURCED)) { if (isflagset(FLAG_INTERNALLY_SOURCED)) {
#!ifdef RESPONDER-ROLE
route(HANDLE_RESPOND);
#!endif
route(INTERNAL_TO_EXTERNAL_RELAY); route(INTERNAL_TO_EXTERNAL_RELAY);
exit(); exit();
} }


+ 1
- 0
kamailio/local.cfg View File

@ -11,6 +11,7 @@ debug = L_INFO
#!trydef NAT-TRAVERSAL-ROLE #!trydef NAT-TRAVERSAL-ROLE
#!trydef REGISTRAR-ROLE #!trydef REGISTRAR-ROLE
#!trydef PRESENCE-ROLE #!trydef PRESENCE-ROLE
#!trydef RESPONDER-ROLE
## Disabled Roles - remove all but the last '#' to enable ## Disabled Roles - remove all but the last '#' to enable
# # #!trydef TRAFFIC-FILTER-ROLE # # #!trydef TRAFFIC-FILTER-ROLE


+ 12
- 0
kamailio/responder-role.cfg View File

@ -0,0 +1,12 @@
####### Responder Logic ########
route[HANDLE_RESPOND]
{
$var(header) = $hdr(X-KAZOO-Respond-With);
if (not_empty("$var(header)")) {
$var(code) = $(var(header){s.substr,0,3}{s.int});
$var(msg) = $(var(header){s.substr,4,0});
xlog("L_INFO", "$ci|end|Responding with [$var(code)/$var(msg)]");
sl_send_reply("$var(code)", "$var(msg)");
exit();
}
}

Loading…
Cancel
Save