SIP/2.0 404 Not Found PJSIP Pancode

Good morning

I HAVE A FREEpbx in which below it has an asterisk in version 16. Currently one of the raised trunks that is registered when I call by phone returns a 404 error, I attach logs to see if you can tell me where I find the problem since the device that is a Pancode Telephone registers correctly but from the freePBX it does not allow calls to it since as I have indicated it returns this error. I remain at your disposal

1 Like

The logs will definitely be needed.

I’m assuming this is a machine translation error, as this device should be an extension.

Google suggests this is a door entry system, although it should look like a phone to Asterisk.

I really don’t see how you can get 404 from a device that has registered, as the device specifies which URI to use. I’m wondering if the call has been sent to the wrong destination. Alternatively there may be another machine translation problem and the failing call isn’t from Asterisk to the Pancode, but the other way round.

This should be upgraded, as it is no longer supported, however, that is unlikely to be relevant to the problem.

I attach call logs


![sip|690x97](upload://tb3FLUx9Im049iQwKB6bBBtIRtD.jpeg

The “343” should be “PancodeDon2”! What is the significance of “343”?

I suppose you might get this problem if you configured the device as a trunk, rather than an extension.

The 343 is the call that a telephone makes to PancodeDon2 to be able to talk, I have it configured like this in the outgoing routes.

Adjunto otro log de la llamada en la cual indica que el trunk esta congestionado/ocupado en estos momentos

Executing [s@func-apply-sipheaders:8] ExecIf(“PJSIP/PancodeDon2-00000849”, “0?Set(sipheader=<http:/ /127.0.0.1>;info=unset)”) in new stack
– Executing [s@func-apply-sipheaders:9] ExecIf(“PJSIP/PancodeDon2-00000849”, “0?Set(sipheader=<http:/ /127.0.0.1>unset)”) in new stack
– Executing [s@func-apply-sipheaders:10] ExecIf(“PJSIP/PancodeDon2-00000849”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack
– Executing [s@func-apply-sipheaders:11] EndWhile(“PJSIP/PancodeDon2-00000849”, “”) in new stack
– Executing [s@func-apply-sipheaders:5] While(“PJSIP/PancodeDon2-00000849”, “0”) in new stack
– Executing [s@func-apply-sipheaders:12] Return(“PJSIP/PancodeDon2-00000849”, “”) in new stack
== Spawn extension (from-pstn, 343, 1) exited non-zero on ‘PJSIP/PancodeDon2-00000849’
– PJSIP/PancodeDon2-00000849 Internal Gosub(func-apply-sipheaders,s,1(12)) complete GOSUB_RETVAL=
– Called PJSIP/343@PancodeDon2
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:37] NoOp(“PJSIP/5711-00000848”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 1”) in new stack
– Executing [s@macro-dialout-trunk:38] GotoIf(“PJSIP/5711-00000848”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“PJSIP/5711-00000848”, “RC=1”) in new stack
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“PJSIP/5711-00000848”, “1,1”) in new stack
– Goto (macro-dialout-trunk,1,1)

Cause No. l - Unallocated (unassigned) number [Q.850]
This cause indicates that the called party cannot be reached recluses (sic) although the called party number is in a valid format. It is not currently allocated (assigned).

which is the same as 404. It still comes down to you are sending 343, when the 343, when should be dialling the contact address and that is because:

you are calling it as a trunk when it should be an extension. For a trunk, FreePBX will include dialled digits, and it looks like, quite reasonably, chan_pjsip will use those to override the user part of the registered contact URI. If it didn’t, an inbound registration trunk would be unusable.

PS we prefer to have the log of the complete call. It is just luck that there is just enough to confirm what is wrong.

Good afternoon

I attach all the log I have of the call

[root@freepbx ~]# tcpdump -nni any host 172.20.242.101 -vvvvvvvvvvvvvvvvvvvvvvv
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
19:37:39.774542 IP (tos 0x60, ttl 64, id 53312, offset 0, flags [DF], proto UDP (17), length 1079)
172.10.8.66.5060 > 172.20.242.101.5060: [bad udp cksum 0x56fb → 0x3e4d!] SIP, length: 1051
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 172.10.8.66:5060;rport;branch=z9hG4bKPj30d92bca-4f5e-439c-bad9-7441b9343284
From: “Diego” <sip:5711@ 172.10.8.66>;tag=6c23106b-0ae1-4c09-a39c-ea558fcde9c7
To: <sip:343@ 172.20.242.101>
Contact: <sip:asterisk@ 172.10.8.66:5060>
Call-ID: 816b9a2b-abce-42fd-85d8-c9c361ff9f03
CSeq: 17924 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-16.0.39(16.25.0)
Content-Type: application/sdp
Content-Length: 382

    v=0
    o=- 176491597 176491597 IN IP4 172.10.8.66
    s=Asterisk
    c=IN IP4 172.10.8.66
    t=0 0
    m=audio 18102 RTP/AVP 0 8 3 111 9 18 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:3 GSM/8000
    a=rtpmap:111 G726-32/8000
    a=rtpmap:9 G722/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    a=maxptime:150
    a=sendrecv

19:37:39.817231 IP (tos 0x0, ttl 63, id 19386, offset 0, flags [none], proto UDP (17), length 469)
172.20.242.101.5060 > 172.10.8.66.5060: [udp sum ok] SIP, length: 441
SIP/2.0 404 Not Found
From: “Diego”<sip:5711@ 172.10.8.66>;tag=6c23106b-0ae1-4c09-a39c-ea558fcde9c7
To: <sip:343@ 172.20.242.101>;tag=100cabf8-65f214ac-13c4-3d7b3f01-23c99bb6-3d7b3f01
Call-ID: 816b9a2b-abce-42fd-85d8-c9c361ff9f03
CSeq: 17924 INVITE
Via: SIP/2.0/UDP 172.10.8.66:5060;rport=5060;branch=z9hG4bKPj30d92bca-4f5e-439c-bad9-7441b9343284
Supported: replaces
Allow: INVITE, ACK, BYE, REFER, NOTIFY, CANCEL
Content-Length: 0

19:37:39.817457 IP (tos 0x60, ttl 64, id 53324, offset 0, flags [DF], proto UDP (17), length 465)
172.10.8.66.5060 > 172.20.242.101.5060: [bad udp cksum 0x5495 → 0xd50b!] SIP, length: 437
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 172.10.8.66:5060;rport;branch=z9hG4bKPj30d92bca-4f5e-439c-bad9-7441b9343284
From: “Diego” <sip:5711@ 172.10.8.66>;tag=6c23106b-0ae1-4c09-a39c-ea558fcde9c7
To: <sip:343@ 172.20.242.101>;tag=100cabf8-65f214ac-13c4-3d7b3f01-23c99bb6-3d7b3f01
Call-ID: 816b9a2b-abce-42fd-85d8-c9c361ff9f03
CSeq: 17924 ACK
Max-Forwards: 70
User-Agent: FPBX-16.0.39(16.25.0)
Content-Length: 0

19:38:06.692879 IP (tos 0x60, ttl 64, id 60700, offset 0, flags [DF], proto UDP (17), length 479)
172.10.8.66.5060 > 172.20.242.101.5060: [bad udp cksum 0x54a3 → 0x1034!] SIP, length: 451
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 172.10.8.66:5060;rport;branch=z9hG4bKPj3f93aea9-9545-4a3d-851a-51600571a8fe
From: <sip: PancodeDon2 @172.10.8.66>;tag=66d0bc49-8c3f-4521-8702-9a2b3caef434
To: <sip:PancodeDon2@ 172.20.242.101>
Contact: <sip:PancodeDon2@ 172.10.8.66:5060>
Call-ID: 53335989-b58d-43ad-b46f-542739e21661
CSeq: 32185 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-16.0.39(16.25.0)
Content-Length: 0

19:38:06.714010 IP (tos 0x0, ttl 63, id 19411, offset 0, flags [none], proto UDP (17), length 436)
172.20.242.101.5060 > 172.10.8.66.5060: [udp sum ok] SIP, length: 408
SIP/2.0 501 Not Implemented
From: <sip:PancodeDon2@ 172.10.8.66>;tag=66d0bc49-8c3f-4521-8702-9a2b3caef434
To: <sip:PancodeDon2@ 172.20.242.101>;tag=100cada0-65f214ac-13c4-3d7b3f1c-7783b1f7-3d7b3f1c
Call-ID: 53335989-b58d-43ad-b46f-542739e21661
CSeq: 32185 OPTIONS
Via: SIP/2.0/UDP 172.10.8.66:5060;rport=5060;branch=z9hG4bKPj3f93aea9-9545-4a3d-851a-51600571a8fe
Supported: replaces
Content-Length: 0

Please I need a quick help since this interrupts my migration

Could a Spanish speaker please translate my diagnosis.

good morning

I have included the log of the call in the previous comment. I have configured the Pancode as a Trunk connection, if it should be as an extension, how should I configure it since it does not have an extension?

I await your response

PS: My English is not very good, I can speak in Spanish.

Greetings

@dss1711 al parecer estás configurando tu extensión como una “línea” o “troncal” en vez de como una extensión. El timbre tiene que configurarse como una extensión y usar el número de extensión y el secret para registrarlo. Tu lo has configurado como una “línea”? por alguna razón?

Buenos dias

Os paso el pancode la configuracion tiene, en ningun campo me deja poner numero de extension solo me deja poner usuario y contraseña y la parte del proxy de donde se quieren autenticar.Cualquier duda me decis

Buenas tardes

Muchas gracias por la ayuda, al configurarlo como extension en vez de linea o troncal ya se encuentra funcionando correctamente

Saludos

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