'How can i use my application with linphone-sdk-android for incoming calls to my freePBX accounts?

I developed a mobil app for Android phones.

And I used linphone-sdk-android-5.1.2.aar in this app.

My app is

linphone account to linphone account - perfect working

freePBX account to linphone account - perfect working

but

linphone account to freePBX account - not working

freePBX account to freePBX account - not working

for incoming call accept.

I think, linphone-android-sdk isn't accept third party accounts for incoming calls.

How can i use my application with linphone-sdk-android for incoming calls to my freePBX accounts?



Solution 1:[1]

I think, linphone-android-sdk isn't accept third party accounts for incoming calls.

That isn't true, but without logs it will be hard to tell you what's wrong in your project.

Cheers,

Solution 2:[2]

  1. Key is to get the DATE part only by truncating the time part along with the other columns because we will need to group by the date part to get the earliest timestamp.
WITH cte
     AS (SELECT worker_id,
                created_at,
                Date(created_at) trunc_date,
                state_id
         FROM   worker)
  1. after getting the above dataset in a CTE , list the rows in ascending order of created_at with timestamp and pick the first row(which will be the earliest timestamp)

Full SQL:

WITH cte
     AS (SELECT worker_id,
                created_at,
                Date(created_at) trunc_date,
                state_id
         FROM   worker)
SELECT worker_id,
       created_at,
       state_id
FROM   (SELECT worker_id,
               created_at,
               state_id,
               Row_number()
                 OVER (
                   partition BY trunc_date
                   ORDER BY created_at) lst
        FROM   cte) inline_view
WHERE  lst = 1

Output:

 worker_id |     created_at      | state_id
-----------+---------------------+----------
     29447 | 2021-04-10 10:19:00 |       11
     29447 | 2021-04-12 07:03:00 |       11
     29447 | 2021-06-10 10:21:00 |        9
     29447 | 2021-06-11 10:47:00 |        9
     29447 | 2021-06-12 14:11:00 |       12
     29447 | 2021-06-14 15:29:00 |       12
(6 rows)

Sample data in worker table:

postgres=# select * from worker;
 worker_id |     created_at      | state_id
-----------+---------------------+----------
     29447 | 2021-06-14 15:29:00 |       12
     29447 | 2021-06-12 14:11:00 |       12
     29447 | 2021-06-10 10:21:00 |        9
     29447 | 2021-06-14 15:29:00 |       12
     29447 | 2021-04-12 07:03:00 |       11
     29447 | 2021-04-10 11:39:00 |       11
     29447 | 2021-04-10 10:19:00 |       11
     29447 | 2021-06-11 10:47:00 |        9
(8 rows)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Viish
Solution 2