Hello, I want to get call from all numbers but I dont know whether should I change settings in sip.conf or extensions.conf. I have also got forwarding number from sip provider but its without any login details. I am also getting following error when trying to call on.asterisk from outside.
I got confused here. The OP says he was calling out from Asterisk, in which case the peer would generate the 401, and the user agent is VitalPBX, rather than Asterisk. However, it is a retransmission, so it must really be an incoming call to Asterisk.
For outgong calls, with chan_sip, I would suggest remotesecret is cleaner than secret+insecure. However, for a new system, chan_pjsip is better than chan_sip.
If it is up to retransmit number 10, there is something more fundamental than authentication that is broken. The OP should check the Contact header, which he seems to have missed from the protocol capture.
I thought he was talking about inbound calls so, if is inbound asterisk could challenge auth, depending on his configuration, if is outbound it is up to his Carrier to authorize the call
The log does seem to show an inbound call, but the body of the text seems to say otherwise (and the user agent didn’t contain Asterisk, or one of the well known GUIs). But, in any case, they are failing to get an ACK, so there is something more than authentication wrong.