SIP/2.0 403 Forbidden in openhab call

I have a doorbird doorbell with SIP enabled. asterisk is configured to route calls to the doorbird.

I can call the doorbird from the notebook using zoiper. that works.

I have also setup an openhab sipclient. the sip client requires a websocket and I have configured a webrtc endpoint in asterisk. Calling from openhab and the sipclient does not work.

I have switched on the pjsip logger in asterisk-cli

when calling from openhab I get the message “SIP/2.0 403 Forbidden” and “Hangupcause 21” and “Everyone is busy/congested at this time (1:0/0/1)”

here is the logging output from asterisk-cli


    -- Executing [6001@internal:1] NoOp("PJSIP/webrtc_client-00000022", "Call Doorbird") in new stack
    -- Executing [6001@internal:2] Dial("PJSIP/webrtc_client-00000022", "PJSIP/doorbird,20") in new stack
<--- Transmitting SIP request (945 bytes) to UDP:192.168.2.131:5060 --->
INVITE sip:doorbird@192.168.2.131:5060;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.2.209:5060;rport;branch=z9hG4bKPjf6c6e5ac-b6d6-489d-b96e-193feb22b558
From: <sip:webrtc_client@192.168.2.209>;tag=73a8ae98-c1e3-44d2-9ef3-1f9b87c4b39a
To: <sip:doorbird@192.168.2.131;ob>
Contact: <sip:asterisk@192.168.2.209:5060>
Call-ID: c383bcda-1aed-4dc5-b4b4-1c9516290175
CSeq: 4325 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, INFO, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: AsteriskTZ
Content-Type: application/sdp
Content-Length:   261

v=0
o=- 247690272 247690272 IN IP4 192.168.2.209
s=Asterisk
c=IN IP4 192.168.2.209
t=0 0
m=audio 11496 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

    -- Called PJSIP/doorbird
<--- Received SIP response (351 bytes) from UDP:192.168.2.131:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.209:5060;rport=5060;received=192.168.2.209;branch=z9hG4bKPjf6c6e5ac-b6d6-489d-b96e-193feb22b558
Call-ID: c383bcda-1aed-4dc5-b4b4-1c9516290175
From: <sip:webrtc_client@192.168.2.209>;tag=73a8ae98-c1e3-44d2-9ef3-1f9b87c4b39a
To: <sip:doorbird@192.168.2.131;ob>
CSeq: 4325 INVITE
Content-Length:  0


<--- Received SIP response (395 bytes) from UDP:192.168.2.131:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.2.209:5060;rport=5060;received=192.168.2.209;branch=z9hG4bKPjf6c6e5ac-b6d6-489d-b96e-193feb22b558
Call-ID: c383bcda-1aed-4dc5-b4b4-1c9516290175
From: <sip:webrtc_client@192.168.2.209>;tag=73a8ae98-c1e3-44d2-9ef3-1f9b87c4b39a
To: <sip:doorbird@192.168.2.131;ob>;tag=dd8ddb58-e404-4c75-9d86-357b9c0b9381
CSeq: 4325 INVITE
Content-Length:  0


<--- Transmitting SIP request (431 bytes) to UDP:192.168.2.131:5060 --->
ACK sip:doorbird@192.168.2.131:5060;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.2.209:5060;rport;branch=z9hG4bKPjf6c6e5ac-b6d6-489d-b96e-193feb22b558
From: <sip:webrtc_client@192.168.2.209>;tag=73a8ae98-c1e3-44d2-9ef3-1f9b87c4b39a
To: <sip:doorbird@192.168.2.131;ob>;tag=dd8ddb58-e404-4c75-9d86-357b9c0b9381
Call-ID: c383bcda-1aed-4dc5-b4b4-1c9516290175
CSeq: 4325 ACK
Max-Forwards: 70
User-Agent: AsteriskTZ
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [6001@internal:3] NoOp("PJSIP/webrtc_client-00000022", "Status: 21") in new stack
    -- Executing [6001@internal:4] Hangup("PJSIP/webrtc_client-00000022", "") in new stack
  == Spawn extension (internal, 6001, 4) exited non-zero on 'PJSIP/webrtc_client-00000022'
<--- Transmitting SIP response (361 bytes) to WSS:192.168.2.185:51032 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/WSS 3uo5rsnt6ljj.invalid;rport=51032;received=192.168.2.185;branch=z9hG4bK832155
Call-ID: s7dvsg0ilp4vosr1q6u6
From: <sip:webrtc_client@192.168.2.209>;tag=fo6ptae3te
To: <sip:6001@192.168.2.209>;tag=3c75afa6-3376-470c-aff5-fdcf14f0e383
CSeq: 6293 INVITE
Server: AsteriskTZ
Reason: Q.850;cause=21
Content-Length:  0



My dialplan (doorbird is 6001)

exten => 6001,1,NoOp(Call Doorbird)
same =>  n,Dial(PJSIP/doorbird,20)
same =>  n,NoOp(Status: ${HANGUPCAUSE})
same =>  n,Hangup()

this is my pjsip.conf for the webrtc user

[webrtc_client]
type=aor
max_contacts=5
remove_existing=yes
;contact=sip:webrtc_user@dynamic

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

[webrtc_client]
type=endpoint
aors=webrtc_client
auth=webrtc_client
dtls_auto_generate_cert=yes
webrtc=yes
;transport=transport-wss
context=internal
disallow=all
allow=ulaw,opus

I’m very shure that I have the correct username/passwords in my openhab-client. What can be the problem ?

The 403 is coming from the doorbird, so isolating the difference between the working and non-working case would be needed. You haven’t provided the working case so we can’t compare.

The doorbird has rejected the call. That’s a doorbird issue, not an Asterisk one.

ok solved. The doorbird did not have my endpoint as allowed user. Changed this and now calling the doorbird works

Thanks

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