Same pjsip extension for both transport-wss and transport-udp

Hi,

I’d like to know if it’s possible to have an extension/username available as both webrtc and SIP UDP.

For instance, say I want extension 100 to be available both as webrtc and SIP UDP, with the same credentials.
It doesn’t seem to be the case.

I defined webrtc and sip_udp templates in pjsip_wizard.conf and then I use both of them like so:

[100](webrtc_defaults)
hint_exten = 100
inbound_auth/username = 100
inbound_auth/password = xxx
endpoint/callerid = ID <100>

[100](user_defaults)
hint_exten = 100
inbound_auth/username = 100
inbound_auth/password = xxx
endpoint/callerid = ID <100>

The command pjsip show endpoints only shows the webrtc endpoints, so I guess the SIP UDP ones are not loaded.

No, you can not. Only 1 endpoint of a given name can exist, and only with one set of configuration.

I didn’t know there was a limitation on that. It really is too bad. Imagine a corp user who needs to use a UDP SIP softphone when at work and a webrtc client when teleworking. The user should still have the same extension regardless of the transport type.

Anyway, let’s see if I can work around this. I can use alphanumerical values for the extensions ,right?
For instance, does the following look sane?

[100](webrtc_defaults)
hint_exten = 100
inbound_auth/username = 100
inbound_auth/password = xxx
endpoint/callerid = ID <100>

[sip100](user_defaults)
hint_exten = sip100
inbound_auth/username = sip100
inbound_auth/password = xxx
endpoint/callerid = ID <100>

Yes, that would work. The reason that you can’t use the same extension is that the media configuration between WebRTC and normal SIP is vastly different, so one doesn’t work for the other. Noone has done work on figuring out a way to make things work in that scenario using a single configuration.

One think you can do is using the same endpoint with different transport leaving transport parameter empty.

Example:

use endpoint 1000 with UDP, TCP and TLS on same time, defining 3 different transports and SRTP but not mandatory.

Regards

Also, you can have the same extension; what you are referring to are not extensions, in Asterisk terminology.

There is no requirement that the device name match the extension number in extensions.conf, and there are security advantages if it does not. You can have:

exten => 100,n,Dial(PJSIP/office-sip-phone&PJSIP/home-webrtc-phone)

WebRTC media configuration doesn’t work like that, because you can’t send a call to a WebRTC endpoint with optional SRTP. It’s mandatory and the SDP has to state it as such. As a result you’d then have to send another INVITE to fallback to different behavior, which is something noone has coded.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.