Messagesend with authentication SIP/2.0 401 Unauthorized


Can someone please provide link to documentation how to send SMS with messagesend using authorization to external server(SMS GW provider)?
In particular i am looking to integrate my asterisk (11.6-cert17) with to originate sms via chan_sip(not pjsip). incoming SMS is ok, however for outgoing SMS my problem is that whatever TO and FROM i am using i am always getting 401 not authorized.


this is the response from support. I have tried with Asterisk 11 and 14 as well, still the same situation. i am getting 401 unauthorized. my server is responding 4 times to the 401 response and gives up. anyone knows which version of Asterisk is able to correctly send authenticated messages via external servers using chan_sip ?


The 401 Unauthorized response is an usual challenge made by our server on SIP reuests, after this response is sent by our server then the PBX, device, or app in use should send once more the SIP requests as reply to the 401 Unauthorized, however this may occur due to the following, which is mentioned at SIP/SMS with FreePBX - Wiki :

“The information in this page is based on the newer PJSIP channel driver. This is because the older chan_sip driver does not correctly implement authentication for SIP messaging, which is mandatory with servers for security reasons. The current version of FreePBX supports using both SIP channel drivers side by side without any issue.”


thanks in advance,

Based on their response you will be getting the 401 reply from unless you switch to PJSIP.

There are 2 problems you are using a deprecated channel driver module and a dead version of Asterisk

Asterisk 11.x

thanks for replying, agree they are dead, but should work if they were ever working, no?

i used asterisk 14 as well, and still doing the same. you may say 14 is also dead, but still, how to use messaging with authentication with external server?
anyone knows if that was ever working?


Edit: Basically i am asking if you guys can provide a documentation for it to follow to get sip sms working with authentication

ended up switching to PJSIP on ASterisk 14, however, would be interesting to make this work with chan_sip.


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