react-native-pjsip
react-native-pjsip copied to clipboard
Example of response to 407 Proxy Auth required on INVITE
Fantastic project!
I'm playing with a UAC that requires authentication on INVITE - you send the INVITE and the response is a 407. From there we need to respond to the digest using the nonce and authentication (just the same as normal registration).
Can anyone provide an example or point me in the right direction?
I'm guessing I can do this from the makeCall
function in pjsip.js (https://github.com/datso/react-native-pjsip-app/blob/master/app/modules/pjsip.js#L392) by checking the response from endpoint.makeCall
, however I'm unsure what to do to resend the INVITE with auth.
Thanks!
Hey, you want to have a custom action for the response of INVITE ? Doesn't pjsip send another INVITE with authorization header ?
@datso
We're trying to create the correct authorisation header using the nonce and realm which is sent by the SIP server.
PJSIP does send another invite, but it's not with the correct authorisation header.
You have custom authorization algorithm ? I cannot get how not with the correct authorization header
possible
Perhaps, I've misunderstood how it works. We don't have a custom authorisation algorithm.
My impression was that on INVITE the SIP server sends a 407 Proxy Authentication Requirement, then the PJSIP client uses the nonce and realm along with the user credentials to generate a auth header and the client sends it as a response.
Is there nothing that needs to be done to create the auth header? Is that done automatically using the registered account by PJSIP?
Is that done automatically using the registered account by PJSIP?
Yeah it should
I'm stuck on this. When I try to make a call via proxy, the SIP server responds with 407 Proxy Authentication Required and PJSIP drops the call instead of responding with the Proxy-Authenticate header.
Has anyone been able to get this working?
I'm stuck on this. When I try to make a call via proxy, the SIP server responds with 407 Proxy Authentication Required and PJSIP drops the call instead of responding with the Proxy-Authenticate header.
Has anyone been able to get this working?
Same exact issue