Home Forums Voip Optimisation Custom Features

Viewing 15 posts - 226 through 240 (of 248 total)
  • Author
    Posts
  • Mark Hanson
    Keymaster
    Post count: 1015

    Hello Nishit thank you for your updates we have seen your 11583 reply on emails but surprisingly we could not find it on the site ;( Did you remove your post from here? Anyway we have contacted Telinta team and they said that there is a limited parameters for receiving numbers via API but they have also asked us to send you their guide file so you can find a work around ways to make that rolling.

    Please see they respond below:
    https://webmaklay.com/wp-content/uploads/2023/12/Telinta.jpg
    https://prev.portaone.com/docs/pb/mr80/PortaBilling_API_MR80.html

    How is al going for #11573 and #11577.
    Cheers

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    For post,
    I posted the post and then after i tried to edit that post and it disappeared.

    for Numbers download : i will try to get data in limited quantity and then merge it and will update you about the situation.

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    I can now download file with only numbers. But it is taking time for fetching information for all numbers.

    Mark Hanson
    Keymaster
    Post count: 1015

    Hello Nishit thank you for your updates, in #11588 and #11589,
    we have also got your lost post with your code below:
    ==================================Nishit’s Message Starts ===================================
    Make some changes for to get bulk data but i can reach up to 700 records at a time and it also take time to generate the xlsx file. But after amount I got “gateway time out” error.

    And this is my request method to get all DID numbers from API
    $params = array(
    “i_customer” => i_customer,
    ‘get_total’=> 1,
    “check_usage”=>1,
    “with_extended_info” => 1,
    “limit” => 50000,
    );

    And My curl request is as bellow

    $curl = curl_init();
    $searchArray = array(‘auth_info’ => ‘{“session_id”:”‘ . $session_id . ‘”}’, ‘params’ => json_encode($params));

    curl_setopt_array($curl, array(
    CURLOPT_URL => ‘https://mybilling.nanotelecom.org/rest/DID/get_number_list’,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => ”,
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => ‘POST’,
    CURLOPT_POSTFIELDS => $searchArray
    ));
    $response = curl_exec($curl);
    curl_close($curl);
    $DIDNumber = json_decode($response);

    return $DIDNumber;

    and for above request i got this error :

    {“faultcode”:”internal_server_error”,”faultstring”:”Internal server error”}

    =========================Nishit’s Message Ends ================================

    and we have addressed your code to the senior developer and here is what they responded to you.

    =========================Message from the senior developer starts ========================

    You cannot make it work by increasing limits, you should use a combination of “limit” and “offset” parameters in order to fetch small batches of numbers and then merge results. You can use the attached script as an example of the idea – it receives 500 numbers (0-499), then 500 next numbers (500-999), then 500 next numbers (1000-1499) and repeats it until all numbers are received.

    —————-CODE SAMPLE BELOW:

    #!/usr/bin/php
    i_customer,
    “get_total”=> 1,
    “check_usage”=>1,
    “with_extended_info” => 1,
    “limit” => 500,
    “offset” => 0,
    );

    $curl = curl_init();
    curl_setopt_array($curl, array(
    CURLOPT_URL => ‘https://mybilling.nanotelecom.org/rest/DID/get_number_list’,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => ”,
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => ‘POST’,
    ));

    $all_numbers = array();

    while (true) {
    echo(“Fetching records from ” . $params[“offset”] . ” to ” . $params[“offset”] + $params[“limit”] . “\n”);
    curl_setopt($curl, CURLOPT_POSTFIELDS, array(
    “auth_info” => $auth_info,
    “params” => json_encode($params),
    ));
    $response = curl_exec($curl);
    $response = json_decode($response);

    if ($response->number_list) {
    $all_numbers = array_merge($all_numbers, $response->number_list);
    $params[“offset”] = $params[“offset”] + count($response->number_list);
    if (count($response->number_list) < $params["limit"]) { break; } } else { break; } } curl_close($curl); echo("Total number of records: " . count($all_numbers) . "\n"); ?>

    Please let us know how it works
    Cheers

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    Thank you for your reply.

    I created the system as explained into #11590 and we got all numbers. But after fetching that numbers we have to fetch data from vendors API for deactivated numbers and Telinta API for activated numbers and it is taking much time to fetch information about numbers.

    Mark Hanson
    Keymaster
    Post count: 1015

    Hello NIshit thank you for your updates, what do you think can be done to speed up numbers API load? Have you checked the code and do you think we should increase the server resources?
    please advice
    Cheers

    Mark Hanson
    Keymaster
    Post count: 1015

    any updates for #11573 and #11577.

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    For #11592 : We can check it now increasing the resources of the server now.

    I will update you #11573 and #11577 in detail later. Currently i am working on the loading fetched data to the xlsx.

    Mark Hanson
    Keymaster
    Post count: 1015

    All good thanks Nishit will check with system team regarding resources increase.
    Cheers

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    For #11573 :

    1) When use login to portal the system checkes user authentication on API and laravel side so it is taking time to login.
    2) I changed the download button’s position and design for all numbers tab. I will make that change for other tabs.
    3) I removed the id column from xlxs file and changed column name “Vendor name” to “Network”.
    4) I changed the text and button colour on activation popup.
    5) I checked it and it works fine. Could you please provifr video for this issue ?
    6) This task is under process.

    For #11577:

    This process of adding data will work if we load whole data at a time on first load of page. For example for user “Great Number inc” has total 315 Active numbers. So we have to load all 315 numbers data at a time and store it into session. This process will take to much time to load data on first time.
    Another option is we can save data of first page data into session and then we can use it as the first page.

    For xlsx file :
    I think i asked this question before.
    The user could download only searched data into xlsx file, Am i right?

    Mark Hanson
    Keymaster
    Post count: 1015

    Hello Nishit thanks for the udpates in #11596 ,

    for 1) point how we make that load normal with no big delays? do we need increase server resources?
    for 5) will request video for that.

    will check othre points and 6) once complete.

    for all numbers loading issues #11591 – could you please clarify what are the Deactivated numbers? are these : Disconnected Numbers? Inventory? Did? there should be only one request for clients library. Please let us know.

    For xlsx file : yes what ever client select in the Return Values that should be in the download file.

    For #11577: I think we should do a “save data of first page data into session and then we can use it as the first page.”

    Cheers

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    For #11597:

    1) it is also depends on Api response time while we click on login. This does not need any system upgrade for this.

    For #11591 : In this point I explained about the xlsx file for All numbers.

    For Xlsx : Thanks, I am trying to download whole numbers from “All Numbers” tab. but after the searching the system can download searched numbers. We are about to finish this topic. Only one thing we have to keep in mind user can not download whole numbers from the “All Numbers” tab.

    For #11577: ok, I will Make that changes.

    Mark Hanson
    Keymaster
    Post count: 1015

    thanks Nishit for more info will check back tomorrow with site admins and get back to you if any more questions’.
    Please let us know when you finished the rest of the points.
    Cheers

    Nishit Shan
    Participant
    Post count: 853

    Hello Mark,

    Working on the inventory page download functionality.

    Mark Hanson
    Keymaster
    Post count: 1015

    Hello Nishit, thank you for your updates, please let us know when done so we will test again and send this job to finance.

    Cheers

Viewing 15 posts - 226 through 240 (of 248 total)
  • You must be logged in to reply to this topic.