Skip to content

Commit 666e1f6

Browse files
committed
Updates on execution points for Feature Access Control
This refer to #RESTCOMM-1519
1 parent 2b5c3c9 commit 666e1f6

5 files changed

Lines changed: 7 additions & 1 deletion

File tree

restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/AccountsEndpoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ protected Response putAccount(final MultivaluedMap<String, String> data, final M
382382
ExtensionController ec = ExtensionController.getInstance();
383383
ApiRequest apiRequest = new ApiRequest(sid.toString(), data, ApiRequest.Type.CREATE_SUBACCOUNT);
384384

385-
if (executePostApiAction(apiRequest)) {
385+
if (executePreApiAction(apiRequest)) {
386386
final Account parent = accountsDao.getAccount(sid);
387387
Account account = null;
388388
try {

restcomm/restcomm.interpreter/src/main/java/org/restcomm/connect/interpreter/SmsInterpreter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ public void onReceive (final Object message) throws Exception {
395395

396396
if (er.isAllowed()) {
397397
fsm.transition(message, creatingSmsSession);
398+
ec.executePostInboundAction(far, extensions);
398399
} else {
399400
if (logger.isDebugEnabled()) {
400401
final String errMsg = "Outbound SMS is not Allowed";
@@ -404,6 +405,7 @@ public void onReceive (final Object message) throws Exception {
404405
final Notification notification = notification(WARNING_NOTIFICATION, 11001, "Outbound SMS is now allowed");
405406
notifications.addNotification(notification);
406407
fsm.transition(message, finished);
408+
ec.executePostInboundAction(far, extensions);
407409
return;
408410
}
409411
} else if (Verbs.email.equals(verb.name())) {

restcomm/restcomm.interpreter/src/main/java/org/restcomm/connect/interpreter/VoiceInterpreter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,7 @@ private void onTagMessage(Object message) throws TransitionFailedException, Tran
10081008

10091009
if (er.isAllowed()) {
10101010
fsm.transition(message, creatingSmsSession);
1011+
ec.executePostInboundAction(far, extensions);
10111012
} else {
10121013
if (logger.isDebugEnabled()) {
10131014
final String errMsg = "Outbound SMS is not Allowed";
@@ -1017,6 +1018,7 @@ private void onTagMessage(Object message) throws TransitionFailedException, Tran
10171018
final Notification notification = notification(WARNING_NOTIFICATION, 11001, "Outbound SMS is now allowed");
10181019
notifications.addNotification(notification);
10191020
fsm.transition(message, rejecting);
1021+
ec.executePostInboundAction(far, extensions);
10201022
return;
10211023
}
10221024
} else if (Verbs.email.equals(verb.name())) {

restcomm/restcomm.sms/src/main/java/org/restcomm/connect/sms/SmsService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ public void run() {
311311
final SipServletResponse resp = request.createResponse(SC_FORBIDDEN, "Call not allowed");
312312
resp.send();
313313
}
314+
ec.executePostOutboundAction(far, extensions);
314315
}
315316
} else {
316317
final SipServletResponse response = request.createResponse(SC_NOT_FOUND);

restcomm/restcomm.ussd/src/main/java/org/restcomm/connect/ussd/telephony/UssdCallManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ private boolean redirectToHostedVoiceApp(final ActorRef self, final SipServletRe
290290
applicationSession.setAttribute(UssdInterpreter.class.getName(), ussdInterpreter);
291291
applicationSession.setAttribute(UssdCall.class.getName(), ussdCall);
292292
isFoundHostedApp = true;
293+
ec.executePostOutboundAction(far, extensions);
293294
} else {
294295
if (logger.isDebugEnabled()) {
295296
final String errMsg = "Inbound USSD session is not Allowed";

0 commit comments

Comments
 (0)