Asterisk v16.2.1 on Ubuntu 20.04
SIP trunk provider: voip.ms
voip.ms allows you to enable the sending and receiving of SMS messages over an SMS trunk. I have followed their Wikis and my configurations (below) are taken from them. I am unable to receive SMSs (have not tried sending yet). I have verified I can receive voice calls at the DID.
When I turn on the PJSIP logger, I see the following messages for an incoming SMS. This makes me suspect I have mis-configured somehow:
This is both inbound and outbound authentication. I’m not aware of any ITSP that supports inbound authentication, however your log is incomplete, and doesn’t show whether or not voip.ms acts on Asterisk’s challenge for inbound authentication.
Surely voip.ms is not sufficiently broken to require rtp_symmetric, and rewrite_contact. These deliberately violate SIP and SDP in order to cope with broken NAT implementations, at the far end.
I also don’t see an identify section, which is also likely to result in a (faked) challenge for inbound authentication. (Faked so as not to give away to an attacker that the user name is invalid.)
David: Thanks for the response. I had only posted a snippet of my pjsip.conf, but can see that was not helpful. Below is the full config. Note that I modified the NAT parameters as per your suggestion and verified voice calling still works.
pjsip.conf
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[voipms]
type = registration
transport = transport-udp
outbound_auth = voipms
client_uri = sip:USERNAME@montreal1.voip.ms:5060
server_uri = sip:montreal1.voip.ms:5060
[voipms]
type = auth
auth_type = userpass
username = USERNAME
password = PASSWORD
[voipms]
type = aor
contact = sip:USERNAME@montreal1.voip.ms
[voipms]
type = endpoint
transport = transport-udp
context = voipms-inbound
message_context = voipms-sms-in
disallow = all
allow = ulaw
from_user = USERNAME
auth = voipms
outbound_auth = voipms
aors = voipms
[voipms]
type = identify
endpoint = voipms
match = montreal1.voip.ms
Below is the logs for an incoming SMS message… hopefully more complete: