API error?

Talk with others about developing applications for Switchvox

Moderators: bmdhacks, dpodolsky, tristand, jwitt, joshuas

API error?

Postby npi » Mon Apr 23, 2012 9:07 am

I have a question regarding some queue fields, in particular max_wait_time_completed_calls and avg_wait_time_completed_calls. The variables seem self explanitary, however the results seem to be either wrong, or potentially reversed. In the below request we get a response back with the following values

max_wait_time_completed_calls="3"
avg_wait_time_completed_calls="10"

How can the average be greater than the max?

Body:
<request method="switchvox.users.callQueues.getTodaysStatus">
<parameters>
<account_id>1118</account_id>
<call_queue_account_id>1131</call_queue_account_id>
<start_date>4/19/2012</start_date>
<end_date>4/19/2012 3:39:03 PM</end_date>
<ignore_weekends>1</ignore_weekends>
<queue_account_ids>
<queue_account_id>1131</queue_account_id>
</queue_account_ids>
<breakdown>by_queue</breakdown>
<report_fields>
<report_field>total_calls</report_field>
<report_field>completed_calls</report_field>
<report_field>abandoned_calls</report_field>
<report_field>redirected_calls</report_field>
<report_field>longest_queue_length</report_field>
<report_field>avg_entry_position</report_field>
<report_field>max_wait_time_all_calls</report_field>
<report_field>avg_wait_time_all_calls</report_field>
<report_field>max_wait_time_completed_calls</report_field>
<report_field>avg_wait_time_completed_calls</report_field>
<report_field>max_wait_time_abandoned_calls</report_field>
<report_field>avg_wait_time_abandoned_calls</report_field>
<report_field>max_wait_time_redirected_calls</report_field>
<report_field>avg_wait_time_redirected_calls</report_field>
<report_field>max_talk_time</report_field>
<report_field>avg_talk_time</report_field>
</report_fields>
<format>xml</format>
<sort_field>account_id</sort_field>
<sort_order>asc</sort_order>
<items_per_page>50</items_per_page>
<page_number>1</page_number>
</parameters>
</request>
Response:
<response method="switchvox.users.callQueues.getTodaysStatus">
<result>
<callQueue account_id="1131" name="NPI Main" extension="1400" >
<my_status login_status="permanent" current_call_duration="23" current_caller_id_name="NPI__" current_caller_id_number="2066607315" calls_taken="31" login_time="" time_of_last_call="2012-04-19 15:33:27" total_talk_time="1507" avg_talk_time="48" max_talk_time="270" paused_time="" />
<overview callers_waiting="0" members_on_call="1" total_members="15" total_calls="45" abandoned_calls="0" redirected_calls="13" completed_calls_today="32" avg_talk_time="48" max_talk_time="270" avg_wait_time="3" max_wait_time="10" avg_entry_position="1" longest_queue_length="1" max_wait_time_abandoned_calls="0" avg_wait_time_abandoned_calls="0" [b]max_wait_time_completed_calls="3" avg_wait_time_completed_calls="10"[/b] logged_in_count="2" />
<detailed_view>
<queue_members>
(The rest of the response deleted for brevity)
npi
Newsterisk
 
Posts: 3
Joined: Fri Apr 20, 2012 9:56 am

Re: API error?

Postby dpodolsky » Mon Apr 23, 2012 10:22 am

I checked into this and its a bug in the code where the values are just swapped. Filed an issue and looks like it will make the next minor release coming up soon. Good catch.
dpodolsky
Oldsterisk
 
Posts: 325
Joined: Thu Apr 23, 2009 2:35 pm


Return to Switchvox Developers

Who is online

Users browsing this forum: No registered users and 2 guests