Hey guys. I’m new to Asterisk and I’m trying to use Home Assistant + Asterisk Addon + SIP card + Asterisk integration. As a end device, I have a desktop (Chrome or Firefox) and 2 smartphones (Home Assistant companion App).
I followed the tutorial as Jordy explained very well, but I can’t find where I’m going wrong.
I can´t make calls.
In advance, I’m sorry if I didn’t know how to explain myself correctly, I’m really new to Asterisk and I’ve been reading as much as I can:
I use DuckDNS + NGINX + SSL certificates.
My browser (Chrome and Firefox)
Port Forwarding
My SIP Card
http.conf
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/asterisk/keys/fullchain.pem
tlsprivatekey=/etc/asterisk/keys/privkey.pem
pjsip.conf
[global]
; SET GLOBAL SETTINGS HERE
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
local_net=192.168.1.0/24
local_net=127.0.0.1/32
external_media_address=*<mydomain>*.duckdns.org
external_signaling_address=*<mydomain>*.duckdns.org
[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0
[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
method=tlsv1_2
cert_file=/etc/asterisk/keys/fullchain.pem
priv_key_file=/etc/asterisk/keys/privkey.pem
[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0
; AUTO GENERATED SIP.JS EXTENSIONS
#include pjsip_default.conf
; CUSTOM EXTENSIONS
#include pjsip_custom.conf
pjsip_default.conf
; DON'T MODIFY THIS FILE, IT GET'S OVERWRITTEN!
; IF YOU REALLY WANT TO CHANGE sipjs-phone OR my-codecs, YOU CAN ADD THAT IN pjsip_custom.conf OR EVEN pjsip.conf
; For additional parameters go to https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Configuration_res_pjsip
; Common AUTH parameters (template)
[sipjs-phone-auth](!)
type=auth
auth_type=userpass
password=*<mypass>*
; Common AOR parameters (template)
[sipjs-phone-aor](!)
type=aor
max_contacts=6
remove_existing=yes
remove_unavailable=yes
qualify_frequency=0
; Common ENDPOINT parameters (template)
[sipjs-phone-endpoint](!)
type=endpoint
send_rpid=yes
send_pai=yes
device_state_busy_at=1
webrtc=yes
; Setting webrtc=yes is a shortcut for setting the following options:
; use_avpf=yes
; media_encryption=dtls
; dtls_auto_generate_cert=yes (if dtls_cert_file is not set)
; dtls_verify=fingerprint
; dtls_setup=actpass
; ice_support=yes
; media_use_received_transport=yes
; rtcp_mux=yes
from_domain=asterisk
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
direct_media=no
context=default
disallow=all
allow=ulaw,alaw,speex,gsm,g726,g723,g722,opus
[100](sipjs-phone-aor)
[100](sipjs-phone-auth)
username=100
[100](sipjs-phone-endpoint)
aors=100
auth=100
callerid="junior" <100>
[101](sipjs-phone-aor)
[101](sipjs-phone-auth)
username=101
[101](sipjs-phone-endpoint)
aors=101
auth=101
callerid="pentagono" <101>
[102](sipjs-phone-aor)
[102](sipjs-phone-auth)
username=102
[102](sipjs-phone-endpoint)
aors=102
auth=102
callerid="desktop_carol" <102>
Asterisk logs (log level: NOTICE):
[Jul 14 23:41:00] WARNING[488][C-00000009]: pjsip/dialplan_functions.c:1018 pjsip_acf_dial_contacts_read: Specified endpoint '103' was not found
[Jul 14 23:41:00] -- Executing [103@default:1] Dial("PJSIP/100-00000008", "") in new stack
[Jul 14 23:41:00] -- No devices or endpoints to dial (technology/resource)
[Jul 14 23:41:00] -- Auto fallthrough, channel 'PJSIP/100-00000008' status is 'CHANUNAVAIL'
[Jul 14 23:41:04] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - No matching endpoint found
[Jul 14 23:41:04] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - No matching endpoint found
[Jul 14 23:41:04] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - Failed to authenticate
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - No matching endpoint found
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - Failed to authenticate
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - No matching endpoint found
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - Failed to authenticate
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - No matching endpoint found
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - Failed to authenticate
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - No matching endpoint found
[Jul 14 23:41:05] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:4000@192.168.31.133>' failed for '51.142.250.79:60636' (callid: 469413158-1897827147-628713520) - Failed to authenticate
[Jul 14 23:41:06] NOTICE[357]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:200@192.168.31.133>' failed for '51.142.250.79:64831' (callid: 1137233028-1187014833-730368208) - No matching endpoint found
Asterisk log (log level: ERROR )
[Jul 14 23:43:21] Asterisk Ready.
[Jul 14 23:43:21] == WebSocket connection from '177.26.250.151:30281' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:21] == WebSocket connection from '177.26.249.5:42043' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:22] == WebSocket connection from '177.26.249.5:42023' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:22] == WebSocket connection from '177.26.250.151:30303' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:22] == WebSocket connection from '177.26.250.151:30283' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:24] -- Added contact 'sip:jqaurqkm@177.26.249.5:42043;transport=ws' to AOR '100' with expiration of 600 seconds
[Jul 14 23:43:24] == Endpoint 100 is now Reachable
[Jul 14 23:43:24] -- Added contact 'sip:bchclcq8@177.26.250.151:30281;transport=ws' to AOR '100' with expiration of 600 seconds
[Jul 14 23:43:24] -- Added contact 'sip:tr80bd6h@177.26.249.5:42023;transport=ws' to AOR '100' with expiration of 600 seconds
[Jul 14 23:43:24] == WebSocket connection from '192.168.31.1:58488' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:25] -- Added contact 'sip:ueosgn35@177.26.250.151:30303;transport=ws' to AOR '100' with expiration of 600 seconds
[Jul 14 23:43:25] -- Added contact 'sip:oghqfj2k@177.26.250.151:30283;transport=ws' to AOR '100' with expiration of 600 seconds
[Jul 14 23:43:28] == WebSocket connection from '192.168.31.1:58489' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:28] == WebSocket connection from '192.168.31.1:58490' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:28] == WebSocket connection from '192.168.31.1:58492' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:28] == WebSocket connection from '192.168.31.1:58493' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:28] == WebSocket connection from '192.168.31.1:58494' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:39] == WebSocket connection from '192.168.31.1:54412' for protocol 'sip' accepted using version '13'
[Jul 14 23:43:39] -- Added contact 'sip:uhhujub0@192.168.31.1:54412;transport=ws' to AOR '102' with expiration of 600 seconds
[Jul 14 23:43:39] == Endpoint 102 is now Reachable
[Jul 14 23:44:10] ERROR[371]: pjproject: <?>: sip_transport.c Error processing 721 bytes packet from UDP 5.9.98.247:50303 : PJSIP syntax error exception when parsing 'Request Line' header on line 1 col 15:
INVITE sip:00 17037187217@192.168.31.133:5060 SIP/2.0
Via: SIP/2.0/UDP 5.9.98.247:50303;branch=z9hG4bK1330007946
Max-Forwards: 70
From: <sip:101@192.168.31.133:5060>;tag=1823830497
To: <sip:00 17037187217@192.168.31.133:5060>
Call-ID: 428647227-1645119016-1469194077
CSeq: 1 INVITE
Contact: <sip:101@5.9.98.247:50303>
Content-Type: application/sdp
Content-Length: 207
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE, UPDATE, PUBLISH
User-Agent: ims
v=0
o=101 16264 18299 IN IP4 192.168.1.83
s=call
c=IN IP4 192.168.1.83
t=0 0
m=audio 25282 RTP/AVP 0 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
-- end of packet.
[Jul 14 23:44:12] -- Executing [103@default:1] Dial("PJSIP/100-00000000", "") in new stack
[Jul 14 23:44:12] -- No devices or endpoints to dial (technology/resource)
[Jul 14 23:44:12] -- Auto fallthrough, channel 'PJSIP/100-00000000' status is 'CHANUNAVAIL'
[Jul 14 23:44:13] -- Executing [103@default:1] Dial("PJSIP/100-00000001", "") in new stack
[Jul 14 23:44:13] -- No devices or endpoints to dial (technology/resource)
[Jul 14 23:44:13] -- Auto fallthrough, channel 'PJSIP/100-00000001' status is 'CHANUNAVAIL'
[Jul 14 23:44:15] -- Executing [103@default:1] Dial("PJSIP/100-00000002", "") in new stack
[Jul 14 23:44:15] -- No devices or endpoints to dial (technology/resource)
[Jul 14 23:44:15] -- Auto fallthrough, channel 'PJSIP/100-00000002' status is 'CHANUNAVAIL'