# WebRTC registration failed: unable to bind contact

**URL:** <https://community.asterisk.org/t/webrtc-registration-failed-unable-to-bind-contact/100334>\
**Category:** Asterisk SIP\
**Created:** [January 5, 2024, 1:41pm UTC](https://community.asterisk.org/t/webrtc-registration-failed-unable-to-bind-contact/100334 "2024-01-05T13:41:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlejandroDumasB](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/alejandrodumasb/32/7290_2.png) [@AlejandroDumasB](https://community.asterisk.org/u/AlejandroDumasB)\
**Post date:** [January 5, 2024, 1:41pm UTC](https://community.asterisk.org/t/webrtc-registration-failed-unable-to-bind-contact/100334/1 "2024-01-05T13:41:46Z")

</div>

Hi, I’ve asterisk 18.20.0 installed, and I’m trying to register a webrtc endpoint with this pjsip configuration.

```auto
[general]
udpbindaddr = 0.0.0.0

[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0:8089

[webrtc_client]
type=aor
max_contacts=1
remove_existing=yes

[webrtc_client]
type=auth
auth_type=userpass
username=webrtc_client
password=webrtc_client

[webrtc_client]
type=endpoint
aors=webrtc_client
outbound_auth=webrtc_client
dtls_auto_generate_cert=yes
webrtc=yes
context=xentric-test-env
transport=transport-wss
disallow=all
allow=ulaw,alaw,gsm
direct_media=no
ice_support=yes

```

Trying to connect from the browser, I got this Error:

```auto
[Jan 5 13:22:15] == WebSocket connection from 'xx.xx.xx.31:45542' for protocol 'sip' accepted using version '13'
[Jan 5 13:22:15] <--- Received SIP request (587 bytes) from WSS:xx.xx.xx.31:45542 --->
[Jan 5 13:22:15] REGISTER sip:xx.xx.xx.187 SIP/2.0
[Jan 5 13:22:15] Via: SIP/2.0/WSS 190l58ipsvtm.invalid;branch=z9hG4bK8413957
[Jan 5 13:22:15] Max-Forwards: 69
[Jan 5 13:22:15] To: <sip:webrtc_client@xx.xx.xx.187>
[Jan 5 13:22:15] From: "webrtc_client" <sip:webrtc_client@xx.xx.xx.187>;tag=ka0ri1ckch
[Jan 5 13:22:15] Call-ID: 9fe8jjl0giacocalb7fnf3
[Jan 5 13:22:15] CSeq: 1 REGISTER
[Jan 5 13:22:15] Contact: <sip:qrigmur6@190l58ipsvtm.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:166aa563-867e-4480-ac3b-92415beaa923>";expires=600
[Jan 5 13:22:15] Expires: 600
[Jan 5 13:22:15] Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
[Jan 5 13:22:15] Supported: path,gruu,outbound
[Jan 5 13:22:15] User-Agent: JsSIP 3.10.0
[Jan 5 13:22:15] Content-Length: 0
[Jan 5 13:22:15] 
[Jan 5 13:22:15] 
[Jan 5 13:22:15] WARNING[847519]: db.c:360 ast_db_put: Couldn't execute statement: SQL logic error
[Jan 5 13:22:15] ERROR[847519]: res_pjsip_registrar.c:861 register_aor_core: Unable to bind contact 'sip:qrigmur6@xx.xx.xx.31:45542;transport=ws;x-ast-orig-host=190l58ipsvtm.invalid:0' to AOR 'webrtc_client'
[Jan 5 13:22:15] <--- Transmitting SIP response (389 bytes) to WSS:xx.xx.xx.31:45542 --->
[Jan 5 13:22:15] SIP/2.0 200 OK
[Jan 5 13:22:15] Via: SIP/2.0/WSS 190l58ipsvtm.invalid;rport=45542;received=xx.xx.xx.31;branch=z9hG4bK8413957
[Jan 5 13:22:15] Call-ID: 9fe8jjl0giacocalb7fnf3
[Jan 5 13:22:15] From: "webrtc_client" <sip:webrtc_client@xx.xx.xx.187>;tag=ka0ri1ckch
[Jan 5 13:22:15] To: <sip:webrtc_client@xx.xx.xx.187>;tag=z9hG4bK8413957
[Jan 5 13:22:15] CSeq: 1 REGISTER
[Jan 5 13:22:15] Date: Fri, 05 Jan 2024 13:22:15 GMT
[Jan 5 13:22:15] Expires: 600
[Jan 5 13:22:15] Server: Asterisk PBX 18.20.0
[Jan 5 13:22:15] Content-Length: 0
[Jan 5 13:22:15] 
[Jan 5 13:22:15] 
[Jan 5 13:22:18] == WebSocket connection from 'xx.xx.xx.31:45542' closed

```

I’have been trying different solutions for a week, but nothing seems to work out.

---

<div class="post-metadata">

**Author:** ![penguinpbx](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/penguinpbx/32/8856_2.png) [@penguinpbx](https://community.asterisk.org/u/penguinpbx)\
**Post date:** [January 17, 2024, 11:08pm UTC](https://community.asterisk.org/t/webrtc-registration-failed-unable-to-bind-contact/100334/2 "2024-01-17T23:08:03Z")

</div>

Howdy!

Excellent scrubbing of your IPs from the logs!

> [@AlejandroDumasB](#):
>
> ```auto
> [general]
> udpbindaddr = 0.0.0.0
> 
> ```

Does that even load ? It looks like some old chan\_sip stuff, not chan\_pjsip. Maybe take it out…

> [@AlejandroDumasB](#):
>
> `bind=0.0.0.0:8089`

Don’t worry about the port in this section.

> [@AlejandroDumasB](#):
>
> ```auto
> username=webrtc_client
> password=webrtc_client
> 
> ```

You might want to consider changing these sooner rather than later, as they are popular defaults per the [related HOWTO in the docs](https://docs.asterisk.org/Configuration/WebRTC/Configuring-Asterisk-for-WebRTC-Clients/#configure-asterisks-built-in-http-server).

> [@AlejandroDumasB](#):
>
> `outbound_auth=webrtc_client`

Maybe try just “auth” ?

> [@AlejandroDumasB](#):
>
> `context=xentric-test-env`

Does that context exist in your extensions.conf file ?

It does appear your http.conf is correct enough because you got this far to see the SIP output in your logs, so probably no need to post that.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 16, 2024, 11:08pm UTC](https://community.asterisk.org/t/webrtc-registration-failed-unable-to-bind-contact/100334/3 "2024-02-16T23:08:59Z")

</div>

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