I have created two endpoints:
- 1000 (normal sip client) with auth (username=1000) and transport protocol udp
- 1001 (webrtc client) with auth (username=1001) and transport protocol wss
This configuration works OK and webrtc client connects to 1001 and non webrtc connects to 1000.
No lets say that this is the same agent that would like to have the same user name/psw (1000) and will be able to connect using both different protocols. So when 1000 connects over webrtc, endpoint containing transport=transport_wss with all other webrtc settings will be selected, otherwise udp endpoint will be selected.
I have played with different configuration but was not able to make this working. If I set same auth for both endpoints, I can see that webrtc client connects to udp endpoint what will obviously not work.
It looks like that transport configuration has no influence in endpoint selection!
The only solution I see is using identify_by header and then adding some specific header in webrtc client. I haven’t tested this, but it is also far from being clean solution.
Hi,
thanks, so for now I will try to use identify_by header. The problem with this method is that it is difficult to guarantee header values from clients that are not under your control.
So maybe it will be welcome addition to make identification based on protocol because webrtc client should be able to connect only to endpoint supporting webrtc protocol.
Hi @jcolp the identify on header would be acceptable to me. But I dont seem to be able to create multiple endpoint-configuration using pjsip_wizard.conf, can you confirm?
correct me if I’m wrong, but i have the same usecase as edvinv: I want one user (e.g. 1000) to login either via a sip-softphone or webrtc with the same credentials. Likewise, if someone calls the extension 1000 both the sip-softphone and webrtc should ring.
So my understanding is I have to create two endpoint configurations for the same user; one for the sip softphone and one for the webrtc. Is that correct?
PJSIP does not allow you to create two users with differing configuration, be it with wizards or standalone configuration file. They have to be separate.
Okay, unfortunate. Thanks for your quick responses!
Maybe I can hack something together in extensions.conf, e.g. when you dial 1000 both the softphone_1000 and webrtc_1000 user will be dialed…
You can add variables to your pjsip_wizard config to help with this…
; the "primary" webrtc line
[1000]
type = wizard
@alsoring = softphone_1000
Any variable starting with “@” is ignored.
Then in extensions.conf, when someone dials 1000 you can use the AST_CONFIG function to look up the @alsoring variable in context 1000 and add it to the dial string.
You could also create a hint in the dialplan that has both endpoint names in it…