Inbound call error


I try to connect my line from my provider to my pjsip asterisk.

So, call a extern number is OK but if i call my number from a external number i have this error :

[Jul  9 08:50:26] NOTICE[82326]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '"+324****" <sip:0032****;user=phone>' failed for '91.121.***.**:5060' (callid: - Failed to authenticate

Here is my configuration :


type = registration
server_uri =
client_uri = sip:0032*********
contact_user = inbound-call
outbound_auth = OVH
auth_rejection_permanent = no
retry_interval = 30
forbidden_retry_interval = 300
max_retries = 20

endpoint: OVH Not in use 0 of inf
OutAuth: OVH/00324*******
InAuth: OVH/00324*******
Aor: OVH 0
Contact: OVH/ e98e21f2cd Avail 17.896
Transport: transport-udp udp 0 0
Identify: OVH/OVH
Match: 91.121.*./32

Aor: OVH 0
Contact: OVH/ e98e21f2cd Avail 22.500

ID auth_type Password realm username
OVH userpass ************ 00324********

Registration with pjsip is realy new for me,I don’t have all the knowledge yet


Does the IP address that the request came from match the IP address in your match in the identify?

I think yes :

Provides generally don’t support configurations with auth=. Although you seem to hve switched from the actual configuration to a report of it, I think that is InAuth in your configuration.

I’m sorry but I didn’t understand everything

I just follow this :

Before i use register => and one peers for make my connection to my providers

Now, if I understand correctly, I need to create à endpoint with a auth and a register for make outgoing call. But, if i want to receive call from the number provide by my provider.
What are the things to configure?

You need outbound_auth for outbound calls via a typical provider.

For inbound calls, you should only have auth if the provider authorises themselves to you. I have never heard of a provider doing this, but it would be a reasonable thing to do if you owned both ends.

I use the number as a “”“trunk”"" if you prefer

With SIP I make outbound call with a simple “endpoint” like that :


and for inbound call I make that :

register => 77********:PASSWORD@sip.*****.be

So, in PJSIP, for outbound call I make a transport, a registration, an endpoint, an aor and an auth.

How can I “convert” my "register => … " in PJSIP ?

There is no way to receive calls with PJSIP? Can we just make outbound ?

In chan_sip, insecure=invite disables inbound authentication. Nowadays it would be better to use remote_secret instead. (insecure=port is the result of copy and paste coding of code designed to disable as many security checks as possible to avoid calls failing because of them).

outbound_auth on chan_pjsip corresponds to remote_secret for chan_sip. However, my reading of the documentation is that auth does not correspond exactly to secret, as the former only applies to inbound calls, whereas the latter applies to both ways, unless disabled, for inbound calls, with insecure-invite, or overridden, with remote_secret.

So, now its work

I had already configured my ps_endpoint_id_ips table with a match of the providers address but I redirected to the endpoint which was used for outgoing calls (with an auth)

So I redid a new endpoint without anything just the name the transport and the context and I put this endpoint in the table ps_endpoint_id_ips to match with the address of the provider

Thank you very much you saved my week

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