Hello Carsten,
o Carsten Bock on 02/08/2012 06:37 PM:
Module: sems
Branch: master
Commit: 640b7f4e61bec6b953210434ff9b1d464d3fd0b4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=640b7f4e61bec6b953210434ff9b1d464d3fd0b4
Author: Carsten Bock<[email protected]>
Committer: Carsten Bock<[email protected]>
Date: Wed Feb 8 18:36:21 2012 +0100
- allow setting RURI from callcontrol plugins
you can access the call profile object directly in the call control
module. See also the documentation:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sems;a=blob;f=doc/Readme.sbc_call_control.txt
Therefore, this command is not needed; I think you can reverse the commit.
If you need an example on how to use this, have a look at ctl,
bl_redis, or rest call control modules.
Best Regards
Stefan
---
apps/sbc/SBC.cpp | 13 +++++++++++++
core/ampi/SBCCallControlAPI.h | 4 ++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/apps/sbc/SBC.cpp b/apps/sbc/SBC.cpp
index dc6047b..fb8909f 100644
--- a/apps/sbc/SBC.cpp
+++ b/apps/sbc/SBC.cpp
@@ -1381,6 +1381,19 @@ bool SBCDialog::CCStart(const AmSipRequest& req) {
saveCallTimer(cc_timer_id, timeout);
cc_timer_id++;
} break;
+ case SBC_CC_SET_RURI_ACTION: {
+ if (ret[i].size()< 1 ||
+ !isArgCStr(ret[i][SBC_CC_SET_RURI]) ||
+ !strlen(ret[i][SBC_CC_SET_RURI].asCStr())
+ ) {
+ ERROR("in call control module '%s' - RURI action parameters
missing/wrong: '%s'\n",
+ cc_if.cc_name.c_str(), AmArg::print(ret[i]).c_str());
+ continue;
+ }
+ DBG("in call control module '%s' - SBC_CC_SET_RURI_ACTION - setting URI
to '%s'\n",
+ cc_if.cc_name.c_str(), ret[i][SBC_CC_SET_RURI].asCStr());
+ call_profile.ruri = string(ret[i][SBC_CC_SET_RURI].asCStr());
+ } break;
default: {
ERROR("unknown call control action: '%s'\n",
AmArg::print(ret[i]).c_str());
diff --git a/core/ampi/SBCCallControlAPI.h b/core/ampi/SBCCallControlAPI.h
index 163823c..06da65f 100644
--- a/core/ampi/SBCCallControlAPI.h
+++ b/core/ampi/SBCCallControlAPI.h
@@ -24,6 +24,7 @@
#define SBC_CC_DROP_ACTION 0
#define SBC_CC_REFUSE_ACTION 1
#define SBC_CC_SET_CALL_TIMER_ACTION 2
+#define SBC_CC_SET_RURI_ACTION 3
// index in action parameter:
#define SBC_CC_ACTION 0
@@ -36,6 +37,9 @@
// set timer
#define SBC_CC_TIMER_TIMEOUT 1
+// set RURI from CC
+#define SBC_CC_SET_RURI 1
+
/** post an SBCCallTimerEvent to an SBC call in order to set or reset call
timer */
#define SBCCallTimerEvent_ID -563
struct SBCCallTimerEvent : public AmEvent {
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
--
Stefan Sayer
CEO (Geschäftsführer)
FRAFOS GmbH
email: [email protected]
mobile:+49 162 1366449
www.frafos.com
Prinzessinnenstr. 19/20 betahaus
10969 Berlin
Germany
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev