Inbound call error

Hi,

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****@sip5.ovh.be;user=phone>' failed for '91.121.***.**:5060' (callid: 22100-RU-0e1ef66f-423565c04@sip5.ovh.be) - Failed to authenticate

Here is my configuration :

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
local_net=192.168.13.0/24
external_media_address=MyIp
external_signaling_address=MyIp

[OVH]
type = registration
server_uri = sip:sip5.ovh.be
client_uri = sip:0032*********@sip5.ovh.be
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/sip:sip5.ovh.be e98e21f2cd Avail 17.896
Transport: transport-udp udp 0 0 0.0.0.0:5060
Identify: OVH/OVH
Match: 91.121.*./32

Aor: OVH 0
Contact: OVH/sip:sip5.ovh.be e98e21f2cd Avail 22.500

auth
ID auth_type Password realm username
OVH userpass ************ sip5.ovh.be 00324********

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

thanks

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

I think yes : https://prnt.sc/ter4ko

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 :
https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
https://wiki.asterisk.org/wiki/display/AST/Configuring+Outbound+Registrations

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 :

[appel_out_LGE]
type=peer
host=sip.XX.be
username=77********
authuser=77*******
fromuser=77*******
secret=Password
fromdomain=sip.*****.be
insecure=invite,port

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.