# Astersik PJSIP incoming Rejection

**URL:** <https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521>\
**Category:** Asterisk SIP\
**Created:** [May 6, 2021, 4:58pm UTC](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521 "2021-05-06T16:58:42Z")\
**Posts on this page:** 5\
**Page:** 2

<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:** [May 6, 2021, 10:55pm UTC](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521/21 "2021-05-06T22:55:06Z")

</div>

Can you not use the technique used with chan\_sip, of having all the trunks enter by the same context, and separating them based on the contact user provided when you registered. It is possible that you would have to choose one for the IP address match, and put something harmless in the other ones.

However, I still think you have the wrong product.

---

<div class="post-metadata">

**Author:** ![ucin](https://avatars.discourse-cdn.com/v4/letter/u/e47c2d/32.png) [@ucin](https://community.asterisk.org/u/ucin)\
**Post date:** [May 7, 2021, 5:53am UTC](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521/22 "2021-05-07T05:53:26Z")

</div>

hi, yes the currently not working trunks do work when registered via softphone. They do receive incoming calls.

All endpoints are 1/1 identical , I have checked them over and over again. I generate the sql insert statement from file, so I know all settings are the same because the only thing that does change is the trunk number and password.

---

<div class="post-metadata">

**Author:** ![ucin](https://avatars.discourse-cdn.com/v4/letter/u/e47c2d/32.png) [@ucin](https://community.asterisk.org/u/ucin)\
**Post date:** [May 7, 2021, 6:22am UTC](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521/23 "2021-05-07T06:22:17Z")

</div>

Hi , I tried this approach . I added the not working (for inbound) trunks to the same context and added the IP as the match parameter. When I do this, I get 404 not found. When I inspected the debug log, it was trying to match the call from trunk A to trunk B and still says “extension not found in context test(this was the context I made up)” if I remove the IP and try to match it via SIPheader: /number/, then I keep getting 401 not authorized. Strange as I did not define any auth (for incoming).

---

<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:** [May 7, 2021, 10:03am UTC](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521/24 "2021-05-07T10:03:33Z")

</div>

The authorisation request will be to confuse attackers. It stops them distinguishing between unknown users and valid users with incorrect passwords.

---

<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:** [June 6, 2021, 10:04am UTC](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521/25 "2021-06-06T10:04:22Z")

</div>

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

[Previous page](https://community.asterisk.org/t/astersik-pjsip-incoming-rejection/88521.md?page=1)
