I am wondering what could be the possible reasons for a 403 error when making a call. The call is ended immediately and 403 is returned. The peer name and password are correct and it doesn’t happen all the time.
A reattempt to make the same call again always succeeds.
Look at the logs (turn up the verbosity level if needed) to see why it is returning 403.
However, my guess is you have just discovered why you should, almost never, use type=friend for chan_sip. (If using chan_pjsip, please say, and we will leave it to the PJSIP experts.)