re-added P-App-Name application selection

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@733 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 19 years ago
parent 4661b9941f
commit a2eb922962

@ -205,6 +205,8 @@ int AmConfig::readConfiguration()
AppSelect = App_RURIUSER;
} else if (Application == "$(ruri.param)") {
AppSelect = App_RURIPARAM;
} else if (Application == "$(apphdr)") {
AppSelect = App_APPHDR;
} else if (Application == "$(mapping)") {
AppSelect = App_MAPPING;
string appcfg_fname = ModConfigPath + "app_mapping.conf";

@ -89,6 +89,7 @@ struct AmConfig
enum ApplicationSelector {
App_RURIUSER,
App_RURIPARAM,
App_APPHDR,
App_MAPPING,
App_SPECIFIED
};

@ -319,6 +319,9 @@ AmSession* AmSessionContainer::createSession(AmSipRequest& req,
case AmConfig::App_RURIUSER:
req.cmd = req.user;
break;
case AmConfig::App_APPHDR:
req.cmd = getHeader(req.hdrs, APPNAME_HDR);
break;
case AmConfig::App_RURIPARAM:
req.cmd = get_header_param(req.r_uri, "app");
break;

@ -49,6 +49,8 @@ loglevel=2
# e.g. sip:announcement@host
# $(ruri.param) - uri parameter "app", e.g.
# sip:joe@host.net;app=announcement
# $(apphdr) - the value of the P-App-Name header is used
#
# $(mapping) - regex=>application mapping is read from
# app_mapping.conf (see app_mapping.conf)
# <application name> - application name configured here, e.g.
@ -57,6 +59,7 @@ loglevel=2
# examples:
# application = conference
# application = $(mapping)
# application = $(apphdr)
# application = $(ruri.user)
# application = $(ruri.param)

Loading…
Cancel
Save