OpenSIPS ASR fix, LoadTariffPlanFromStorDb crash fix, missing build dependency in glide.yaml

This commit is contained in:
John Koce Steel
2016-05-16 17:53:58 +02:00
parent 057a16b152
commit 1822c0ce89
5 changed files with 17 additions and 4 deletions

View File

@@ -43,6 +43,7 @@ information, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file.
| @noahmehl | Noah Mehl |
| @elfranne | Tom Braarup Cuykens |
| @rbarrabe | Régis Barrabé |
| @J0hnSteel | John Koce Steel |
<!-- to sign, include a single line above this comment containing the following text:
| @username | First Last |
-->

View File

@@ -387,7 +387,8 @@ func (self *ApierV1) LoadTariffPlanFromStorDb(attrs AttrLoadTpFromStorDb, reply
}
if len(cstKeys) != 0 && self.CdrStatsSrv != nil {
if err := self.CdrStatsSrv.Call("CDRStatsV1.ReloadQueues", cstKeys, nil); err != nil {
var out int
if err := self.CdrStatsSrv.Call("CDRStatsV1.ReloadQueues", cstKeys, &out); err != nil {
return err
}
}

View File

@@ -98,6 +98,7 @@ modparam("acc", "evi_extra", "cgr_reqtype=$avp(cgr_reqtype);
cgr_account=$avp(cgr_account);
cgr_destination=$avp(cgr_destination);
cgr_supplier=$avp(cgr_supplier);
cgr_answertime=$dlg_val(atime);
dialog_id=$DLG_did")
#modparam("acc", "db_url", "flatstore:/tmp")
#modparam("acc", "db_flag", "CDR")
@@ -344,6 +345,7 @@ route{
route[relay] {
# for INVITEs enable some additional helper routes
if (is_method("INVITE") && !has_totag()) {
t_on_reply("MSG_REPLY"); #added for completeness not tested
t_on_failure("missed_call");
}
if (!t_relay()) {
@@ -367,3 +369,11 @@ failure_route[missed_call] {
}
}
onreply_route[MSG_REPLY]{
if (t_check_status("200") && !$dlg_val(atime)){#so we set it ONLY ONCE
$dlg_val(atime)=$Ts;
}
if (t_check_status("4..")){#CAPTURE ALL ERROR CODES NEGATIVE ASR record
$dlg_val(atime)=NULL;
}
}

View File

@@ -1,6 +1,7 @@
package: github.com/cgrates/cgrates
import:
- package: github.com/DisposaBoy/JsonConfigReader
- package: github.com/cenk/hub
- package: github.com/cenkalti/rpc2
- package: github.com/cgrates/fsock
- package: github.com/cgrates/kamevapi

View File

@@ -151,11 +151,11 @@ func (osipsev *OsipsEvent) GetSetupTime(fieldName, timezone string) (time.Time,
return utils.ParseTimeDetectLayout(sTimeStr, timezone)
}
func (osipsev *OsipsEvent) GetAnswerTime(fieldName, timezone string) (time.Time, error) {
aTimeStr := utils.FirstNonEmpty(osipsev.osipsEvent.AttrValues[fieldName], osipsev.osipsEvent.AttrValues[TIME])
aTimeStr := utils.FirstNonEmpty(osipsev.osipsEvent.AttrValues[fieldName], osipsev.osipsEvent.AttrValues[CGR_ANSWERTIME])
if strings.HasPrefix(fieldName, utils.STATIC_VALUE_PREFIX) { // Static value
aTimeStr = fieldName[len(utils.STATIC_VALUE_PREFIX):]
} else if fieldName == utils.META_DEFAULT {
aTimeStr = osipsev.osipsEvent.AttrValues[TIME]
aTimeStr = osipsev.osipsEvent.AttrValues[CGR_ANSWERTIME]
}
return utils.ParseTimeDetectLayout(aTimeStr, timezone)
}
@@ -250,7 +250,7 @@ func (osipsev *OsipsEvent) PassesFieldFilter(*utils.RSRField) (bool, string) {
}
func (osipsev *OsipsEvent) GetExtraFields() map[string]string {
primaryFields := []string{TO_TAG, SETUP_DURATION, OSIPS_SETUP_TIME, "method", "callid", "sip_reason", OSIPS_EVENT_TIME, "sip_code", "duration", "from_tag", "dialog_id",
CGR_TENANT, CGR_CATEGORY, CGR_REQTYPE, CGR_ACCOUNT, CGR_SUBJECT, CGR_DESTINATION, utils.CGR_SUPPLIER, CGR_PDD}
CGR_TENANT, CGR_CATEGORY, CGR_REQTYPE, CGR_ACCOUNT, CGR_SUBJECT, CGR_DESTINATION, utils.CGR_SUPPLIER, CGR_PDD,CGR_ANSWERTIME}
extraFields := make(map[string]string)
for field, val := range osipsev.osipsEvent.AttrValues {
if !utils.IsSliceMember(primaryFields, field) {