Error when enabling Softphone in UCP

Hello.

when i am trying to enable the Zulu Softphone for a User, i get the following error. unfortunately i can’t find any solution.
is there anything i can do about it? everything else i use from the Zulu Module is fine.

PDOException (23000)
HELP
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘flags’ cannot be null
/var/www/html/admin/modules/core/functions.inc/drivers/PJSip.class.php
}

public function addDevice($id, $settings) {
	$sql = 'INSERT INTO sip (id, keyword, data, flags) values (?,?,?,?)';
	$sth = $this->database->prepare($sql);
	$settings = is_array($settings)?$settings:array();
	foreach($settings as $key => $setting) {
		$sth->execute(array($id,$key,$setting['value'],$setting['flag']));
	}
	return true;

Greets,
Andi

The Zulu soft phone has nothing to do with UCP. What versions are you running?

Also is this a PJSIP only system. If so we currently only support chan sip

are there any plans to run Zulu softphone using pjsip instead of chan_sip ? Then you would not need a “fictive” extension nr with 90xxx, because pjsip would allow to have as well an IPphone and softclient on the same extension number.

Actually the softclient does not even register successfully if pjsip is used for the IPphone as the softclient tries to register via chan_sip to a non existing 90xxx endpoint.

No. This is not true. The reasoning is that webrtc requires certain settings to be different than a normal extension. These settings conflict with normal extensions. So you still need two separate extension.

This is also not entirely true. Only one sip driver can support webrtc at a time. Either chan sip or chan pjsip. It doesn’t support both. There is a setting in advanced settings that controls which driver is used for webrtc.

Softphones don’t connect via the channel driver, they connect via the port. If you have Chan-SIP running on 5160 and PJ-SIP running on 5060, and you connect to the standard SIP port, you will connect via PJ-SIP.

In terms of this it’s Zulu. And it uses webrtc. There is only one port and one driver.

So if I am using pjsip for my extensions, will Zulu soft phone and future Zulu mobile app work?

This is relevant for me when setting up new systems.

Zulu 3.0 uses PJSIP for the websocket connections and FreePBX is moving forward will be requiring PJSIP to be the default channel driver for the websocket server.

This has no bearing on extensions. You can have a chan_sip or pjsip or iax or dahdi extension, it doesn’t matter to the WebRTC module or the Zulu module. All that matters is what the websocket server is set to in advanced settings.

Again. You can have mix-matched extensions on your system, this is irrelevant to Zulu.

This is another reason why we create 90xxx extensions. It allows you to not be forced to use chansip or pjsip only for your extensions. Extension 400 can be chansip, if the websocket driver is set to pjsip then 90400 will be pjsip but this won’t affect your extensions.

I did not find a specific WebRTC driver setting in Advanced settings, neither is SIP general settings or chan_SIP/pjsip. Looks like (at least in FreePBX version 13) WebRTC uses the default SIP driver. If this is set to chan_sip, then ZULU uses chan_sip, if set to pjsip then it uses pjsip.

This means you can use chan_sip and pjsip in the same system, but every time you create a new ZULU user you have to check and possibly change this default setting beforehand - otherwise your ZULU user is trying to register on the wrong SIP driver.

I would expect that a ZULU user automatically inherits the SIP driver of the linked extension.

It’s a read only setting which you can change by turning on read only settings. [quote=“woodpecker505, post:9, topic:40391”]
This means you can use chan_sip and pjsip in the same system, but every time you create a new ZULU user you have to check and possibly change this default setting beforehand - otherwise your ZULU user is trying to register on the wrong SIP driver.

I would expect that a ZULU user automatically inherits the SIP driver of the linked extension.
[/quote]

That’s not how it works. I already explained this but the websocket server portion of asterisk can only be one sip driver type. Since the extensions are linked but not the same, the extensions can be a different technology type than the webrtc extension and everything will work fine.

If you have the websocket driver at chan sip. Then you go and change the 90xxx extension to pjsip you will break the system. The webrtc extension needs to match the websocket sip driver.

This is how it’s been working and designed since the Zulu project started and before that the webrtc module for ucp.

Source: I’m the lead developer of freepbx and the Zulu server project.

Just curious. What is your end goal here?

I’m trying out Zulu softclient on 2 different systems with pjsip extensions and chan_sip. Zulu softclient was working on the first system for an extension with pjsip driver and pjsip as standard SIP driver in Asterisk SIP settings. But it failed on the second system for a pjsip extension. I found out that the second system still had chan_sip in the default SIP setting. Even under the read-only settings I do not see a WebRTC default driver. As said before : I use FreePBX 13 - not 14 - is that why maybe ?

My end goal is using PJSIP for IPphones and Zulu as PC softclient, but I’m not yet 100% sure that PJSIP is not giving any issues in combination with WebRTC, so that’s why I’m still testing with Chan-SIP as well.

The setting exists in both 13 and 14 of freepbx

As for your testing. Zulu 2.0 only supports chan sip. Pjsip is not a supported model until Zulu 3.0. Youll have issues because Zulu server doesn’t configure pjsip extensions correctly until 3.0

Furthermore when the websocket setting is changed there’s more work you have to do to get it to load. Like manually loading the pjsip websocket driver. Then changing all of your webrtc extensions to pjsip manually.

You really can’t be sure what driver asterisk is using for websocket if you have both enabled.

My experience with FreePBX V13, using pjsip and Zulu 2.1.15 so far is different as explained above. Since I did not find that WebRTC driver setting (and still don’t) I played with the default Asterisk SIP setting and when set to pjsip and also my extensions set to pjsip then I have not seen issues so far.

Simply put pjsip is not supported with Zulu 2.x. So you are on your own in regards to support there or issues