diff --git a/agents/fsevent_test.go b/agents/fsevent_test.go index 2874a8b39..d42e4d6e3 100644 --- a/agents/fsevent_test.go +++ b/agents/fsevent_test.go @@ -643,34 +643,33 @@ 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":"61b38010-fb8e-4022-89b0-3c0be6e500b9","switchname":"teo","channel_data":{"state":"CS_REPORTING","direction":"inbound","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;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":505772,"media_bytes":501988,"packet_count":2961,"media_packet_count":2939,"skip_packet_count":8,"jitter_packet_count":0,"dtmf_packet_count":0,"cng_packet_count":0,"flush_packet_count":22,"largest_jb_size":0,"jitter_min_variance":18,"jitter_max_variance":338,"jitter_loss_rate":90.827031,"jitter_burst_rate":89.827031,"mean_interval":20.016053,"flaw_total":1,"quality_percentage":99,"mos":4.492027,"errorLog":[{"start":1520944107460545,"stop":1520944114478926,"flaws":242610,"consecutiveFlaws":0,"durationMS":7018}]},"outbound":{"raw_bytes":488136,"media_bytes":488136,"packet_count":2838,"media_packet_count":2838,"skip_packet_count":0,"dtmf_packet_count":0,"cng_packet_count":0,"rtcp_packet_count":0,"rtcp_octet_count":0}}},"variables":{"direction":"inbound","uuid":"5282f87c-368c-43a2-babd-bc63ff12dc79","session_id":"5","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":"1520944103557418","sip_received_ip":"192.168.56.1","sip_received_port":"5060","sip_via_protocol":"udp","sip_authorized":"true","Event-Name":"REQUEST_PARAMS","Core-UUID":"61b38010-fb8e-4022-89b0-3c0be6e500b9","FreeSWITCH-Hostname":"teo","FreeSWITCH-Switchname":"teo","FreeSWITCH-IPv4":"10.0.2.15","FreeSWITCH-IPv6":"::1","Event-Date-Local":"2018-03-13 08:28:23","Event-Date-GMT":"Tue, 13 Mar 2018 12:28:23 GMT","Event-Date-Timestamp":"1520944103557418","Event-Calling-File":"sofia.c","Event-Calling-Function":"sofia_handle_sip_i_invite","Event-Calling-Line-Number":"10096","Event-Sequence":"742","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_subsystems":"*resources;*attributes;*sessions;*suppliers;*thresholds;*stats;*accounts","cgr_acd":"30","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_user_agent":"Jitsi2.10.5550Windows 10","sip_via_host":"192.168.56.1","sip_via_port":"5060","presence_id":"1001@192.168.56.202","execute_on_answer":"sched_hangup +3048 alloted_timeout","cgr_resource_allocation":"ResGroup1","cgr_suppliers":"ARRAY::3|:supplier3|:supplier1|:supplier2","cgr_notify":"AUTH_OK","max_forwards":"69","transfer_history":"1520944103:ec99d6a9-72b7-4184-88aa-87b240f5465c:bl_xfer:1002/default/XML","transfer_source":"1520944103:ec99d6a9-72b7-4184-88aa-87b240f5465c:bl_xfer:1002/default/XML","DP_MATCH":"ARRAY::1002|:1002","call_uuid":"5282f87c-368c-43a2-babd-bc63ff12dc79","call_timeout":"30","dialed_user":"1002","dialed_domain":"192.168.56.202","originated_legs":"ARRAY::fa3173aa-3c1a-41e5-ab82-60623396fa08;Outbound Call;1002|:fa3173aa-3c1a-41e5-ab82-60623396fa08;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 5106 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":"22992","advertised_media_ip":"192.168.56.202","rtp_use_timer_name":"soft","rtp_use_pt":"9","rtp_use_ssrc":"850142423","endpoint_disposition":"ANSWER","current_application_data":"+3048 alloted_timeout","current_application":"sched_hangup","originate_causes":"ARRAY::fa3173aa-3c1a-41e5-ab82-60623396fa08;NONE|:fa3173aa-3c1a-41e5-ab82-60623396fa08;NONE","originate_disposition":"SUCCESS","DIALSTATUS":"SUCCESS","last_bridge_to":"fa3173aa-3c1a-41e5-ab82-60623396fa08","bridge_channel":"sofia/internal/1002@192.168.56.1:5060","bridge_uuid":"fa3173aa-3c1a-41e5-ab82-60623396fa08","signal_bond":"fa3173aa-3c1a-41e5-ab82-60623396fa08","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 5102 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 dba9c36338c885a1bd67b120bf2f1aaff977a5f496ce54803911e465daa33eb2\r\nm=video 5108 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 dba9c36338c885a1bd67b120bf2f1aaff977a5f496ce54803911e465daa33eb2","audio_media_flow":"sendrecv","remote_media_ip":"192.168.56.1","remote_media_port":"5102","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 1520921113 1520921116 IN IP4 192.168.56.202\r\ns=FreeSWITCH\r\nc=IN IP4 192.168.56.202\r\nt=0 0\r\nm=audio 22992 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":"KjBaScg1vBF8r","sip_from_tag":"a27a6086","sip_cseq":"4","sip_call_id":"b1acaf2198f12cc429ab8a615cac083d@0:0:0:0:0:0:0:0","sip_full_via":"SIP/2.0/UDP 192.168.56.1:5060;branch=z9hG4bK-333939-4e9c820926945f1a2c6d0bf5ac2da12e","sip_from_display":"1001","sip_full_from":"\"1001\" ;tag=a27a6086","sip_full_to":";tag=KjBaScg1vBF8r","sip_hangup_phrase":"OK","last_bridge_hangup_cause":"NORMAL_CLEARING","last_bridge_proto_specific_hangup_cause":"sip:200","bridge_hangup_cause":"NORMAL_CLEARING","hangup_cause":"NORMAL_CLEARING","hangup_cause_q850":"16","digits_dialed":"none","start_stamp":"2018-03-13 08:28:23","profile_start_stamp":"2018-03-13 08:28:23","answer_stamp":"2018-03-13 08:28:25","bridge_stamp":"2018-03-13 08:28:25","hold_stamp":"2018-03-13 08:28:25","progress_stamp":"2018-03-13 08:28:23","progress_media_stamp":"2018-03-13 08:28:25","hold_events":"{{1520944105098164,1520944107306456}}","end_stamp":"2018-03-13 08:29:24","start_epoch":"1520944103","start_uepoch":"1520944103557418","profile_start_epoch":"1520944103","profile_start_uepoch":"1520944103617274","answer_epoch":"1520944105","answer_uepoch":"1520944105037574","bridge_epoch":"1520944105","bridge_uepoch":"1520944105037574","last_hold_epoch":"1520944105","last_hold_uepoch":"1520944105098164","hold_accum_seconds":"2","hold_accum_usec":"2208292","hold_accum_ms":"2208","resurrect_epoch":"0","resurrect_uepoch":"0","progress_epoch":"1520944103","progress_uepoch":"1520944103637959","progress_media_epoch":"1520944105","progress_media_uepoch":"1520944105037574","end_epoch":"1520944164","end_uepoch":"1520944164057232","last_app":"sched_hangup","last_arg":"+3048 alloted_timeout","caller_id":"\"1001\" <1001>","duration":"61","billsec":"59","progresssec":"0","answersec":"2","waitsec":"2","progress_mediasec":"2","flow_billsec":"61","mduration":"60500","billmsec":"59020","progressmsec":"80","answermsec":"1480","waitmsec":"1480","progress_mediamsec":"1480","flow_billmsec":"60500","uduration":"60499814","billusec":"59019658","progressusec":"80541","answerusec":"1480156","waitusec":"1480156","progress_mediausec":"1480156","flow_billusec":"60499814","sip_hangup_disposition":"send_bye","rtp_audio_in_raw_bytes":"505772","rtp_audio_in_media_bytes":"501988","rtp_audio_in_packet_count":"2961","rtp_audio_in_media_packet_count":"2939","rtp_audio_in_skip_packet_count":"8","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":"22","rtp_audio_in_largest_jb_size":"0","rtp_audio_in_jitter_min_variance":"18.00","rtp_audio_in_jitter_max_variance":"338.00","rtp_audio_in_jitter_loss_rate":"90.83","rtp_audio_in_jitter_burst_rate":"89.83","rtp_audio_in_mean_interval":"20.02","rtp_audio_in_flaw_total":"1","rtp_audio_in_quality_percentage":"99.00","rtp_audio_in_mos":"4.49","rtp_audio_out_raw_bytes":"488136","rtp_audio_out_media_bytes":"488136","rtp_audio_out_packet_count":"2838","rtp_audio_out_media_packet_count":"2838","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":"1520944103580845"},{"app_name":"park","app_data":"","app_stamp":"1520944103581317"},{"app_name":"set","app_data":"ringback=","app_stamp":"1520944103622870"},{"app_name":"set","app_data":"call_timeout=30","app_stamp":"1520944103623092"},{"app_name":"bridge","app_data":"user/1002@192.168.56.202","app_stamp":"1520944103623254"},{"app_name":"sched_hangup","app_data":"+3048 alloted_timeout","app_stamp":"1520944105040579"}]},"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":"5282f87c-368c-43a2-babd-bc63ff12dc79","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":"fa3173aa-3c1a-41e5-ab82-60623396fa08","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":"fa3173aa-3c1a-41e5-ab82-60623396fa08","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1002@192.168.56.1:5060"}]}},"times":{"created_time":"1520944103557418","profile_created_time":"1520944103617274","progress_time":"1520944103637959","progress_media_time":"1520944105037574","answered_time":"1520944105037574","bridged_time":"1520944105037574","last_hold_time":"1520944105098164","hold_accum_time":"2208292","hangup_time":"1520944164057232","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":"5282f87c-368c-43a2-babd-bc63ff12dc79","source":"mod_sofia","context":"default","chan_name":"sofia/internal/1001@192.168.56.202"},"times":{"created_time":"1520944103557418","profile_created_time":"1520944103557418","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":"1520944103617274"}}]} - `) +{"core-uuid":"63e2315b-d538-4dfa-9ed5-af73ba6210b6","switchname":"teo","channel_data":{"state":"CS_REPORTING","direction":"inbound","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":{"direction":"inbound","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_subsystems":"*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"}}]} `) hangUp := `Event-Name: CHANNEL_HANGUP_COMPLETE -Core-UUID: 61b38010-fb8e-4022-89b0-3c0be6e500b9 +Core-UUID: 63e2315b-d538-4dfa-9ed5-af73ba6210b6 FreeSWITCH-Hostname: teo FreeSWITCH-Switchname: teo FreeSWITCH-IPv4: 10.0.2.15 FreeSWITCH-IPv6: %3A%3A1 -Event-Date-Local: 2018-03-13%2011%3A17%3A44 -Event-Date-GMT: Tue,%2013%20Mar%202018%2015%3A17%3A44%20GMT -Event-Date-Timestamp: 1520954264757374 +Event-Date-Local: 2018-03-14%2007%3A09%3A48 +Event-Date-GMT: Wed,%2014%20Mar%202018%2011%3A09%3A48%20GMT +Event-Date-Timestamp: 1521025788386120 Event-Calling-File: switch_core_state_machine.c Event-Calling-Function: switch_core_session_reporting_state Event-Calling-Line-Number: 949 -Event-Sequence: 2920 -Hangup-Cause: MANAGER_REQUEST +Event-Sequence: 1113 +Hangup-Cause: NORMAL_CLEARING Channel-State: CS_REPORTING Channel-Call-State: HANGUP Channel-State-Number: 11 Channel-Name: sofia/internal/1001%40192.168.56.202 -Unique-ID: a511b320-18a2-425f-b574-81a088fcd70a +Unique-ID: 5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4 Call-Direction: inbound Presence-Call-Direction: inbound Channel-HIT-Dialplan: true Channel-Presence-ID: 1001%40192.168.56.202 -Channel-Call-UUID: a511b320-18a2-425f-b574-81a088fcd70a +Channel-Call-UUID: 5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4 Answer-State: hangup -Hangup-Cause: MANAGER_REQUEST +Hangup-Cause: NORMAL_CLEARING Channel-Read-Codec-Name: G722 Channel-Read-Codec-Rate: 16000 Channel-Read-Codec-Bit-Rate: 64000 @@ -690,24 +689,24 @@ Caller-Callee-ID-Number: 1002 Caller-Network-Addr: 192.168.56.1 Caller-ANI: 1001 Caller-Destination-Number: 1002 -Caller-Unique-ID: a511b320-18a2-425f-b574-81a088fcd70a +Caller-Unique-ID: 5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4 Caller-Source: mod_sofia -Caller-Transfer-Source: 1520954259%3Af6338829-f2e3-4874-8841-6baf5c7962b2%3Abl_xfer%3A1002/default/XML +Caller-Transfer-Source: 1521025758%3A86c9ebb2-888f-42d5-9afa-2101449a4b86%3Abl_xfer%3A1002/default/XML Caller-Context: default Caller-RDNIS: 1002 Caller-Channel-Name: sofia/internal/1001%40192.168.56.202 Caller-Profile-Index: 2 -Caller-Profile-Created-Time: 1520954259237372 -Caller-Channel-Created-Time: 1520954259207931 -Caller-Channel-Answered-Time: 1520954264358500 -Caller-Channel-Progress-Time: 1520954259257731 -Caller-Channel-Progress-Media-Time: 1520954264358500 -Caller-Channel-Hangup-Time: 1520954264737400 +Caller-Profile-Created-Time: 1521025758026167 +Caller-Channel-Created-Time: 1521025758006702 +Caller-Channel-Answered-Time: 1521025767766321 +Caller-Channel-Progress-Time: 1521025758116123 +Caller-Channel-Progress-Media-Time: 1521025767766321 +Caller-Channel-Hangup-Time: 1521025788366141 Caller-Channel-Transfer-Time: 0 Caller-Channel-Resurrect-Time: 0 -Caller-Channel-Bridged-Time: 1520954264358500 -Caller-Channel-Last-Hold: 0 -Caller-Channel-Hold-Accum: 0 +Caller-Channel-Bridged-Time: 1521025767766321 +Caller-Channel-Last-Hold: 1521025767847892 +Caller-Channel-Hold-Accum: 15486602 Caller-Screen-Bit: true Caller-Privacy-Hide-Name: false Caller-Privacy-Hide-Number: false @@ -725,15 +724,15 @@ Other-Leg-Callee-ID-Number: 1002 Other-Leg-Network-Addr: 192.168.56.1 Other-Leg-ANI: 1001 Other-Leg-Destination-Number: 1002 -Other-Leg-Unique-ID: b64a5ab7-3572-4c82-88ea-1c39f8157023 +Other-Leg-Unique-ID: 9c1afb4f-1d4a-4e45-84a3-d25721981bf5 Other-Leg-Source: mod_sofia Other-Leg-Context: default Other-Leg-RDNIS: 1002 Other-Leg-Channel-Name: sofia/internal/1002%40192.168.56.1%3A5060 -Other-Leg-Profile-Created-Time: 1520954259237372 -Other-Leg-Channel-Created-Time: 1520954259237372 -Other-Leg-Channel-Answered-Time: 1520954264345966 -Other-Leg-Channel-Progress-Time: 1520954259257731 +Other-Leg-Profile-Created-Time: 1521025758047206 +Other-Leg-Channel-Created-Time: 1521025758047206 +Other-Leg-Channel-Answered-Time: 1521025767745928 +Other-Leg-Channel-Progress-Time: 1521025758116123 Other-Leg-Channel-Progress-Media-Time: 0 Other-Leg-Channel-Hangup-Time: 0 Other-Leg-Channel-Transfer-Time: 0 @@ -745,8 +744,8 @@ Other-Leg-Screen-Bit: true Other-Leg-Privacy-Hide-Name: false Other-Leg-Privacy-Hide-Number: false variable_direction: inbound -variable_uuid: a511b320-18a2-425f-b574-81a088fcd70a -variable_session_id: 9 +variable_uuid: 5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4 +variable_session_id: 1 variable_sip_from_user: 1001 variable_sip_from_uri: 1001%40192.168.56.202 variable_sip_from_host: 192.168.56.202 @@ -755,24 +754,24 @@ variable_ep_codec_string: mod_spandsp.G722%408000h%4020i%4064000b,CORE_PCM_MODUL variable_sip_local_network_addr: 192.168.56.202 variable_sip_network_ip: 192.168.56.1 variable_sip_network_port: 5060 -variable_sip_invite_stamp: 1520954259207931 +variable_sip_invite_stamp: 1521025758006702 variable_sip_received_ip: 192.168.56.1 variable_sip_received_port: 5060 variable_sip_via_protocol: udp variable_sip_authorized: true variable_Event-Name: REQUEST_PARAMS -variable_Core-UUID: 61b38010-fb8e-4022-89b0-3c0be6e500b9 +variable_Core-UUID: 63e2315b-d538-4dfa-9ed5-af73ba6210b6 variable_FreeSWITCH-Hostname: teo variable_FreeSWITCH-Switchname: teo variable_FreeSWITCH-IPv4: 10.0.2.15 variable_FreeSWITCH-IPv6: %3A%3A1 -variable_Event-Date-Local: 2018-03-13%2011%3A17%3A39 -variable_Event-Date-GMT: Tue,%2013%20Mar%202018%2015%3A17%3A39%20GMT -variable_Event-Date-Timestamp: 1520954259207931 +variable_Event-Date-Local: 2018-03-14%2007%3A09%3A18 +variable_Event-Date-GMT: Wed,%2014%20Mar%202018%2011%3A09%3A18%20GMT +variable_Event-Date-Timestamp: 1521025758006702 variable_Event-Calling-File: sofia.c variable_Event-Calling-Function: sofia_handle_sip_i_invite variable_Event-Calling-Line-Number: 10096 -variable_Event-Sequence: 2835 +variable_Event-Sequence: 1025 variable_sip_number_alias: 1001 variable_sip_auth_username: 1001 variable_sip_auth_realm: 192.168.56.202 @@ -788,8 +787,7 @@ variable_effective_caller_id_name: Extension%201001 variable_effective_caller_id_number: 1001 variable_callgroup: techsupport variable_cgr_reqtype: *prepaid -variable_cgr_subsystems: *resources%3B*attributes%3B*sessions%3B*suppliers%3B*thresholds%3B*stats%3B*accounts -variable_cgr_acd: 30 +variable_cgr_subsystems: *resources%3B*attributes%3B*sessions%3B*suppliers variable_user_name: 1001 variable_domain_name: 192.168.56.202 variable_sip_from_user_stripped: 1001 @@ -806,23 +804,24 @@ variable_sip_contact_user: 1001 variable_sip_contact_port: 5060 variable_sip_contact_uri: 1001%40192.168.56.1%3A5060 variable_sip_contact_host: 192.168.56.1 -variable_sip_user_agent: Jitsi2.10.5550Windows%2010 variable_sip_via_host: 192.168.56.1 variable_sip_via_port: 5060 variable_presence_id: 1001%40192.168.56.202 -variable_switch_r_sdp: v%3D0%0D%0Ao%3D1001-jitsi.org%200%200%20IN%20IP4%20192.168.56.1%0D%0As%3D-%0D%0Ac%3DIN%20IP4%20192.168.56.1%0D%0At%3D0%200%0D%0Am%3Daudio%205116%20RTP/AVP%2096%2097%2098%209%20100%20102%200%208%20103%203%20104%204%20101%0D%0Aa%3Drtpmap%3A96%20opus/48000/2%0D%0Aa%3Dfmtp%3A96%20usedtx%3D1%0D%0Aa%3Drtpmap%3A97%20SILK/24000%0D%0Aa%3Drtpmap%3A98%20SILK/16000%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A100%20speex/32000%0D%0Aa%3Drtpmap%3A102%20speex/16000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A103%20iLBC/8000%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A104%20speex/8000%0D%0Aa%3Drtpmap%3A4%20G723/8000%0D%0Aa%3Dfmtp%3A4%20annexa%3Dno%3Bbitrate%3D6.3%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dptime%3A20%0D%0Aa%3Dextmap%3A1%20urn%3Aietf%3Aparams%3Artp-hdrext%3Acsrc-audio-level%0D%0Aa%3Dextmap%3A2%20urn%3Aietf%3Aparams%3Artp-hdrext%3Assrc-audio-level%0D%0Aa%3Drtcp-xr%3Avoip-metrics%0D%0Am%3Dvideo%205118%20RTP/AVP%20105%2099%0D%0Aa%3Drtpmap%3A105%20H264/90000%0D%0Aa%3Dfmtp%3A105%20profile-level-id%3D4DE01f%3Bpacketization-mode%3D1%0D%0Aa%3Drtpmap%3A99%20H264/90000%0D%0Aa%3Dfmtp%3A99%20profile-level-id%3D4DE01f%0D%0Aa%3Drecvonly%0D%0Aa%3Dimageattr%3A105%20send%20*%20recv%20%5Bx%3D%5B1%3A1920%5D,y%3D%5B1%3A1080%5D%5D%0D%0Aa%3Dimageattr%3A99%20send%20*%20recv%20%5Bx%3D%5B1%3A1920%5D,y%3D%5B1%3A1080%5D%5D%0D%0A +variable_cgr_resource_allocation: ResGroup1 +variable_cgr_suppliers: ARRAY%3A%3A3%7C%3Asupplier2%7C%3Asupplier3%7C%3Asupplier1 +variable_cgr_notify: AUTH_OK variable_max_forwards: 69 -variable_transfer_history: 1520954259%3Af6338829-f2e3-4874-8841-6baf5c7962b2%3Abl_xfer%3A1002/default/XML -variable_transfer_source: 1520954259%3Af6338829-f2e3-4874-8841-6baf5c7962b2%3Abl_xfer%3A1002/default/XML +variable_transfer_history: 1521025758%3A86c9ebb2-888f-42d5-9afa-2101449a4b86%3Abl_xfer%3A1002/default/XML +variable_transfer_source: 1521025758%3A86c9ebb2-888f-42d5-9afa-2101449a4b86%3Abl_xfer%3A1002/default/XML variable_DP_MATCH: ARRAY%3A%3A1002%7C%3A1002 -variable_call_uuid: a511b320-18a2-425f-b574-81a088fcd70a +variable_call_uuid: 5a3a1d91-90d3-4db4-af5c-cc3ae15d93a4 variable_call_timeout: 30 +variable_current_application_data: user/1002%40192.168.56.202 +variable_current_application: bridge variable_dialed_user: 1002 variable_dialed_domain: 192.168.56.202 -variable_originated_legs: ARRAY%3A%3Ab64a5ab7-3572-4c82-88ea-1c39f8157023%3BOutbound%20Call%3B1002%7C%3Ab64a5ab7-3572-4c82-88ea-1c39f8157023%3BOutbound%20Call%3B1002 -variable_rtp_use_codec_string: G722,PCMU,PCMA,GSM -variable_audio_media_flow: sendrecv -variable_rtp_audio_recv_pt: 9 +variable_originated_legs: ARRAY%3A%3A9c1afb4f-1d4a-4e45-84a3-d25721981bf5%3BOutbound%20Call%3B1002%7C%3A9c1afb4f-1d4a-4e45-84a3-d25721981bf5%3BOutbound%20Call%3B1002 +variable_switch_m_sdp: v%3D0%0D%0Ao%3D1002-jitsi.org%200%200%20IN%20IP4%20192.168.56.1%0D%0As%3D-%0D%0Ac%3DIN%20IP4%20192.168.56.1%0D%0At%3D0%200%0D%0Am%3Daudio%205004%20RTP/AVP%209%200%208%203%20101%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0A variable_rtp_use_codec_name: G722 variable_rtp_use_codec_rate: 8000 variable_rtp_use_codec_ptime: 20 @@ -834,141 +833,143 @@ variable_read_rate: 16000 variable_original_read_rate: 16000 variable_write_codec: G722 variable_write_rate: 16000 -variable_dtmf_type: rfc2833 -variable_video_possible: true -variable_video_media_flow: sendonly variable_local_media_ip: 192.168.56.202 -variable_local_media_port: 17842 +variable_local_media_port: 29014 variable_advertised_media_ip: 192.168.56.202 variable_rtp_use_timer_name: soft variable_rtp_use_pt: 9 -variable_rtp_use_ssrc: 850152579 -variable_rtp_2833_send_payload: 101 -variable_rtp_2833_recv_payload: 101 -variable_remote_media_ip: 192.168.56.1 -variable_remote_media_port: 5116 -variable_rtp_local_sdp_str: v%3D0%0D%0Ao%3DFreeSWITCH%201520936422%201520936423%20IN%20IP4%20192.168.56.202%0D%0As%3DFreeSWITCH%0D%0Ac%3DIN%20IP4%20192.168.56.202%0D%0At%3D0%200%0D%0Am%3Daudio%2017842%20RTP/AVP%209%20101%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-16%0D%0Aa%3Dptime%3A20%0D%0Aa%3Dsendrecv%0D%0Am%3Dvideo%200%20RTP/AVP%2019%0D%0A +variable_rtp_use_ssrc: 2729250253 variable_endpoint_disposition: ANSWER -variable_originate_causes: ARRAY%3A%3Ab64a5ab7-3572-4c82-88ea-1c39f8157023%3BNONE%7C%3Ab64a5ab7-3572-4c82-88ea-1c39f8157023%3BNONE +variable_originate_causes: ARRAY%3A%3A9c1afb4f-1d4a-4e45-84a3-d25721981bf5%3BNONE%7C%3A9c1afb4f-1d4a-4e45-84a3-d25721981bf5%3BNONE variable_originate_disposition: SUCCESS variable_DIALSTATUS: SUCCESS -variable_last_bridge_to: b64a5ab7-3572-4c82-88ea-1c39f8157023 +variable_last_bridge_to: 9c1afb4f-1d4a-4e45-84a3-d25721981bf5 variable_bridge_channel: sofia/internal/1002%40192.168.56.1%3A5060 -variable_bridge_uuid: b64a5ab7-3572-4c82-88ea-1c39f8157023 -variable_signal_bond: b64a5ab7-3572-4c82-88ea-1c39f8157023 -variable_sip_to_tag: K61NU1g84rUQB -variable_sip_from_tag: e806c8da -variable_sip_cseq: 2 -variable_sip_call_id: 6cd120fa2b430439e6bceb81be52f3ef%400%3A0%3A0%3A0%3A0%3A0%3A0%3A0 -variable_sip_full_via: SIP/2.0/UDP%20192.168.56.1%3A5060%3Bbranch%3Dz9hG4bK-333939-6be85d43d3e8db68310b028366c28d4a -variable_sip_from_display: 1001 -variable_sip_full_from: %221001%22%20%3Csip%3A1001%40192.168.56.202%3E%3Btag%3De806c8da -variable_sip_full_to: %3Csip%3A1002%40192.168.56.202%3E%3Btag%3DK61NU1g84rUQB -variable_cgr_notify: SERVER_ERROR +variable_bridge_uuid: 9c1afb4f-1d4a-4e45-84a3-d25721981bf5 +variable_signal_bond: 9c1afb4f-1d4a-4e45-84a3-d25721981bf5 variable_last_sent_callee_id_name: Outbound%20Call variable_last_sent_callee_id_number: 1002 -variable_switch_m_sdp: v%3D0%0D%0Ao%3D1002-jitsi.org%200%201%20IN%20IP4%20192.168.56.1%0D%0As%3D-%0D%0Ac%3DIN%20IP4%20192.168.56.1%0D%0At%3D0%200%0D%0Am%3Daudio%205120%20RTP/AVP%2096%2097%2098%209%20100%20102%200%208%20103%203%20104%204%20101%0D%0Aa%3Drtpmap%3A96%20opus/48000/2%0D%0Aa%3Dfmtp%3A96%20usedtx%3D1%0D%0Aa%3Drtpmap%3A97%20SILK/24000%0D%0Aa%3Drtpmap%3A98%20SILK/16000%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A100%20speex/32000%0D%0Aa%3Drtpmap%3A102%20speex/16000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A103%20iLBC/8000%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A104%20speex/8000%0D%0Aa%3Drtpmap%3A4%20G723/8000%0D%0Aa%3Dfmtp%3A4%20annexa%3Dno%3Bbitrate%3D6.3%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dsendonly%0D%0Aa%3Dptime%3A20%0D%0Aa%3Dextmap%3A1%20urn%3Aietf%3Aparams%3Artp-hdrext%3Acsrc-audio-level%0D%0Aa%3Dextmap%3A2%20urn%3Aietf%3Aparams%3Artp-hdrext%3Assrc-audio-level%0D%0Aa%3Drtcp-xr%3Avoip-metrics%0D%0Aa%3Dzrtp-hash%3A1.10%200128e1ef0c736175faa6fd8e329b6b04e1ba19c0de8701869b24cc29ee22533a%0D%0A -variable_l_sdp_audio_zrtp_hash: 1.10%200128e1ef0c736175faa6fd8e329b6b04e1ba19c0de8701869b24cc29ee22533a -variable_current_application_data: local_stream%3A//moh -variable_current_application: playback -variable_current_application_response: FILE%20NOT%20FOUND +variable_switch_r_sdp: v%3D0%0D%0Ao%3D1001-jitsi.org%200%202%20IN%20IP4%20192.168.56.1%0D%0As%3D-%0D%0Ac%3DIN%20IP4%20192.168.56.1%0D%0At%3D0%200%0D%0Am%3Daudio%205000%20RTP/AVP%2096%2097%2098%209%20100%20102%200%208%20103%203%20104%204%20101%0D%0Aa%3Drtpmap%3A96%20opus/48000/2%0D%0Aa%3Dfmtp%3A96%20usedtx%3D1%0D%0Aa%3Drtpmap%3A97%20SILK/24000%0D%0Aa%3Drtpmap%3A98%20SILK/16000%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A100%20speex/32000%0D%0Aa%3Drtpmap%3A102%20speex/16000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A103%20iLBC/8000%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A104%20speex/8000%0D%0Aa%3Drtpmap%3A4%20G723/8000%0D%0Aa%3Dfmtp%3A4%20annexa%3Dno%3Bbitrate%3D6.3%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dptime%3A20%0D%0Aa%3Dextmap%3A1%20urn%3Aietf%3Aparams%3Artp-hdrext%3Acsrc-audio-level%0D%0Aa%3Dextmap%3A2%20urn%3Aietf%3Aparams%3Artp-hdrext%3Assrc-audio-level%0D%0Aa%3Drtcp-xr%3Avoip-metrics%0D%0Aa%3Dzrtp-hash%3A1.10%208e8dd2fa6803f32845f26e55879c776a4bc015ee05b41630313aee27ef77fb30%0D%0Am%3Dvideo%205006%20RTP/AVP%20105%2099%0D%0Aa%3Drtpmap%3A105%20H264/90000%0D%0Aa%3Dfmtp%3A105%20profile-level-id%3D4DE01f%3Bpacketization-mode%3D1%0D%0Aa%3Drtpmap%3A99%20H264/90000%0D%0Aa%3Dfmtp%3A99%20profile-level-id%3D4DE01f%0D%0Aa%3Drecvonly%0D%0Aa%3Dimageattr%3A105%20send%20*%20recv%20%5Bx%3D%5B1%3A1920%5D,y%3D%5B1%3A1080%5D%5D%0D%0Aa%3Dimageattr%3A99%20send%20*%20recv%20%5Bx%3D%5B1%3A1920%5D,y%3D%5B1%3A1080%5D%5D%0D%0A +variable_rtp_use_codec_string: G722,PCMU,PCMA,GSM +variable_r_sdp_audio_zrtp_hash: 1.10%208e8dd2fa6803f32845f26e55879c776a4bc015ee05b41630313aee27ef77fb30 +variable_audio_media_flow: sendrecv +variable_remote_media_ip: 192.168.56.1 +variable_remote_media_port: 5000 +variable_rtp_audio_recv_pt: 9 +variable_dtmf_type: rfc2833 +variable_rtp_2833_send_payload: 101 +variable_rtp_2833_recv_payload: 101 +variable_video_possible: true +variable_video_media_flow: sendonly +variable_rtp_local_sdp_str: v%3D0%0D%0Ao%3DFreeSWITCH%201520996753%201520996756%20IN%20IP4%20192.168.56.202%0D%0As%3DFreeSWITCH%0D%0Ac%3DIN%20IP4%20192.168.56.202%0D%0At%3D0%200%0D%0Am%3Daudio%2029014%20RTP/AVP%209%20101%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-16%0D%0Aa%3Dptime%3A20%0D%0Aa%3Dsendrecv%0D%0Am%3Dvideo%200%20RTP/AVP%2019%0D%0A +variable_sip_to_tag: aDUZXF1Z1vD6p +variable_sip_from_tag: df94d020 +variable_sip_cseq: 4 +variable_sip_call_id: 985e365faa0ec79a7fa75d001ef2449f%400%3A0%3A0%3A0%3A0%3A0%3A0%3A0 +variable_sip_full_via: SIP/2.0/UDP%20192.168.56.1%3A5060%3Bbranch%3Dz9hG4bK-323230-ab335b3491dd24f5ec251b9700716b97 +variable_sip_from_display: 1001 +variable_sip_full_from: %221001%22%20%3Csip%3A1001%40192.168.56.202%3E%3Btag%3Ddf94d020 +variable_sip_full_to: %3Csip%3A1002%40192.168.56.202%3E%3Btag%3DaDUZXF1Z1vD6p +variable_sip_term_status: 200 +variable_proto_specific_hangup_cause: sip%3A200 +variable_sip_term_cause: 16 variable_last_bridge_role: originator +variable_sip_user_agent: Jitsi2.10.5550Windows%2010 +variable_sip_hangup_disposition: recv_bye variable_bridge_hangup_cause: NORMAL_CLEARING -variable_hangup_cause: MANAGER_REQUEST +variable_hangup_cause: NORMAL_CLEARING variable_hangup_cause_q850: 16 variable_digits_dialed: none -variable_start_stamp: 2018-03-13%2011%3A17%3A39 -variable_profile_start_stamp: 2018-03-13%2011%3A17%3A39 -variable_answer_stamp: 2018-03-13%2011%3A17%3A44 -variable_bridge_stamp: 2018-03-13%2011%3A17%3A44 -variable_progress_stamp: 2018-03-13%2011%3A17%3A39 -variable_progress_media_stamp: 2018-03-13%2011%3A17%3A44 -variable_end_stamp: 2018-03-13%2011%3A17%3A44 -variable_start_epoch: 1520954259 -variable_start_uepoch: 1520954259207931 -variable_profile_start_epoch: 1520954259 -variable_profile_start_uepoch: 1520954259237372 -variable_answer_epoch: 1520954264 -variable_answer_uepoch: 1520954264358500 -variable_bridge_epoch: 1520954264 -variable_bridge_uepoch: 1520954264358500 -variable_last_hold_epoch: 0 -variable_last_hold_uepoch: 0 -variable_hold_accum_seconds: 0 -variable_hold_accum_usec: 0 -variable_hold_accum_ms: 0 +variable_start_stamp: 2018-03-14%2007%3A09%3A18 +variable_profile_start_stamp: 2018-03-14%2007%3A09%3A18 +variable_answer_stamp: 2018-03-14%2007%3A09%3A27 +variable_bridge_stamp: 2018-03-14%2007%3A09%3A27 +variable_hold_stamp: 2018-03-14%2007%3A09%3A27 +variable_progress_stamp: 2018-03-14%2007%3A09%3A18 +variable_progress_media_stamp: 2018-03-14%2007%3A09%3A27 +variable_hold_events: %7B%7B1521025767847893,1521025783334494%7D%7D +variable_end_stamp: 2018-03-14%2007%3A09%3A48 +variable_start_epoch: 1521025758 +variable_start_uepoch: 1521025758006702 +variable_profile_start_epoch: 1521025758 +variable_profile_start_uepoch: 1521025758026167 +variable_answer_epoch: 1521025767 +variable_answer_uepoch: 1521025767766321 +variable_bridge_epoch: 1521025767 +variable_bridge_uepoch: 1521025767766321 +variable_last_hold_epoch: 1521025767 +variable_last_hold_uepoch: 1521025767847892 +variable_hold_accum_seconds: 15 +variable_hold_accum_usec: 15486602 +variable_hold_accum_ms: 15486 variable_resurrect_epoch: 0 variable_resurrect_uepoch: 0 -variable_progress_epoch: 1520954259 -variable_progress_uepoch: 1520954259257731 -variable_progress_media_epoch: 1520954264 -variable_progress_media_uepoch: 1520954264358500 -variable_end_epoch: 1520954264 -variable_end_uepoch: 1520954264737400 -variable_last_app: playback -variable_last_arg: local_stream%3A//moh +variable_progress_epoch: 1521025758 +variable_progress_uepoch: 1521025758116123 +variable_progress_media_epoch: 1521025767 +variable_progress_media_uepoch: 1521025767766321 +variable_end_epoch: 1521025788 +variable_end_uepoch: 1521025788366141 +variable_last_app: bridge +variable_last_arg: user/1002%40192.168.56.202 variable_caller_id: %221001%22%20%3C1001%3E -variable_duration: 5 -variable_billsec: 0 +variable_duration: 30 +variable_billsec: 21 variable_progresssec: 0 -variable_answersec: 5 -variable_waitsec: 5 -variable_progress_mediasec: 5 -variable_flow_billsec: 5 -variable_mduration: 5530 -variable_billmsec: 379 -variable_progressmsec: 50 -variable_answermsec: 5151 -variable_waitmsec: 5151 -variable_progress_mediamsec: 5151 -variable_flow_billmsec: 5530 -variable_uduration: 5529469 -variable_billusec: 378900 -variable_progressusec: 49800 -variable_answerusec: 5150569 -variable_waitusec: 5150569 -variable_progress_mediausec: 5150569 -variable_flow_billusec: 5529469 -variable_sip_hangup_disposition: send_bye -variable_rtp_audio_in_raw_bytes: 1376 -variable_rtp_audio_in_media_bytes: 1376 -variable_rtp_audio_in_packet_count: 8 -variable_rtp_audio_in_media_packet_count: 8 -variable_rtp_audio_in_skip_packet_count: 13 +variable_answersec: 9 +variable_waitsec: 9 +variable_progress_mediasec: 9 +variable_flow_billsec: 30 +variable_mduration: 30360 +variable_billmsec: 20600 +variable_progressmsec: 110 +variable_answermsec: 9760 +variable_waitmsec: 9760 +variable_progress_mediamsec: 9760 +variable_flow_billmsec: 30360 +variable_uduration: 30359439 +variable_billusec: 20599820 +variable_progressusec: 109421 +variable_answerusec: 9759619 +variable_waitusec: 9759619 +variable_progress_mediausec: 9759619 +variable_flow_billusec: 30359439 +variable_rtp_audio_in_raw_bytes: 174156 +variable_rtp_audio_in_media_bytes: 166416 +variable_rtp_audio_in_packet_count: 1033 +variable_rtp_audio_in_media_packet_count: 988 +variable_rtp_audio_in_skip_packet_count: 7 variable_rtp_audio_in_jitter_packet_count: 0 variable_rtp_audio_in_dtmf_packet_count: 0 variable_rtp_audio_in_cng_packet_count: 0 -variable_rtp_audio_in_flush_packet_count: 0 +variable_rtp_audio_in_flush_packet_count: 45 variable_rtp_audio_in_largest_jb_size: 0 -variable_rtp_audio_in_jitter_min_variance: 0.00 -variable_rtp_audio_in_jitter_max_variance: 0.00 +variable_rtp_audio_in_jitter_min_variance: 0.50 +variable_rtp_audio_in_jitter_max_variance: 31.77 variable_rtp_audio_in_jitter_loss_rate: 0.00 variable_rtp_audio_in_jitter_burst_rate: 0.00 -variable_rtp_audio_in_mean_interval: 0.00 -variable_rtp_audio_in_flaw_total: 0 -variable_rtp_audio_in_quality_percentage: 100.00 -variable_rtp_audio_in_mos: 4.50 -variable_rtp_audio_out_raw_bytes: 0 -variable_rtp_audio_out_media_bytes: 0 -variable_rtp_audio_out_packet_count: 0 -variable_rtp_audio_out_media_packet_count: 0 +variable_rtp_audio_in_mean_interval: 20.17 +variable_rtp_audio_in_flaw_total: 1 +variable_rtp_audio_in_quality_percentage: 99.00 +variable_rtp_audio_in_mos: 4.49 +variable_rtp_audio_out_raw_bytes: 43344 +variable_rtp_audio_out_media_bytes: 43344 +variable_rtp_audio_out_packet_count: 252 +variable_rtp_audio_out_media_packet_count: 252 variable_rtp_audio_out_skip_packet_count: 0 variable_rtp_audio_out_dtmf_packet_count: 0 variable_rtp_audio_out_cng_packet_count: 0 variable_rtp_audio_rtcp_packet_count: 0 variable_rtp_audio_rtcp_octet_count: 0` - var fsCdrCfg *config.CGRConfig timezone := config.CgrConfig().DefaultTimezone fsCdrCfg, _ = config.NewDefaultCGRConfig() fsCdr, _ := engine.NewFSCdr(body, fsCdrCfg) smGev := sessions.SMGenericEvent(NewFSEvent(hangUp).AsMapStringInterface(timezone)) - valCGRID := smGev.AsCDR(fsCdrCfg, timezone) - // convertit in SMGEvent - // pe urma comapart fsCDR.CGRID cu - value := fsCdr.AsCDR(timezone) - if value.CGRID != valCGRID.CGRID { - t.Errorf("Expecting: %s, received: %s", valCGRID.CGRID, value.CGRID) + smCDR := smGev.AsCDR(fsCdrCfg, timezone) + fsCDR := fsCdr.AsCDR(timezone) + if fsCDR.CGRID != smCDR.CGRID { + t.Errorf("Expecting: %s, received: %s", fsCDR.CGRID, smCDR.CGRID) } }