Hello,
I’m new to Asterisk and SIP telephony in general, trying to build a web Softphone,
I setup asterisk and added my WebRTC endpoints, so that I can make Local calls between them.
Now I just got a provider SIP account (Username/Password and server address…), My account works fine in other Softphones.
When I try to call to receive calls, I can see that mys server is receiving the INVITE request from the provider but then it returns a 401 Unauthorized Tried many solutions but nothing seems to work, since I’m new to the domain so I’m not sure how can I fix this
In particular, for chan_pjsip, which you should be using, you should only specify outbound authentication and for chan_sip, which you should be moving away from, you should use remotesecret, rather than secret (although you will see an older method, insecure=invite, in most examples on the internet, but those examples usually have lots of bad practice).
In general, service providers expect you to take them on trust, even though they will ask you to prove who you are.
As I said, I’m a newbie to the domain tried setting up NAT, but I don’t really know how to do so,
I thought that if there is a network problem then I won’t receive any request,
Wrong NAT settings will generally cause calls to break some time into the call, e.g. you might have no or one way audio, and the call might drop at 30 seconds, when retransmissions of response or ACK time out.
Got you, any suggestion on what I’m doing wrong here; as you said you have no endpoint, I didn’t understand what you mean, since my endpoint is configured and logged in from the softphone.
In PJSIP an endpoint section defines the configuration to use when talking to something remote (like an ITSP). You don’t have one for the ITSP, you have an identify section which says to use the configuration of a WebRTC client for talking to your ITSP, and it also says to challenge them for authentication. That’s probably not what is needed. The wiki has an example for an ITSP endpoint[1].