linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Trying to make BLF (presence) work between lin


From: John Hughes
Subject: Re: [Linphone-developers] Trying to make BLF (presence) work between linphone 3.12 and asterisk
Date: Thu, 9 Apr 2020 17:03:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 09/04/2020 09:34, John Hughes wrote:

So, I wondered, what would happen if I hacked dialog.c in belle-sip to not delete the dialog if it got a 401 UNAUTHORISED.

Surprise!  Everyone is perfectly happy, linphone retries the SUBSCRIBE with the new nonce and presence continues to work (as well as it worked before, which is that it shows which phones are in the Ready state but doesn't present the Ringing or In Call information).


And, with this obviously non standard brain-dead hack I get a workable presence/busy-light functionality with linphone and asterisk:

In linphone_friend_get_status (coreapi/friend.c) near the end:

                /* absolutely brain dead hack for asterisk */

                if (_online_status_ == LinphoneStatusOnline) {
                        LinphonePresenceNote *note = linphone_presence_model_get_note(presence, NULL);
                        if (note) {
                                const char *note_content = linphone_presence_note_get_content(note);
                                /* Language ?!@??# */
                                if (strcmp (note_content, "On the phone") == 0) {
                                        _online_status_ = LinphoneStatusOnThePhone;
                                }
                        }
                }
I guess this could be made conditional on the remote being asterisk.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]