Chan_sip / chan_pjsip error

Hello ALL,

Have strange problem. My extension couldn’t get service from Asterisk. Have next message:

NOTICE[4141]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from ‘“101” sip:101@192.168.0.15’ failed for ‘192.168.0.5:51775’ (callid: 81564ZmVhNDZkZjg1YzA1Nzc4MjZmODdmMmFkZWE0MDMxMGU) - No matching endpoint found

Where 101 is my internal number (extension)
Also have:
res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from ‘“5298617” sip:5298617@10.238.7.130’ failed for ‘202.10.4.169:5060’ (callid: 85a1871995759c62745feecb552901488a3783ed) - No matching endpoint found

Which is my trunk.

However I have this number under chan_sip driver
This is from DB
MariaDB [asterisk]> select * from sip where id=101;
±----±-----------------±----------------±------+
| id | keyword | data | flags |
±----±-----------------±----------------±------+
| 101 | pickupgroup | 1 | 23 |
| 101 | disallow | | 24 |
| 101 | allow | | 25 |
| 101 | icesupport | no | 20 |
| 101 | encryption | no | 21 |
| 101 | callgroup | 1 | 22 |
| 101 | avpf | no | 18 |
| 101 | force_avp | no | 19 |
| 101 | sendrpid | no | 11 |
| 101 | type | friend | 12 |
| 101 | nat | no | 13 |
| 101 | port | 5060 | 14 |
| 101 | qualify | yes | 15 |
| 101 | qualifyfreq | 60 | 16 |
| 101 | transport | udp,tcp,tls | 17 |
| 101 | dial | SIP/101 | 26 |
| 101 | sipdriver | chan_sip | 2 |
| 101 | secret_origional | secret123 | 3 |
| 101 | secret | secret123 | 4 |
| 101 | dtmfmode | rfc2833 | 5 |
| 101 | canreinvite | no | 6 |
| 101 | context | from-internal | 7 |
| 101 | host | dynamic | 8 |
| 101 | trustrpid | yes | 9 |
| 101 | mediaencryption | no | 10 |
| 101 | callerid | device <101> | 31 |
| 101 | account | 101 | 30 |
| 101 | permit | 0.0.0.0/0.0.0.0 | 29 |
| 101 | deny | 0.0.0.0/0.0.0.0 | 28 |
| 101 | accountcode | | 27 |
±----±-----------------±----------------±------+

less ./sip_additional.conf

[101]
deny=0.0.0.0/0.0.0.0
secret=secret123
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
mediaencryption=no
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp,tls
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=1
pickupgroup=1
dial=SIP/101
permit=0.0.0.0/0.0.0.0
callerid=Second <101>
callcounter=yes
faxdetect=no

And there is nothing into pjsip configs
[root@voipserv Thu Jan 12 18:01:38 asterisk]# grep -Hi ‘101’ ./pjsip
[root@voipserv Thu Jan 12 18:02:04 asterisk]# pwd
/etc/asterisk
[root@voipserv Thu Jan 12 18:02:08 asterisk]#

It was pjsip before my upgrade, but I decided to com back to chan_sip and now I have this. Looks like system still decides there is pjsip.

Do you have ideas, please?

Thank you in advance,
Ivan

Just unload all the pjsip modules if you don’t need them - manually using module unload or using noload in /etc/asterisk/modules.conf

Or remove all config (transports) from pjsip.conf so it doesn’t listen on 5060.

Are you using FreePBX? If so you should use their methods for disabling PJSIP or changing its port. As it is chan_pjsip is configured to listen on port 5060 probably, which is where you device is contacting.

Thanks a lot guys! I put noload info in modules.conf and it solve the problem, but I have another one.

When I do:

voipservCLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
0 SIP registrations.
voipserv
CLI> sip show channelstats
Peer Call ID Duration Recv: Pack Lost ( %) Jitter Send: Pack Lost ( %) Jitter
0 active SIP channels
voipservCLI> quit
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@voipserv Mon Jan 16 20:23:07 ~]# netstat -tnupl
udp 0 0 0.0.0.0:4520 0.0.0.0:
1809/asterisk
udp 0 0 0.0.0.0:4569 0.0.0.0:* 1809/asterisk
udp 0 0 0.0.0.0:2727 0.0.0.0:* 1809/asterisk
udp 0 0 0.0.0.0:5000 0.0.0.0:* 1809/asterisk
udp 0 0 0.0.0.0:5060 0.0.0.0:* 1809/asterisk

but in my sip_additional.conf file I have next:

[root@voipserv Mon Jan 16 20:23:12 ~]# egrep -v ‘^;|^#|^$’ /etc/asterisk/sip.conf
[general]
include sip_additional.conf
[root@voipserv Mon Jan 16 20:40:22 ~]# less /etc/asterisk/sip_additional.conf

[101]
deny=0.0.0.0/0.0.0.0
secret=secret123
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
mediaencryption=no
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp,tls
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=1
pickupgroup=1
dial=SIP/101
permit=0.0.0.0/0.0.0.0
callerid=Second <101>
callcounter=yes
faxdetect=no

[TPG]
disallow=all
host=111.10.4.123
type=friend
port=5060
insecure=invite,port
allow=alaw
context=from-trunk
qualify=yes
directmedia=no

So,as far as I understand I should have at least one user and one trunk but I see nothing and I have no idea why. Could you give me a hint, please? At least at it should be…

Thank you in advance,
Ivan

You won’t have anything in the registry unless you have either a register line or a callback extension.

I’m not sure what you mean by a trunk, as it is not an Asterisk concept.

For most configurations, everything should be type=peer. type=friend can cause misoperation under some circumstances, and can cause security problems.

You are being inconsistent with canreivinvite and directmedia. The latter is the preferred name.