diff --git a/agents/astagent.go b/agents/astagent.go index 49195d2ba..46da18f39 100644 --- a/agents/astagent.go +++ b/agents/astagent.go @@ -321,7 +321,10 @@ func (sma *AsteriskAgent) handleChannelDestroyed(ev *SMAsteriskEvent) { if sma.cgrCfg.AsteriskAgentCfg().CreateCDR { if err := sma.connMgr.Call(sma.cgrCfg.AsteriskAgentCfg().SessionSConns, sma, utils.SessionSv1ProcessCDR, - cgrEvDisp, &reply); err != nil { + &utils.CGREventWithArgDispatcher{ + CGREvent: cgrEvDisp.CGREvent, + ArgDispatcher: cgrEvDisp.ArgDispatcher, + }, &reply); err != nil { utils.Logger.Err(fmt.Sprintf("<%s> Error: %s when attempting to process CDR for channelID: %s", utils.AsteriskAgent, err.Error(), ev.ChannelID())) } diff --git a/agents/fsevent_test.go b/agents/fsevent_test.go index d96f84aa4..1eb88a71a 100644 --- a/agents/fsevent_test.go +++ b/agents/fsevent_test.go @@ -639,7 +639,7 @@ func TestSliceAsFsArray(t *testing.T) { // Make sure processing of the hangup event produces the same output as FS-JSON CDR func TestSyncFsEventWithJsonCdr(t *testing.T) { body := []byte(` -{"core-uuid":"63e2315b-d538-4dfa-9ed5-af73ba6210b6","switchname":"teo","channel_data":{"state":"CS_REPORTING","state_number":"11","flags":"0=1;1=1;3=1;20=1;37=1;38=1;40=1;43=1;48=1;53=1;75=1;77=1;106=1;112=1;113=1;122=1;134=1","caps":"1=1;2=1;3=1;4=1;5=1;6=1"},"callStats":{"audio":{"inbound":{"raw_bytes":174156,"media_bytes":166416,"packet_count":1033,"media_packet_count":988,"skip_packet_count":7,"jitter_packet_count":0,"dtmf_packet_count":0,"cng_packet_count":0,"flush_packet_count":45,"largest_jb_size":0,"jitter_min_variance":0.500000,"jitter_max_variance":31.769231,"jitter_loss_rate":0,"jitter_burst_rate":0,"mean_interval":20.171779,"flaw_total":1,"quality_percentage":99,"mos":4.492027,"errorLog":[{"start":1521025783725905,"stop":1521025788366141,"flaws":10763,"consecutiveFlaws":0,"durationMS":4640}]},"outbound":{"raw_bytes":43344,"media_bytes":43344,"packet_count":252,"media_packet_count":252,"skip_packet_count":0,"dtmf_packet_count":0,"cng_packet_count":0,"rtcp_packet_count":0,"rtcp_octet_count":0}}},"variables":{"uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","session_id":"1","sip_from_user":"1001","sip_from_uri":"1001@192.168.56.202","sip_from_host":"192.168.56.202","channel_name":"sofia/internal/1001@192.168.56.202","ep_codec_string":"mod_spandsp.G722@8000h@20i@64000b,CORE_PCM_MODULE.PCMU@8000h@20i@64000b,CORE_PCM_MODULE.PCMA@8000h@20i@64000b,mod_spandsp.GSM@8000h@20i@13200b","sip_local_network_addr":"192.168.56.202","sip_network_ip":"192.168.56.1","sip_network_port":"5060","sip_invite_stamp":"1521025758006702","sip_received_ip":"192.168.56.1","sip_received_port":"5060","sip_via_protocol":"udp","sip_authorized":"true","Event-Name":"REQUEST_PARAMS","Core-UUID":"63e2315b-d538-4dfa-9ed5-af73ba6210b6","FreeSWITCH-Hostname":"teo","FreeSWITCH-Switchname":"teo","FreeSWITCH-IPv4":"10.0.2.15","FreeSWITCH-IPv6":"::1","Event-Date-Local":"2018-03-14 07:09:18","Event-Date-GMT":"Wed, 14 Mar 2018 11:09:18 GMT","Event-Date-Timestamp":"1521025758006702","Event-Calling-File":"sofia.c","Event-Calling-Function":"sofia_handle_sip_i_invite","Event-Calling-Line-Number":"10096","Event-Sequence":"1025","sip_number_alias":"1001","sip_auth_username":"1001","sip_auth_realm":"192.168.56.202","number_alias":"1001","requested_user_name":"1001","requested_domain_name":"192.168.56.202","record_stereo":"true","transfer_fallback_extension":"operator","toll_allow":"domestic,international,local","accountcode":"1001","user_context":"default","effective_caller_id_name":"Extension 1001","effective_caller_id_number":"1001","callgroup":"techsupport","cgr_reqtype":"*prepaid","cgr_flags":"*resources,*attributes,*sessions,*suppliers","user_name":"1001","domain_name":"192.168.56.202","sip_from_user_stripped":"1001","sofia_profile_name":"internal","recovery_profile_name":"internal","sip_req_user":"1002","sip_req_uri":"1002@192.168.56.202","sip_req_host":"192.168.56.202","sip_to_user":"1002","sip_to_uri":"1002@192.168.56.202","sip_to_host":"192.168.56.202","sip_contact_params":"transport=udp;registering_acc=192_168_56_202","sip_contact_user":"1001","sip_contact_port":"5060","sip_contact_uri":"1001@192.168.56.1:5060","sip_contact_host":"192.168.56.1","sip_via_host":"192.168.56.1","sip_via_port":"5060","presence_id":"1001@192.168.56.202","cgr_resource_allocation":"ResGroup1","cgr_suppliers":"ARRAY::3|:supplier2|:supplier3|:supplier1","cgr_notify":"AUTH_OK","max_forwards":"69","transfer_history":"1521025758:86c9ebb2-888f-42d5-9afa-2101449a4b86:bl_xfer:1002/default/XML","transfer_source":"1521025758:86c9ebb2-888f-42d5-9afa-2101449a4b86:bl_xfer:1002/default/XML","DP_MATCH":"ARRAY::1002|:1002","call_uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","call_timeout":"30","current_application_data":"user/1002@192.168.56.202","current_application":"bridge","dialed_user":"1002","dialed_domain":"192.168.56.202","originated_legs":"ARRAY::9c1afb4f-1d4a-4e45-84a3-d25721981bf5;Outbound Call;1002|:9c1afb4f-1d4a-4e45-84a3-d25721981bf5;Outbound Call;1002","switch_m_sdp":"v=0\r\no=1002-jitsi.org 0 0 IN IP4 192.168.56.1\r\ns=-\r\nc=IN IP4 192.168.56.1\r\nt=0 0\r\nm=audio 5004 RTP/AVP 9 0 8 3 101\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:3 GSM/8000\r\na=rtpmap:101 telephone-event/8000\r\n","rtp_use_codec_name":"G722","rtp_use_codec_rate":"8000","rtp_use_codec_ptime":"20","rtp_use_codec_channels":"1","rtp_last_audio_codec_string":"G722@8000h@20i@1c","read_codec":"G722","original_read_codec":"G722","read_rate":"16000","original_read_rate":"16000","write_codec":"G722","write_rate":"16000","local_media_ip":"192.168.56.202","local_media_port":"29014","advertised_media_ip":"192.168.56.202","rtp_use_timer_name":"soft","rtp_use_pt":"9","rtp_use_ssrc":"2729250253","endpoint_disposition":"ANSWER","originate_causes":"ARRAY::9c1afb4f-1d4a-4e45-84a3-d25721981bf5;NONE|:9c1afb4f-1d4a-4e45-84a3-d25721981bf5;NONE","originate_disposition":"SUCCESS","DIALSTATUS":"SUCCESS","last_bridge_to":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","bridge_channel":"sofia/internal/1002@192.168.56.1:5060","bridge_uuid":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","signal_bond":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","last_sent_callee_id_name":"Outbound Call","last_sent_callee_id_number":"1002","switch_r_sdp":"v=0\r\no=1001-jitsi.org 0 2 IN IP4 192.168.56.1\r\ns=-\r\nc=IN IP4 192.168.56.1\r\nt=0 0\r\nm=audio 5000 RTP/AVP 96 97 98 9 100 102 0 8 103 3 104 4 101\r\na=rtpmap:96 opus/48000/2\r\na=fmtp:96 usedtx=1\r\na=rtpmap:97 SILK/24000\r\na=rtpmap:98 SILK/16000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:100 speex/32000\r\na=rtpmap:102 speex/16000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:103 iLBC/8000\r\na=rtpmap:3 GSM/8000\r\na=rtpmap:104 speex/8000\r\na=rtpmap:4 G723/8000\r\na=fmtp:4 annexa=no;bitrate=6.3\r\na=rtpmap:101 telephone-event/8000\r\na=ptime:20\r\na=extmap:1 urn:ietf:params:rtp-hdrext:csrc-audio-level\r\na=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=rtcp-xr:voip-metrics\r\na=zrtp-hash:1.10 8e8dd2fa6803f32845f26e55879c776a4bc015ee05b41630313aee27ef77fb30\r\nm=video 5006 RTP/AVP 105 99\r\na=rtpmap:105 H264/90000\r\na=fmtp:105 profile-level-id=4DE01f;packetization-mode=1\r\na=rtpmap:99 H264/90000\r\na=fmtp:99 profile-level-id=4DE01f\r\na=recvonly\r\na=imageattr:105 send * recv [x=[1:1920],y=[1:1080]]\r\na=imageattr:99 send * recv [x=[1:1920],y=[1:1080]]\r\n","rtp_use_codec_string":"G722,PCMU,PCMA,GSM","r_sdp_audio_zrtp_hash":"1.10 8e8dd2fa6803f32845f26e55879c776a4bc015ee05b41630313aee27ef77fb30","audio_media_flow":"sendrecv","remote_media_ip":"192.168.56.1","remote_media_port":"5000","rtp_audio_recv_pt":"9","dtmf_type":"rfc2833","rtp_2833_send_payload":"101","rtp_2833_recv_payload":"101","video_possible":"true","video_media_flow":"sendonly","rtp_local_sdp_str":"v=0\r\no=FreeSWITCH 1520996753 1520996756 IN IP4 192.168.56.202\r\ns=FreeSWITCH\r\nc=IN IP4 192.168.56.202\r\nt=0 0\r\nm=audio 29014 RTP/AVP 9 101\r\na=rtpmap:9 G722/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=ptime:20\r\na=sendrecv\r\nm=video 0 RTP/AVP 19\r\n","sip_to_tag":"aDUZXF1Z1vD6p","sip_from_tag":"df94d020","sip_cseq":"4","sip_call_id":"985e365faa0ec79a7fa75d001ef2449f@0:0:0:0:0:0:0:0","sip_full_via":"SIP/2.0/UDP 192.168.56.1:5060;branch=z9hG4bK-323230-ab335b3491dd24f5ec251b9700716b97","sip_from_display":"1001","sip_full_from":"\"1001\" ;tag=df94d020","sip_full_to":";tag=aDUZXF1Z1vD6p","sip_term_status":"200","proto_specific_hangup_cause":"sip:200","sip_term_cause":"16","last_bridge_role":"originator","sip_user_agent":"Jitsi2.10.5550Windows 10","sip_hangup_disposition":"recv_bye","bridge_hangup_cause":"NORMAL_CLEARING","hangup_cause":"NORMAL_CLEARING","hangup_cause_q850":"16","digits_dialed":"none","start_stamp":"2018-03-14 07:09:18","profile_start_stamp":"2018-03-14 07:09:18","answer_stamp":"2018-03-14 07:09:27","bridge_stamp":"2018-03-14 07:09:27","hold_stamp":"2018-03-14 07:09:27","progress_stamp":"2018-03-14 07:09:18","progress_media_stamp":"2018-03-14 07:09:27","hold_events":"{{1521025767847893,1521025783334494}}","end_stamp":"2018-03-14 07:09:48","start_epoch":"1521025758","start_uepoch":"1521025758006702","profile_start_epoch":"1521025758","profile_start_uepoch":"1521025758026167","answer_epoch":"1521025767","answer_uepoch":"1521025767766321","bridge_epoch":"1521025767","bridge_uepoch":"1521025767766321","last_hold_epoch":"1521025767","last_hold_uepoch":"1521025767847892","hold_accum_seconds":"15","hold_accum_usec":"15486602","hold_accum_ms":"15486","resurrect_epoch":"0","resurrect_uepoch":"0","progress_epoch":"1521025758","progress_uepoch":"1521025758116123","progress_media_epoch":"1521025767","progress_media_uepoch":"1521025767766321","end_epoch":"1521025788","end_uepoch":"1521025788366141","last_app":"bridge","last_arg":"user/1002@192.168.56.202","caller_id":"\"1001\" <1001>","duration":"30","billsec":"21","progresssec":"0","answersec":"9","waitsec":"9","progress_mediasec":"9","flow_billsec":"30","mduration":"30360","billmsec":"20600","progressmsec":"110","answermsec":"9760","waitmsec":"9760","progress_mediamsec":"9760","flow_billmsec":"30360","uduration":"30359439","billusec":"20599820","progressusec":"109421","answerusec":"9759619","waitusec":"9759619","progress_mediausec":"9759619","flow_billusec":"30359439","rtp_audio_in_raw_bytes":"174156","rtp_audio_in_media_bytes":"166416","rtp_audio_in_packet_count":"1033","rtp_audio_in_media_packet_count":"988","rtp_audio_in_skip_packet_count":"7","rtp_audio_in_jitter_packet_count":"0","rtp_audio_in_dtmf_packet_count":"0","rtp_audio_in_cng_packet_count":"0","rtp_audio_in_flush_packet_count":"45","rtp_audio_in_largest_jb_size":"0","rtp_audio_in_jitter_min_variance":"0.50","rtp_audio_in_jitter_max_variance":"31.77","rtp_audio_in_jitter_loss_rate":"0.00","rtp_audio_in_jitter_burst_rate":"0.00","rtp_audio_in_mean_interval":"20.17","rtp_audio_in_flaw_total":"1","rtp_audio_in_quality_percentage":"99.00","rtp_audio_in_mos":"4.49","rtp_audio_out_raw_bytes":"43344","rtp_audio_out_media_bytes":"43344","rtp_audio_out_packet_count":"252","rtp_audio_out_media_packet_count":"252","rtp_audio_out_skip_packet_count":"0","rtp_audio_out_dtmf_packet_count":"0","rtp_audio_out_cng_packet_count":"0","rtp_audio_rtcp_packet_count":"0","rtp_audio_rtcp_octet_count":"0"},"app_log":{"applications":[{"app_name":"info","app_data":"","app_stamp":"1521025758010697"},{"app_name":"park","app_data":"","app_stamp":"1521025758011143"},{"app_name":"set","app_data":"ringback=","app_stamp":"1521025758057183"},{"app_name":"set","app_data":"call_timeout=30","app_stamp":"1521025758057474"},{"app_name":"bridge","app_data":"user/1002@192.168.56.202","app_stamp":"1521025758057698"}]},"callflow":[{"dialplan":"XML","profile_index":"2","extension":{"name":"Local_Extension","number":"1002","applications":[{"app_name":"set","app_data":"ringback=${us-ring}"},{"app_name":"set","app_data":"call_timeout=30"},{"app_name":"bridge","app_data":"user/${destination_number}@${domain_name}"}]},"caller_profile":{"username":"1001","dialplan":"XML","caller_id_name":"1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"1002","destination_number":"1002","uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1001@192.168.56.202","originatee":{"originatee_caller_profiles":[{"username":"1001","dialplan":"XML","caller_id_name":"Extension 1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"1002","destination_number":"1002","uuid":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1002@192.168.56.1:5060"},{"username":"1001","dialplan":"XML","caller_id_name":"Extension 1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"1002","destination_number":"1002","uuid":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1002@192.168.56.1:5060"}]}},"times":{"created_time":"1521025758006702","profile_created_time":"1521025758026167","progress_time":"1521025758116123","progress_media_time":"1521025767766321","answered_time":"1521025767766321","bridged_time":"1521025767766321","last_hold_time":"1521025767847892","hold_accum_time":"15486602","hangup_time":"1521025788366141","resurrect_time":"0","transfer_time":"0"}},{"dialplan":"XML","profile_index":"1","extension":{"name":"CGRateS_Auth","number":"1002","applications":[{"app_name":"info","app_data":""},{"app_name":"park","app_data":""}]},"caller_profile":{"username":"1001","dialplan":"XML","caller_id_name":"1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"","destination_number":"1002","uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1001@192.168.56.202"},"times":{"created_time":"1521025758006702","profile_created_time":"1521025758006702","progress_time":"0","progress_media_time":"0","answered_time":"0","bridged_time":"0","last_hold_time":"0","hold_accum_time":"0","hangup_time":"0","resurrect_time":"0","transfer_time":"1521025758026167"}}]} `) +{"core-uuid":"63e2315b-d538-4dfa-9ed5-af73ba6210b6","switchname":"teo","channel_data":{"state":"CS_REPORTING","state_number":"11","flags":"0=1;1=1;3=1;20=1;37=1;38=1;40=1;43=1;48=1;53=1;75=1;77=1;106=1;112=1;113=1;122=1;134=1","caps":"1=1;2=1;3=1;4=1;5=1;6=1"},"callStats":{"audio":{"inbound":{"raw_bytes":174156,"media_bytes":166416,"packet_count":1033,"media_packet_count":988,"skip_packet_count":7,"jitter_packet_count":0,"dtmf_packet_count":0,"cng_packet_count":0,"flush_packet_count":45,"largest_jb_size":0,"jitter_min_variance":0.500000,"jitter_max_variance":31.769231,"jitter_loss_rate":0,"jitter_burst_rate":0,"mean_interval":20.171779,"flaw_total":1,"quality_percentage":99,"mos":4.492027,"errorLog":[{"start":1521025783725905,"stop":1521025788366141,"flaws":10763,"consecutiveFlaws":0,"durationMS":4640}]},"outbound":{"raw_bytes":43344,"media_bytes":43344,"packet_count":252,"media_packet_count":252,"skip_packet_count":0,"dtmf_packet_count":0,"cng_packet_count":0,"rtcp_packet_count":0,"rtcp_octet_count":0}}},"variables":{"uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","session_id":"1","sip_from_user":"1001","sip_from_uri":"1001@192.168.56.202","sip_from_host":"192.168.56.202","channel_name":"sofia/internal/1001@192.168.56.202","ep_codec_string":"mod_spandsp.G722@8000h@20i@64000b,CORE_PCM_MODULE.PCMU@8000h@20i@64000b,CORE_PCM_MODULE.PCMA@8000h@20i@64000b,mod_spandsp.GSM@8000h@20i@13200b","sip_local_network_addr":"192.168.56.202","sip_network_ip":"192.168.56.1","sip_network_port":"5060","sip_invite_stamp":"1521025758006702","sip_received_ip":"192.168.56.1","sip_received_port":"5060","sip_via_protocol":"udp","sip_authorized":"true","Event-Name":"REQUEST_PARAMS","Core-UUID":"63e2315b-d538-4dfa-9ed5-af73ba6210b6","FreeSWITCH-Hostname":"teo","FreeSWITCH-Switchname":"teo","FreeSWITCH-IPv4":"10.0.2.15","FreeSWITCH-IPv6":"::1","Event-Date-Local":"2018-03-14 07:09:18","Event-Date-GMT":"Wed, 14 Mar 2018 11:09:18 GMT","Event-Date-Timestamp":"1521025758006702","Event-Calling-File":"sofia.c","Event-Calling-Function":"sofia_handle_sip_i_invite","Event-Calling-Line-Number":"10096","Event-Sequence":"1025","sip_number_alias":"1001","sip_auth_username":"1001","sip_auth_realm":"192.168.56.202","number_alias":"1001","requested_user_name":"1001","requested_domain_name":"192.168.56.202","record_stereo":"true","transfer_fallback_extension":"operator","toll_allow":"domestic,international,local","accountcode":"1001","user_context":"default","effective_caller_id_name":"Extension 1001","effective_caller_id_number":"1001","callgroup":"techsupport","cgr_reqtype":"*prepaid","cgr_flags":"*resources,*attributes,*sessions,*routes","user_name":"1001","domain_name":"192.168.56.202","sip_from_user_stripped":"1001","sofia_profile_name":"internal","recovery_profile_name":"internal","sip_req_user":"1002","sip_req_uri":"1002@192.168.56.202","sip_req_host":"192.168.56.202","sip_to_user":"1002","sip_to_uri":"1002@192.168.56.202","sip_to_host":"192.168.56.202","sip_contact_params":"transport=udp;registering_acc=192_168_56_202","sip_contact_user":"1001","sip_contact_port":"5060","sip_contact_uri":"1001@192.168.56.1:5060","sip_contact_host":"192.168.56.1","sip_via_host":"192.168.56.1","sip_via_port":"5060","presence_id":"1001@192.168.56.202","cgr_resource_allocation":"ResGroup1","cgr_suppliers":"ARRAY::3|:supplier2|:supplier3|:supplier1","cgr_notify":"AUTH_OK","max_forwards":"69","transfer_history":"1521025758:86c9ebb2-888f-42d5-9afa-2101449a4b86:bl_xfer:1002/default/XML","transfer_source":"1521025758:86c9ebb2-888f-42d5-9afa-2101449a4b86:bl_xfer:1002/default/XML","DP_MATCH":"ARRAY::1002|:1002","call_uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","call_timeout":"30","current_application_data":"user/1002@192.168.56.202","current_application":"bridge","dialed_user":"1002","dialed_domain":"192.168.56.202","originated_legs":"ARRAY::9c1afb4f-1d4a-4e45-84a3-d25721981bf5;Outbound Call;1002|:9c1afb4f-1d4a-4e45-84a3-d25721981bf5;Outbound Call;1002","switch_m_sdp":"v=0\r\no=1002-jitsi.org 0 0 IN IP4 192.168.56.1\r\ns=-\r\nc=IN IP4 192.168.56.1\r\nt=0 0\r\nm=audio 5004 RTP/AVP 9 0 8 3 101\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:3 GSM/8000\r\na=rtpmap:101 telephone-event/8000\r\n","rtp_use_codec_name":"G722","rtp_use_codec_rate":"8000","rtp_use_codec_ptime":"20","rtp_use_codec_channels":"1","rtp_last_audio_codec_string":"G722@8000h@20i@1c","read_codec":"G722","original_read_codec":"G722","read_rate":"16000","original_read_rate":"16000","write_codec":"G722","write_rate":"16000","local_media_ip":"192.168.56.202","local_media_port":"29014","advertised_media_ip":"192.168.56.202","rtp_use_timer_name":"soft","rtp_use_pt":"9","rtp_use_ssrc":"2729250253","endpoint_disposition":"ANSWER","originate_causes":"ARRAY::9c1afb4f-1d4a-4e45-84a3-d25721981bf5;NONE|:9c1afb4f-1d4a-4e45-84a3-d25721981bf5;NONE","originate_disposition":"SUCCESS","DIALSTATUS":"SUCCESS","last_bridge_to":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","bridge_channel":"sofia/internal/1002@192.168.56.1:5060","bridge_uuid":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","signal_bond":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","last_sent_callee_id_name":"Outbound Call","last_sent_callee_id_number":"1002","switch_r_sdp":"v=0\r\no=1001-jitsi.org 0 2 IN IP4 192.168.56.1\r\ns=-\r\nc=IN IP4 192.168.56.1\r\nt=0 0\r\nm=audio 5000 RTP/AVP 96 97 98 9 100 102 0 8 103 3 104 4 101\r\na=rtpmap:96 opus/48000/2\r\na=fmtp:96 usedtx=1\r\na=rtpmap:97 SILK/24000\r\na=rtpmap:98 SILK/16000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:100 speex/32000\r\na=rtpmap:102 speex/16000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:103 iLBC/8000\r\na=rtpmap:3 GSM/8000\r\na=rtpmap:104 speex/8000\r\na=rtpmap:4 G723/8000\r\na=fmtp:4 annexa=no;bitrate=6.3\r\na=rtpmap:101 telephone-event/8000\r\na=ptime:20\r\na=extmap:1 urn:ietf:params:rtp-hdrext:csrc-audio-level\r\na=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=rtcp-xr:voip-metrics\r\na=zrtp-hash:1.10 8e8dd2fa6803f32845f26e55879c776a4bc015ee05b41630313aee27ef77fb30\r\nm=video 5006 RTP/AVP 105 99\r\na=rtpmap:105 H264/90000\r\na=fmtp:105 profile-level-id=4DE01f;packetization-mode=1\r\na=rtpmap:99 H264/90000\r\na=fmtp:99 profile-level-id=4DE01f\r\na=recvonly\r\na=imageattr:105 send * recv [x=[1:1920],y=[1:1080]]\r\na=imageattr:99 send * recv [x=[1:1920],y=[1:1080]]\r\n","rtp_use_codec_string":"G722,PCMU,PCMA,GSM","r_sdp_audio_zrtp_hash":"1.10 8e8dd2fa6803f32845f26e55879c776a4bc015ee05b41630313aee27ef77fb30","audio_media_flow":"sendrecv","remote_media_ip":"192.168.56.1","remote_media_port":"5000","rtp_audio_recv_pt":"9","dtmf_type":"rfc2833","rtp_2833_send_payload":"101","rtp_2833_recv_payload":"101","video_possible":"true","video_media_flow":"sendonly","rtp_local_sdp_str":"v=0\r\no=FreeSWITCH 1520996753 1520996756 IN IP4 192.168.56.202\r\ns=FreeSWITCH\r\nc=IN IP4 192.168.56.202\r\nt=0 0\r\nm=audio 29014 RTP/AVP 9 101\r\na=rtpmap:9 G722/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=ptime:20\r\na=sendrecv\r\nm=video 0 RTP/AVP 19\r\n","sip_to_tag":"aDUZXF1Z1vD6p","sip_from_tag":"df94d020","sip_cseq":"4","sip_call_id":"985e365faa0ec79a7fa75d001ef2449f@0:0:0:0:0:0:0:0","sip_full_via":"SIP/2.0/UDP 192.168.56.1:5060;branch=z9hG4bK-323230-ab335b3491dd24f5ec251b9700716b97","sip_from_display":"1001","sip_full_from":"\"1001\" ;tag=df94d020","sip_full_to":";tag=aDUZXF1Z1vD6p","sip_term_status":"200","proto_specific_hangup_cause":"sip:200","sip_term_cause":"16","last_bridge_role":"originator","sip_user_agent":"Jitsi2.10.5550Windows 10","sip_hangup_disposition":"recv_bye","bridge_hangup_cause":"NORMAL_CLEARING","hangup_cause":"NORMAL_CLEARING","hangup_cause_q850":"16","digits_dialed":"none","start_stamp":"2018-03-14 07:09:18","profile_start_stamp":"2018-03-14 07:09:18","answer_stamp":"2018-03-14 07:09:27","bridge_stamp":"2018-03-14 07:09:27","hold_stamp":"2018-03-14 07:09:27","progress_stamp":"2018-03-14 07:09:18","progress_media_stamp":"2018-03-14 07:09:27","hold_events":"{{1521025767847893,1521025783334494}}","end_stamp":"2018-03-14 07:09:48","start_epoch":"1521025758","start_uepoch":"1521025758006702","profile_start_epoch":"1521025758","profile_start_uepoch":"1521025758026167","answer_epoch":"1521025767","answer_uepoch":"1521025767766321","bridge_epoch":"1521025767","bridge_uepoch":"1521025767766321","last_hold_epoch":"1521025767","last_hold_uepoch":"1521025767847892","hold_accum_seconds":"15","hold_accum_usec":"15486602","hold_accum_ms":"15486","resurrect_epoch":"0","resurrect_uepoch":"0","progress_epoch":"1521025758","progress_uepoch":"1521025758116123","progress_media_epoch":"1521025767","progress_media_uepoch":"1521025767766321","end_epoch":"1521025788","end_uepoch":"1521025788366141","last_app":"bridge","last_arg":"user/1002@192.168.56.202","caller_id":"\"1001\" <1001>","duration":"30","billsec":"21","progresssec":"0","answersec":"9","waitsec":"9","progress_mediasec":"9","flow_billsec":"30","mduration":"30360","billmsec":"20600","progressmsec":"110","answermsec":"9760","waitmsec":"9760","progress_mediamsec":"9760","flow_billmsec":"30360","uduration":"30359439","billusec":"20599820","progressusec":"109421","answerusec":"9759619","waitusec":"9759619","progress_mediausec":"9759619","flow_billusec":"30359439","rtp_audio_in_raw_bytes":"174156","rtp_audio_in_media_bytes":"166416","rtp_audio_in_packet_count":"1033","rtp_audio_in_media_packet_count":"988","rtp_audio_in_skip_packet_count":"7","rtp_audio_in_jitter_packet_count":"0","rtp_audio_in_dtmf_packet_count":"0","rtp_audio_in_cng_packet_count":"0","rtp_audio_in_flush_packet_count":"45","rtp_audio_in_largest_jb_size":"0","rtp_audio_in_jitter_min_variance":"0.50","rtp_audio_in_jitter_max_variance":"31.77","rtp_audio_in_jitter_loss_rate":"0.00","rtp_audio_in_jitter_burst_rate":"0.00","rtp_audio_in_mean_interval":"20.17","rtp_audio_in_flaw_total":"1","rtp_audio_in_quality_percentage":"99.00","rtp_audio_in_mos":"4.49","rtp_audio_out_raw_bytes":"43344","rtp_audio_out_media_bytes":"43344","rtp_audio_out_packet_count":"252","rtp_audio_out_media_packet_count":"252","rtp_audio_out_skip_packet_count":"0","rtp_audio_out_dtmf_packet_count":"0","rtp_audio_out_cng_packet_count":"0","rtp_audio_rtcp_packet_count":"0","rtp_audio_rtcp_octet_count":"0"},"app_log":{"applications":[{"app_name":"info","app_data":"","app_stamp":"1521025758010697"},{"app_name":"park","app_data":"","app_stamp":"1521025758011143"},{"app_name":"set","app_data":"ringback=","app_stamp":"1521025758057183"},{"app_name":"set","app_data":"call_timeout=30","app_stamp":"1521025758057474"},{"app_name":"bridge","app_data":"user/1002@192.168.56.202","app_stamp":"1521025758057698"}]},"callflow":[{"dialplan":"XML","profile_index":"2","extension":{"name":"Local_Extension","number":"1002","applications":[{"app_name":"set","app_data":"ringback=${us-ring}"},{"app_name":"set","app_data":"call_timeout=30"},{"app_name":"bridge","app_data":"user/${destination_number}@${domain_name}"}]},"caller_profile":{"username":"1001","dialplan":"XML","caller_id_name":"1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"1002","destination_number":"1002","uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1001@192.168.56.202","originatee":{"originatee_caller_profiles":[{"username":"1001","dialplan":"XML","caller_id_name":"Extension 1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"1002","destination_number":"1002","uuid":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1002@192.168.56.1:5060"},{"username":"1001","dialplan":"XML","caller_id_name":"Extension 1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"1002","destination_number":"1002","uuid":"9c1afb4f-1d4a-4e45-84a3-d25721981bf5","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1002@192.168.56.1:5060"}]}},"times":{"created_time":"1521025758006702","profile_created_time":"1521025758026167","progress_time":"1521025758116123","progress_media_time":"1521025767766321","answered_time":"1521025767766321","bridged_time":"1521025767766321","last_hold_time":"1521025767847892","hold_accum_time":"15486602","hangup_time":"1521025788366141","resurrect_time":"0","transfer_time":"0"}},{"dialplan":"XML","profile_index":"1","extension":{"name":"CGRateS_Auth","number":"1002","applications":[{"app_name":"info","app_data":""},{"app_name":"park","app_data":""}]},"caller_profile":{"username":"1001","dialplan":"XML","caller_id_name":"1001","ani":"1001","aniii":"","caller_id_number":"1001","network_addr":"192.168.56.1","rdnis":"","destination_number":"1002","uuid":"5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1001@192.168.56.202"},"times":{"created_time":"1521025758006702","profile_created_time":"1521025758006702","progress_time":"0","progress_media_time":"0","answered_time":"0","bridged_time":"0","last_hold_time":"0","hold_accum_time":"0","hangup_time":"0","resurrect_time":"0","transfer_time":"1521025758026167"}}]} `) hangUp := `Event-Name: CHANNEL_HANGUP_COMPLETE Core-UUID: 63e2315b-d538-4dfa-9ed5-af73ba6210b6 FreeSWITCH-Hostname: teo @@ -776,7 +776,7 @@ variable_effective_caller_id_name: Extension%201001 variable_effective_caller_id_number: 1001 variable_callgroup: techsupport variable_cgr_reqtype: *prepaid -variable_cgr_flags: *resources,*attributes,*sessions,*suppliers +variable_cgr_flags: *resources,*attributes,*sessions,*routes variable_user_name: 1001 variable_domain_name: 192.168.56.202 variable_sip_from_user_stripped: 1001 diff --git a/data/conf/samples/tutmysql_internal/cgrates.json b/data/conf/samples/tutmysql_internal/cgrates.json index 7550e6440..a13bf16e7 100644 --- a/data/conf/samples/tutmysql_internal/cgrates.json +++ b/data/conf/samples/tutmysql_internal/cgrates.json @@ -128,8 +128,8 @@ ], }, { - "type": "*suppliers", // data source type - "file_name": "Suppliers.csv", // file name in the tp_in_dir + "type": "*routes", // data source type + "file_name": "Routes.csv", // file name in the tp_in_dir "fields": [ {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true}, {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true}, diff --git a/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/extensions.conf b/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/extensions.conf index 6369762a0..63cf346e3 100755 --- a/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/extensions.conf +++ b/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/extensions.conf @@ -2,7 +2,7 @@ exten => _1XXX,1,NoOp() same => n,Set(CGRMaxSessionTime=0); use it to disconnect automatically the call if CGRateS is not active same => n,DumpChan() - same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_supplier=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*suppliers,*thresholds") + same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_supplier=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*routes,*thresholds") same => n,Dial(PJSIP/${EXTEN},30,L(${CGRMaxSessionTime})) same => n,Hangup() diff --git a/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json index 2eee498e2..7975e6f98 100644 --- a/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/asterisk_ari/cgrates/etc/cgrates/cgrates.json @@ -103,6 +103,7 @@ "enabled": true, "resources_conns": ["*internal"], "stats_conns": ["*internal"], + "rals_conns": ["*internal"], "string_indexed_fields": ["Account"], }, diff --git a/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json index d3b9a83ff..8389365da 100644 --- a/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/fs_evsock/cgrates/etc/cgrates/cgrates.json @@ -101,6 +101,7 @@ "enabled": true, "resources_conns": ["*internal"], "stats_conns": ["*internal"], + "rals_conns": ["*internal"], "string_indexed_fields": ["Account"], }, diff --git a/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz b/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz index 26ab81db1..839da9b38 100644 Binary files a/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz and b/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz differ diff --git a/data/tutorial_tests/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg b/data/tutorial_tests/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg index 18ba8eb13..2dbd48671 100644 --- a/data/tutorial_tests/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg +++ b/data/tutorial_tests/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg @@ -113,7 +113,7 @@ route[CGRATES_SESSIONAUTH_REQUEST] { evapi_async_relay("{\"event\":\"CGR_AUTH_REQUEST\", \"tr_index\":\"$T(id_index)\", \"tr_label\":\"$T(id_label)\", - \"cgr_flags\":\"*attributes,*accounts,*suppliers,*resources,*thresholds\", + \"cgr_flags\":\"*attributes,*accounts,*routes,*resources,*thresholds\", \"reply_route\":\"CGR_SESSIONAUTH_REPLY\", \"Account\":\"$fU\", \"Destination\":\"$rU\", diff --git a/data/tutorials/asterisk_ari/asterisk/etc/asterisk/extensions.conf b/data/tutorials/asterisk_ari/asterisk/etc/asterisk/extensions.conf index 6369762a0..63cf346e3 100755 --- a/data/tutorials/asterisk_ari/asterisk/etc/asterisk/extensions.conf +++ b/data/tutorials/asterisk_ari/asterisk/etc/asterisk/extensions.conf @@ -2,7 +2,7 @@ exten => _1XXX,1,NoOp() same => n,Set(CGRMaxSessionTime=0); use it to disconnect automatically the call if CGRateS is not active same => n,DumpChan() - same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_supplier=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*suppliers,*thresholds") + same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_supplier=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*routes,*thresholds") same => n,Dial(PJSIP/${EXTEN},30,L(${CGRMaxSessionTime})) same => n,Hangup() diff --git a/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json b/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json index 76e83173c..a1385d1c3 100644 --- a/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/asterisk_ari/cgrates/etc/cgrates/cgrates.json @@ -102,6 +102,7 @@ "enabled": true, "resources_conns": ["*internal"], "stats_conns": ["*internal"], + "rals_conns": ["*internal"], "string_indexed_fields": ["Account"], }, diff --git a/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json b/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json index d3b9a83ff..8389365da 100644 --- a/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/fs_evsock/cgrates/etc/cgrates/cgrates.json @@ -101,6 +101,7 @@ "enabled": true, "resources_conns": ["*internal"], "stats_conns": ["*internal"], + "rals_conns": ["*internal"], "string_indexed_fields": ["Account"], }, diff --git a/data/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz b/data/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz index 74b96049a..a92990d3c 100644 Binary files a/data/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz and b/data/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz differ diff --git a/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg b/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg index 18ba8eb13..2dbd48671 100644 --- a/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg +++ b/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio-cgrates.cfg @@ -113,7 +113,7 @@ route[CGRATES_SESSIONAUTH_REQUEST] { evapi_async_relay("{\"event\":\"CGR_AUTH_REQUEST\", \"tr_index\":\"$T(id_index)\", \"tr_label\":\"$T(id_label)\", - \"cgr_flags\":\"*attributes,*accounts,*suppliers,*resources,*thresholds\", + \"cgr_flags\":\"*attributes,*accounts,*routes,*resources,*thresholds\", \"reply_route\":\"CGR_SESSIONAUTH_REPLY\", \"Account\":\"$fU\", \"Destination\":\"$rU\", diff --git a/docs/diamagent.rst b/docs/diamagent.rst index 471f5386e..53493bc58 100644 --- a/docs/diamagent.rst +++ b/docs/diamagent.rst @@ -364,7 +364,7 @@ flags **\*auth** Sends the request for authorization on CGRateS. - Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*suppliers**, **\*suppliers_ignore_errors**, **\*suppliers_event_cost** which are used to influence the auth behavior on CGRateS side. More info on that can be found on the **SessionS** component's API behavior. + Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*routes**, **\*routes_ignore_errors**, **\*routes_event_cost** which are used to influence the auth behavior on CGRateS side. More info on that can be found on the **SessionS** component's API behavior. **\*initiate** Initiates a session out of request on CGRateS side. @@ -384,7 +384,7 @@ flags **\*message** Process the request as individual message charging on CGRateS side. - Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*suppliers**, **\*suppliers_ignore_errors**, **\*suppliers_event_cost** which are used to influence the behavior on CGRateS side. + Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*routes**, **\*routes_ignore_errors**, **\*routes_event_cost** which are used to influence the behavior on CGRateS side. **\*event** diff --git a/docs/ers.rst b/docs/ers.rst index 0728ba1fd..cdef64da1 100644 --- a/docs/ers.rst +++ b/docs/ers.rst @@ -214,7 +214,7 @@ flags **\*auth** Sends the Event for authorization on CGRateS. - Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*suppliers**, **\*suppliers_ignore_errors**, **\*suppliers_event_cost** which are used to influence the auth behavior on CGRateS side. More info on that can be found on the **SessionS** component's API behavior. + Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*routes**, **\*routes_ignore_errors**, **\*routes_event_cost** which are used to influence the auth behavior on CGRateS side. More info on that can be found on the **SessionS** component's API behavior. **\*initiate** Initiates a session out of Event on CGRateS side. @@ -234,7 +234,7 @@ flags **\*message** Process the Event as individual message charging on CGRateS side. - Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*suppliers**, **\*suppliers_ignore_errors**, **\*suppliers_event_cost** which are used to influence the behavior on CGRateS side. + Auxiliary flags available: **\*attributes**, **\*thresholds**, **\*stats**, **\*resources**, **\*accounts**, **\*routes**, **\*routes_ignore_errors**, **\*routes_event_cost** which are used to influence the behavior on CGRateS side. **\*event** Process the Event as generic event on CGRateS side. diff --git a/docs/sessions.rst b/docs/sessions.rst index e764f3b8c..f9479c00e 100644 --- a/docs/sessions.rst +++ b/docs/sessions.rst @@ -341,14 +341,14 @@ Instead of arguments, the options for enabling various functionaity will come in **\*terminate** Terminate a session (or initialize + terminate) out of event. -\*suppliers +\*routes Process the event with :ref:`Suppliers`. Auxiliary flags available: **\*ignore_errors** - Ignore the suppliers with errors instead of failing the request completely. + Ignore the routes with errors instead of failing the request completely. **\*event_cost** - Ignore suppliers with cost higher than the event cost. + Ignore routes with cost higher than the event cost. \*thresholds Process the event with :ref:`ThresholdS` for monitoring. diff --git a/docs/suppliers.rst b/docs/suppliers.rst index e62c78af1..4d4663653 100644 --- a/docs/suppliers.rst +++ b/docs/suppliers.rst @@ -52,7 +52,7 @@ SupplierS **SupplierS** is the **CGRateS** component responsible for handling the *SupplierProfiles*. -It is configured within **suppliers** section from :ref:`JSON configuration ` via the following parameters: +It is configured within **routes** section from :ref:`JSON configuration ` via the following parameters: enabled Will enable starting of the service. Possible values: . diff --git a/general_tests/tutorial_calls_test.go b/general_tests/tutorial_calls_test.go index f5577a8b9..18c513ca9 100755 --- a/general_tests/tutorial_calls_test.go +++ b/general_tests/tutorial_calls_test.go @@ -610,7 +610,7 @@ func testCallStatMetrics(t *testing.T) { if err := tutorialCallsRpc.Call(utils.StatSv1GetQueueStringMetrics, &utils.TenantID{Tenant: "cgrates.org", ID: "Stats2"}, &metrics); err != nil { - t.Error(err) + t.Fatal(err) } if optConf == utils.Asterisk { metrics[utils.MetaTCD] = strings.Split(metrics[utils.MetaTCD], ".")[0] + "s" diff --git a/utils/cgrevent_test.go b/utils/cgrevent_test.go index 71c65840b..61d5149e1 100644 --- a/utils/cgrevent_test.go +++ b/utils/cgrevent_test.go @@ -361,16 +361,16 @@ func TestCGREventconsumeRoutePaginator(t *testing.T) { if err != nil { t.Error(err) } - //check if *suppliers_limit and *suppliers_offset was deleted + //check if *routes_limit and *routes_offset was deleted if _, has := opts[RoutesLimit]; has { - t.Errorf("*suppliers_limit wasn't deleted") + t.Errorf("*routes_limit wasn't deleted") } else if _, has := opts[RoutesOffset]; has { - t.Errorf("*suppliers_offset wasn't deleted") + t.Errorf("*routes_offset wasn't deleted") } if !reflect.DeepEqual(eOut, rcv) { t.Errorf("Expecting: %+v, received: %+v", eOut, rcv) } - //check without *suppliers_limit, but with *suppliers_offset + //check without *routes_limit, but with *routes_offset opts = map[string]interface{}{ RoutesOffset: 20, } @@ -382,16 +382,16 @@ func TestCGREventconsumeRoutePaginator(t *testing.T) { if err != nil { t.Error(err) } - //check if *suppliers_limit and *suppliers_offset was deleted + //check if *routes_limit and *routes_offset was deleted if _, has := opts[RoutesLimit]; has { - t.Errorf("*suppliers_limit wasn't deleted") + t.Errorf("*routes_limit wasn't deleted") } else if _, has := opts[RoutesOffset]; has { - t.Errorf("*suppliers_offset wasn't deleted") + t.Errorf("*routes_offset wasn't deleted") } if !reflect.DeepEqual(eOut, rcv) { t.Errorf("Expecting: %+v, received: %+v", eOut, rcv) } - //check with notAnInt at *suppliers_limit + //check with notAnInt at *routes_limit opts = map[string]interface{}{ RoutesLimit: "Not an int", } @@ -403,7 +403,7 @@ func TestCGREventconsumeRoutePaginator(t *testing.T) { if !reflect.DeepEqual(eOut, rcv) { t.Errorf("Expecting: %+v, received: %+v", eOut, rcv) } - //check with notAnInt at and *suppliers_offset + //check with notAnInt at and *routes_offset opts = map[string]interface{}{ RoutesOffset: "Not an int", }