So in Microsoft Azure we have Communication Services which allow to connect direct routing VIA SBC. almost same as MS TEAMS.
So i tried to connect Asterisk with ACS and after alot of search i am not able to find anyone who did it before but i found TEAMS so i followed same method.
i installed latest asterisk on ubuntu 24. and did everything but i am facing option that my INCOMING route is unreachable yet..
this is error its giving
<— Transmitting SIP request (480 bytes) to TLS:52.114.132.46:5061 —>
OPTIONS sip:sip.pstnhub.microsoft.com:5061 SIP/2.0
Via: SIP/2.0/TLS sbc.voippro.online:5061;rport;branch=z9hG4bKPj74434848-b82d-4f48-a158-337842a96c76;alias
From: sip:acs-out@sbc.voippro.online;tag=b23dcc67-7743-4e49-8854-a1855c4d0237
To: sip:sip.pstnhub.microsoft.com
Contact: sip:acs-out@sbc.voippro.online:5061;transport=TLS
Call-ID: aa6493d1-6ea9-4a61-9ccf-5bc6a2bd3879
CSeq: 52920 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 22.3.0
Content-Length: 0
<— Received SIP response (429 bytes) from TLS:52.114.132.46:5061 —>
SIP/2.0 200 OK
FROM: sip:acs-out@sbc.voippro.online;tag=b23dcc67-7743-4e49-8854-a1855c4d0237
TO: sip:sip.pstnhub.microsoft.com
CSEQ: 52920 OPTIONS
CALL-ID: aa6493d1-6ea9-4a61-9ccf-5bc6a2bd3879
VIA: SIP/2.0/TLS sbc.voippro.online:5061;branch=z9hG4bKPj74434848-b82d-4f48-a158-337842a96c76;rport
CONTENT-LENGTH: 0
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
SERVER: Microsoft.PSTNHub.SIPProxy v.2025.3.31.2 i.USEA.12
<— Received SIP request (525 bytes) from TLS:52.114.132.46:18630 —>
OPTIONS sip:acs-out@sbc.voippro.online:5061;transport=TLS SIP/2.0
FROM: sip:sip-du-a-us.pstnhub.microsoft.com:5061;tag=75c18da6-4b90-4639-9bfc-860cf8ffb0c8
TO: sip:acs-out@sbc.voippro.online
CSEQ: 1 OPTIONS
CALL-ID: 188496e9-7178-49d3-adee-aa92bf45b9b1
MAX-FORWARDS: 70
VIA: SIP/2.0/TLS 52.114.132.46:5061;branch=z9hG4bKbf94e71b
CONTACT: sip:sip-du-a-us.pstnhub.microsoft.com:5061
CONTENT-LENGTH: 0
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2025.3.31.2 i.USEA.12
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
<— Transmitting SIP response (870 bytes) to TLS:52.114.132.46:18630 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/TLS 52.114.132.46:5061;rport=18630;received=52.114.132.46;branch=z9hG4bKbf94e71b
Call-ID: 188496e9-7178-49d3-adee-aa92bf45b9b1
From: sip:sip-du-a-us.pstnhub.microsoft.com;tag=75c18da6-4b90-4639-9bfc-860cf8ffb0c8
To: sip:acs-out@sbc.voippro.online;tag=z9hG4bKbf94e71b
CSeq: 1 OPTIONS
Accept: application/xpidf+xml, application/cpim-pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: identity
Accept-Language: en
Server: Asterisk PBX 22.3.0
Content-Length: 0
As you see acs-out is reachable but when we get request from ACS my asterisk giving 404 not found. ACS should send request as “acs-in” cuz thats what my endpoint in pjsip but i dont know what went wrong and its sending as acs-out
HERE IS MY PJSIP.CONF
[global]
user_agent=Asterisk PBX
tlslog=yes
; UDP Transport (for Eyebeam)
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5061
; TLS Transport (for Azure ACS)
[transport-tls]
type=transport
protocol=tls
method=tlsv1_2
bind=0.0.0.0:5061
cert_file=/etc/letsencrypt/live/sbc.vzpro.pro/cert.pem
priv_key_file=/etc/letsencrypt/live/sbc.vzpro.pro/privkey.pem
ca_list_file=/etc/letsencrypt/live/sbc.vzpro.pro/fullchain.pem
;ca_list_file=/etc/asterisk/keys/microsoft_root.pem
;cipher=ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
local_net=10.0.0.0/8,192.168.0.0/16
external_media_address=MY IP
external_signaling_address=MY IP
verify_server=no
; Azure ACS Outbound
[acs-out]
type=endpoint
transport=transport-tls
context=azure
disallow=all
allow=ulaw
allow=alaw
media_encryption=sdes
from_domain=sbc.vzpro.pro
refer_blind_progress=no
aors=acs-out
[acs-out]
type=aor
contact=sip:sip.pstnhub.microsoft.com:5061
qualify_frequency=30
;Azure ACS Inbound
[acs-in]
type=endpoint
transport=transport-tls
context=azure
disallow=all
allow=g722,alaw,ulaw
media_encryption=sdes
refer_blind_progress=no
[acs-in]
type=identify
endpoint=acs-in
match=sip-all.pstnhub.microsoft.com
SO PLEASE HELP ME FIND OUT WHATS WRONG HERE..
if everything sounds right here then only problem can be my SSL CERTS which i generated by following
certbot certonly
–manual
–preferred-challenges dns
–server “https://api.buypass.com/acme/directory”
-d sbc.vzpro.pro
if this certs wont work please guide me where can i generate free ssl for my domain..
THANK YOU