Added *method for dispatcherS event

This commit is contained in:
Trial97
2021-06-11 13:54:48 +03:00
committed by Dan Christian Bogos
parent e472a95809
commit 13b7ede0b2
2 changed files with 7 additions and 0 deletions

View File

@@ -193,6 +193,9 @@ func (dS *DispatcherService) Dispatch(ev *utils.CGREvent, subsys string,
evNm := utils.MapStorage{
utils.MetaReq: ev.Event,
utils.MetaOpts: ev.APIOpts,
utils.MetaVars: utils.MapStorage{
utils.MetaMethod: serviceMethod,
},
}
var dPrfls engine.DispatcherProfiles
if dPrfls, err = dS.dispatcherProfilesForEvent(tnt, ev, evNm, subsys); err != nil {
@@ -227,6 +230,9 @@ func (dS *DispatcherService) V1GetProfilesForEvent(ev *utils.CGREvent,
retDPfl, errDpfl := dS.dispatcherProfilesForEvent(tnt, ev, utils.MapStorage{
utils.MetaReq: ev.Event,
utils.MetaOpts: ev.APIOpts,
utils.MetaVars: utils.MapStorage{
utils.MetaMethod: ev.APIOpts[utils.MetaMethod],
},
}, utils.IfaceAsString(ev.APIOpts[utils.Subsys]))
if errDpfl != nil {
return utils.NewErrDispatcherS(errDpfl)

View File

@@ -2461,6 +2461,7 @@ const (
// Others
OptsContext = "*context"
Subsys = "*subsys"
MetaMethod = "*method"
OptsAttributesProcessRuns = "*processRuns"
MetaEventType = "*eventType"
EventType = "EventType"