WebRTC subscribe for BLF

Hi,

i’m using Janus as a WebRTC Backend for our Softphone written in JS on freePBX (Asterisk). Everything works so far, but now i try to implement BLF for the Softphone. I’m doing a subscription in this way:

var blf = {
            from: 'sip:' + exten + '@' + sip_server, // This my extension
            to: 'sip:' + to + '@' + sip_server, // This is the extension i want to subscribe to
            request: 'subscribe',
	    event: 'dialog'
        };
        sipcall.send({
            'message': blf
        });

This code works exactly for only one subscription, if i want to do the same on an other extension, it doesn’t work. What i am missing?

My Janus Gateway is version 1.2.1

Kind Regards

Thomas

This is a current limitation in the plugin. At the moment, you can only do a single subscription of the same type per handle, since the name of the event is basically acting as a key in the table we use for them. I think you can get around this by using helper sessions, which basically implement the concept of multiple lines in your phone associated with the same account. You can check the documentation to see how to create a helper, and once you do that in theory you should be able to do a new subscribe on the new handle.

Thank you for reply, Lorenzo.

I try with helpers, like i tried to use them for attended transfer of calls (no progress till yet)

Will you change the behavior of the plugin in future?

Regards

Thomas

No idea. I guess we’ll have to, sooner or later, but it doesn’t have a high priority for me to be honest, especially considering it would probably be a bit of work to change the current model.

it would probably be a bit of work to change the current model.

I guess it will be more than a “bit” :slight_smile:

But in the meantime we could live with helpers.

BTW: How many helper i could use on one Master?

There’s no hardcoded limit on the number of helpers.

1 Like

Hi Lorenzo,

i have now several helper lines, all are subscriptions to other extensions. With a state “early” in the notify i can see an incoming call on an other line. Could you explain the steps how to get the call to my phone?

Regards

Thomas

I’m sorry but I’m unfamiliar with BLF. Janus only implements the basics of subscribe/notify, but every action/reaction is up to you, depending on what the standard says.

Hi Lorenzo,

i have a bit success on this topic:

  1. I can use several BLF with helper lines
  2. i can take over a call it’s for another extension:

Let’s say the sip:7@sipserver calls sip:37@sipserver and my extension is sip:181@sipserver i can take over the call when i (with 181) call the extension 37 with sip:__37@sipserver (replace the “__” with “**” before 37@?)

The connection is established. I can see the extension 7 and 181 are in a call, the 181 can hangup the call, but they don’t hear each other? Something went wrong with the audio.

Maybe you have an idea?

Regards