Output of the API LISTING task
Examples
Warning
Beware that because output for single result contains around 16k of characters, its necessary to use pager to limit amount of returned results otherwise the speed is low. For getting 'just' the stats use the API2's task: getVoipCalls - which returns singificantly less data per result and thus is faster when obtaining the results.
zero results
curl -X POST -k --cookie "PHPSESSID-voipmonitor=2ffd2fb6bef76dfa6f2ff3630e86cca39c8b93ee4761b2a45f9f804e321d1736" "http://192.168.88.156/voipmonitor/php/model/sql.php?task=LISTING&module=CDR&fdatefrom=2023-05-13T10:00:00&fcaller=11"
{"total":0,"results":null,"success":true,"_vm_version":250008}
Results suppressed
curl -X POST -k --cookie "PHPSESSID-voipmonitor=00d61b82469a39a21c6ce7d5a1e4129af4f3777d3cdfa81d6f652e5e807baa49" "http://192.168.88.156/voipmonitor/php/model/sql.php?task=LISTING&module=CDR&fdatefrom=2013-05-08T00:00:00&fcaller=11&suppress_results=1"
{"total":"1","success":true,"_vm_version":250008}
One result
curl -X POST -k --cookie "PHPSESSID-voipmonitor=2ffd2fb6bef76dfa6f2ff3630e86cca39c8b93ee4761b2a45f9f804e321d1736" "http://192.168.88.156/voipmonitor/php/model/sql.php?task=LISTING&module=CDR&fdatefrom=2023-05-12T10:00:00&fcaller=11"
Because the response for single CDR is json string that contains over 16k of chars, here is result after passing the string to json_decode fce with use of var_dump for printing its contents splited by fields. Additionally for more then few results you need to use pager option to limit size of the output and speedup results.
stdClass Object ( [total] => 1 [deferTotal] => [results] => Array ( [0] => stdClass Object ( [ID] => 55 [calldate] => 2023-05-12 16:33:17 [callend] => 2023-05-12 16:50:12 [duration] => 16:55 [connect_duration] => 16:40 [progress_time] => 0 [first_rtp_time] => 0 [caller] => 11 [caller_domain] => 192.168.88.199 [caller_reverse] => 11 [callername] => [callername_reverse] => [called] => 34567654567865 [called_domain] => 192.168.88.199 [called_reverse] => 56876545676543 [sipcallerip] => 192.168.88.174 [sipcallerport] => 5060 [sipcalledip] => 192.168.88.199 [sipcalledport] => 5060 [whohanged] => callee [bye] => 3 [lastSIPresponse_id] => 1 [lastSIPresponseNum] => 200 [reason_sip_cause] => [reason_sip_text_id] => [reason_q850_cause] => [reason_q850_text_id] => [sighup] => 0 [dscp] => 0 [a_index] => 0 [b_index] => [a_payload] => 8 [b_payload] => [a_saddr] => 192.168.88.174 [b_saddr] => [a_received] => 50725 [b_received] => [a_lost] => 0 [b_lost] => [a_ua_id] => 3 [b_ua_id] => 1 [a_avgjitter_mult10] => 4 [b_avgjitter_mult10] => [a_maxjitter] => 10 [b_maxjitter] => [a_sl1] => 0 [a_sl2] => 0 [a_sl3] => 0 [a_sl4] => 0 [a_sl5] => 0 [a_sl6] => 0 [a_sl7] => 0 [a_sl8] => 0 [a_sl9] => 0 [a_sl10] => 0 [a_d50] => 0 [a_d70] => 0 [a_d90] => 0 [a_d120] => 0 [a_d150] => 0 [a_d200] => 0 [a_d300] => 0 [b_sl1] => [b_sl2] => [b_sl3] => [b_sl4] => [b_sl5] => [b_sl6] => [b_sl7] => [b_sl8] => [b_sl9] => [b_sl10] => [b_d50] => [b_d70] => [b_d90] => [b_d120] => [b_d150] => [b_d200] => [b_d300] => [a_mos_lqo_mult10] => [b_mos_lqo_mult10] => [a_mos_f1_min_mult10] => 45 [a_mos_f2_min_mult10] => 45 [a_mos_adapt_min_mult10] => 39 [a_mos_xr_min_mult10] => [a_mos_silence_min_mult10] => 45 [b_mos_f1_min_mult10] => [b_mos_f2_min_mult10] => [b_mos_adapt_min_mult10] => [b_mos_xr_min_mult10] => [b_mos_silence_min_mult10] => [a_mos_f1_mult10] => 45 [a_mos_f2_mult10] => 45 [a_mos_adapt_mult10] => 45 [a_mos_xr_mult10] => [a_mos_silence_mult10] => 45 [b_mos_f1_mult10] => [b_mos_f2_mult10] => [b_mos_adapt_mult10] => [b_mos_xr_mult10] => [b_mos_silence_mult10] => [a_rtcp_loss] => 0 [a_rtcp_maxfr] => 0 [a_rtcp_avgfr_mult10] => 0 [a_rtcp_maxjitter] => 1 [a_rtcp_avgjitter_mult10] => 3 [a_rtcp_avgrtd_mult10] => [a_rtcp_maxrtd_mult10] => [a_rtcp_avgrtd_w] => 1 [a_rtcp_maxrtd_w] => 2 [b_rtcp_loss] => [b_rtcp_maxfr] => [b_rtcp_avgfr_mult10] => [b_rtcp_maxjitter] => [b_rtcp_avgjitter_mult10] => [b_rtcp_avgrtd_mult10] => [b_rtcp_maxrtd_mult10] => [b_rtcp_avgrtd_w] => [b_rtcp_maxrtd_w] => [a_last_rtp_from_end] => 0 [b_last_rtp_from_end] => [a_rtcp_fraclost_pktcount] => 0 [b_rtcp_fraclost_pktcount] => [a_rtp_ptime] => 20 [b_rtp_ptime] => [payload] => 8 [jitter_mult10] => 4 [mos_min_mult10] => 45 [a_mos_min_mult10] => 45 [b_mos_min_mult10] => [packet_loss_perc_mult1000] => 0 [a_packet_loss_perc_mult1000] => 0 [b_packet_loss_perc_mult1000] => [delay_sum] => 0 [a_delay_sum] => 0 [b_delay_sum] => [delay_avg_mult100] => 0 [a_delay_avg_mult100] => 0 [b_delay_avg_mult100] => [delay_cnt] => 0 [a_delay_cnt] => 0 [b_delay_cnt] => [rtcp_avgfr_mult10] => 0 [rtcp_avgjitter_mult10] => 3 [lost] => 0 [caller_clipping_div3] => [called_clipping_div3] => [caller_silence] => [called_silence] => [caller_silence_end] => [called_silence_end] => [response_time_100] => 28 [response_time_xxx] => 0 [max_retransmission_invite] => [flags] => 131072 [vlan] => [id_sensor] => [price_operator_currency_id] => [price_customer_currency_id] => [rtp_stream_used_in_another_call] => 0 [sensorname] => [lastSIPresponse] => 200 Ok [a_ua] => Linphone Desktop/5.0.0 (BobisekNTB) Windows 10 Version 2009, Qt 5.15.2 LinphoneCore/5.2.0-2-g29c553987 [b_ua] => Asterisk PBX 16.28.0~dfsg-0+deb10u2 [cdr_ID] => 55 [custom_header1] => [fbasename] => xZZvFAX6YP [digest_username] => 11 [match_header] => [GeoPosition] => [hold] => [spool_index] => [custom_header_1_1] => [custom_header_1_2] => [sipcallerip_country_code] => [sipcalledip_country_code] => [caller_number_country_code] => [called_number_country_code] => [sipcallerip_country] => [sipcalledip_country] => [caller_number_country] => [called_number_country] => [price_operator] => [price_customer] => 17000000 [a_avgjitter] => 0.4 [b_avgjitter] => [a_mos_lqo] => [b_mos_lqo] => [a_mos_f1_min] => 4.5 [a_mos_f2_min] => 4.5 [a_mos_adapt_min] => 3.9 [a_mos_xr_min] => [a_mos_silence_min] => 4.5 [b_mos_f1_min] => [b_mos_f2_min] => [b_mos_adapt_min] => [b_mos_xr_min] => [b_mos_silence_min] => [a_mos_f1] => 4.5 [a_mos_f2] => 4.5 [a_mos_adapt] => 4.5 [a_mos_xr] => [a_mos_silence] => 4.5 [b_mos_f1] => [b_mos_f2] => [b_mos_adapt] => [b_mos_xr] => [b_mos_silence] => [a_rtcp_avgfr] => 0 [a_rtcp_avgjitter] => 0.3 [a_rtcp_avgrtd] => [a_rtcp_maxrtd] => [b_rtcp_avgfr] => [b_rtcp_avgjitter] => [b_rtcp_avgrtd] => [b_rtcp_maxrtd] => [jitter] => 0.4 [mos_min] => 4.5 [a_mos_min] => 4.5 [b_mos_min] => [packet_loss_perc] => 0 [a_packet_loss_perc] => 0 [b_packet_loss_perc] => [delay_avg] => 0 [a_delay_avg] => 0 [b_delay_avg] => [rtcp_avgfr] => 0 [rtcp_avgjitter] => 0.3 [_duration] => 1015 [_connect_duration] => 1000 [_sql_calldate] => 2023-05-12 16:33:17 [calldate_userformat] => 2023-05-12 16:33:17 [calldate2] => 2023-05-12<br>16:33:17 [callend_userformat] => 2023-05-12 16:50:12 [calldate2e] => 2023-05-12<br>16:33:17<br><span style="color: grey;">16:50:12</span> [duration2] => <div style="text-align: left; margin-left: 4px;">16:55<span data-qtip="Post Dial Delay (PDD) is experienced by the customer originating the call from the time the final digit is dialled to the point at which they hear ring tone or other in-band information. Where the originating network is required to play an announcement before completing the call then this definition of PDD excludes the duration of such announcements." data-dismissDelay=10000 style="font-size: 9; color: green;"> (0)</span><br>16:40<br>G.711a</div> [caller_icon_hanged] => [called_icon_hanged] => <img src="images/icon/hangup8.gif"/> [lastresponse] => 200<br>200 Ok [callerrtp] => 192.168.88.174 [sipcaller_host] => [sipcaller_host_color] => [sipcalled_host] => [sipcalled_host_color] => [callerrtp_host] => [callerrtp_host_color] => [caller_with_domain] => 11@<span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.199', 'domip');" style="cursor: pointer;">192.168.88.199</span> [called_with_domain] => 34567654567865@<span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.199', 'domip');" style="cursor: pointer;">192.168.88.199</span> [sipcalleripMenu] => <span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.174', 'ip');" style="cursor: pointer;">192.168.88.174</span> [sipcalledipMenu] => <span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.199', 'ip');" style="cursor: pointer;">192.168.88.199</span> [caller2] => 11@<span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.199', 'domip');" style="cursor: pointer;">192.168.88.199</span><br><i style="color: grey;">callername is empty</i> (11)<br><font color=""><span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.174', 'ip');" style="cursor: pointer;">192.168.88.174</span></font> : 5060<br>Linphone Desktop/5.0.0 (BobisekNTB) Windows 10 Version 2009, Qt 5.15.2 LinphoneCore/5.2.0-2-g29c553987 [called2] => 34567654567865@<span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.199', 'domip');" style="cursor: pointer;">192.168.88.199</span><img src="images/icon/hangup8.gif"/><br><font color=""><span panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).setFilterFromIpOrClipboard('192.168.88.199', 'ip');" style="cursor: pointer;">192.168.88.199</span></font> : 5060<br>Asterisk PBX 16.28.0~dfsg-0+deb10u2 [sipcallerip2] => <font color="">192.168.88.174</font><br> [sipcalledip2] => <font color="">192.168.88.199</font><br> [ringing_time] => 15 [sipresponse] => 200 Ok [a_codec] => G.711a [b_codec] => [fbasename_orig] => xZZvFAX6YP [menu] => <table style="margin-left: auto; margin-bottom: 1; border: none; border-collapse: collapse; padding: 0; margin: 0;"><tr><td style="width:55px;font-size:11;padding-right:2px; "><span class="pcap-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadPcap(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><a>PCAP</a></span></td><td style="width:16px;"><div data-qtip="PCAP" class="pcap-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadPcap(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><img src="images/icon/disk.png"/></div</td><td style="width:19px; padding-left: 3px;"><div class="share-cdr" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doShareCdrSipRtp(this.attributes.cdr_id.nodeValue, false, event);" onmouseover="this.style.cursor='pointer';"><img src="images/icon/link.png"/></div</td><td style="width:19px; padding-left: 3px;"><div data-qtip="Preserve PCAP/RTP graphs in Safe Spool" class="copy-safespool" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doCopyPcapToSafeSpool(this.attributes.cdr_id.nodeValue, false, event);" onmouseover="this.style.cursor='pointer';"><img src="images/icon/lock.png"/></div</td></tr></table><table style="margin-left: auto; margin-bottom: 1; border: none; border-collapse: collapse; padding: 0; margin: 0;"><tr><td style="width:55px;font-size:11;padding-right:2px; "><span class="wav-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadOgg(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><a>OGG</a></span> <span class="wav-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadWav(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><a>WAV</a></span></td><td style="width:16px;"><div class="wav-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadSound(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><img src="images/icon/sound.png"/></div</td><td style="width:19px; padding-left: 3px;"></td><td style="width:19px; padding-left: 3px;"></td></tr></table><div class="wav-player-png" style="padding-top: 3px; text-align: left;"><img src="images/wav-player.png" width=80 height=10 cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doPlayWavPlayer(this.attributes.cdr_id.nodeValue,false,false,event);" onmouseover="this.style.cursor='pointer';"></div> [menu_pcap] => <table style="margin-left: auto; margin-bottom: 1; border: none; border-collapse: collapse; padding: 0; margin: 0;"><tr><td style="width:55px;font-size:11;padding-right:2px; "><span class="pcap-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadPcap(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><a>PCAP</a></span></td><td style="width:16px;"><div data-qtip="PCAP" class="pcap-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadPcap(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><img src="images/icon/disk.png"/></div</td><td style="width:19px; padding-left: 3px;"></td><td style="width:19px; padding-left: 3px;"></td></tr></table> [menu_wav] => <table style="margin-left: auto; margin-bottom: 1; border: none; border-collapse: collapse; padding: 0; margin: 0;"><tr><td style="width:55px;font-size:11;padding-right:2px; "><span class="wav-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadOgg(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><a>OGG</a></span> <span class="wav-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadWav(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><a>WAV</a></span></td><td style="width:16px;"><div class="wav-download" cdr_id=55 panel_id=__THIS_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doDownloadSound(this.attributes.cdr_id.nodeValue, false, false, event);" onmouseover="this.style.cursor='pointer';"><img src="images/icon/sound.png"/></div</td><td style="width:19px; padding-left: 3px;"></td><td style="width:19px; padding-left: 3px;"></td></tr></table> [embedplayer_indirect] => <div style="margin-top: 7px; margin-bottom: 3px; margin-left: 5px" class="wav-player-expand-png"><img src="images/wav-player-expand.png" width=300 height=15 cdr_id=55 panel_id=__PANEL_ID__ onclick="Ext.getCmp(this.attributes.panel_id.nodeValue).doPlayWavPlayer(this.attributes.cdr_id.nodeValue,true,false,event);" onmouseover="this.style.cursor='pointer';"></div> [callerrtp2] => <span onclick="showGraphOrRtpAnalysis(55, 'a', 1, null, '192.168.88.174');" style="cursor: pointer;">192.168.88.174</span><br><span data-qtip="MOS score for simulated fixed jitterbuffer with max size 50ms" data-dismissDelay=10000 ><b>4.5</b></span><font color="grey">|</font><span data-qtip="MOS score for simulated fixed jitterbuffer with max size 200ms" data-dismissDelay=10000 ><b>4.5</b></span><font color="grey">|</font><span data-qtip="MOS score for adaptive jitterbuffer with max size 500ms" data-dismissDelay=10000 ><b>4.5</b></span><font color="grey">|</font><span data-qtip="MOS Silence avg" data-dismissDelay=10000 style="color: darkcyan;"><b>4.5</b></span><font color="grey">|</font><span data-qtip="MOS Silence min" data-dismissDelay=10000 style="color: darkcyan;"><b>4.5</b></span><br><span data-qtip="RTCP part (if RTCP packet was captured) shows MAX RTP jitter (J:26.3) and MAX RTCP % loss (L:72.3). RTCP in Caller column shows how called side sees the stream." data-dismissDelay=10000 >J:0.3</span> | <span data-qtip="No jitter (PDV) in RTP packets." data-dismissDelay=10000 ><font color="grey">no jitter</font></span><br><span data-qtip="No packet loss in RTP packets." data-dismissDelay=10000 ><font color="grey">no packet loss</font></span> [calledrtp2] => N/A [allrtpstreams] => [{"cdr_ID":"55","calldate":"2023-05-12 16:33:17","saddr":"192.168.88.174","sport":"7078","daddr":"192.168.88.199","dport":"14518","ssrc":"1744777213","received":"50725","loss":"0","firsttime":"0.806428","payload":"8","maxjitter_mult10":"90","index":"1","flags":"6","duration":"1014.23"}] [orig_allrtpstreams] => [{"cdr_ID":"55","calldate":"2023-05-12 16:33:17","saddr":"192.168.88.174","sport":"7078","daddr":"192.168.88.199","dport":"14518","ssrc":"1744777213","received":"50725","loss":"0","firsttime":"0.806428","payload":"8","maxjitter_mult10":"90","index":"1","flags":"6","duration":"1014.23"}] [allsiprequests] => [{"SIPrequest":"INVITE","cnt":"2"},{"SIPrequest":"ACK","cnt":"3"},{"SIPrequest":"BYE","cnt":"1"}] [allsipresponses] => [{"SIPresponseNum":"401","SIPresponse":"401 Unauthorized"},{"SIPresponseNum":"100","SIPresponse":"100 Trying"},{"SIPresponseNum":"183","SIPresponse":"183 Session Progress"},{"SIPresponseNum":"200","SIPresponse":"200 Ok"}] ) ) [success] => 1 [_vm_version] => 250008 )