# Inbound call error

**URL:** <https://community.asterisk.org/t/inbound-call-error/84874>\
**Category:** Asterisk SIP\
**Created:** [July 9, 2020, 1:05pm UTC](https://community.asterisk.org/t/inbound-call-error/84874 "2020-07-09T13:05:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![FRWI](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@FRWI](https://community.asterisk.org/u/FRWI)\
**Post date:** [July 9, 2020, 1:05pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/1 "2020-07-09T13:05:41Z")

</div>

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 :

```auto
[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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 9, 2020, 1:26pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/2 "2020-07-09T13:26:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FRWI](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@FRWI](https://community.asterisk.org/u/FRWI)\
**Post date:** [July 9, 2020, 1:33pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/3 "2020-07-09T13:33:24Z")

</div>

I think yes : [https://prnt.sc/ter4ko](https://prnt.sc/ter4ko)

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [July 9, 2020, 5:56pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/4 "2020-07-09T17:56:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FRWI](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@FRWI](https://community.asterisk.org/u/FRWI)\
**Post date:** [July 10, 2020, 6:44am UTC](https://community.asterisk.org/t/inbound-call-error/84874/5 "2020-07-10T06:44:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [July 10, 2020, 11:47am UTC](https://community.asterisk.org/t/inbound-call-error/84874/6 "2020-07-10T11:47:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FRWI](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@FRWI](https://community.asterisk.org/u/FRWI)\
**Post date:** [July 10, 2020, 12:09pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/7 "2020-07-10T12:09:37Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [July 10, 2020, 12:28pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/8 "2020-07-10T12:28:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FRWI](https://avatars.discourse-cdn.com/v4/letter/f/a183cd/32.png) [@FRWI](https://community.asterisk.org/u/FRWI)\
**Post date:** [July 10, 2020, 1:53pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/9 "2020-07-10T13:53:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 9, 2020, 1:53pm UTC](https://community.asterisk.org/t/inbound-call-error/84874/10 "2020-08-09T13:53:21Z")

</div>

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