AGI Error ("PJSIP/proxytrunks-00000002", "DDI 202 not found in database."

65 views
Skip to first unread message

Jhon Santos

unread,
May 11, 2024, 1:25:31 AM5/11/24
to ivozprovider-users
Hello, I have the following problem when trying to call between annexes:

ERROR CLI ASTERISK
************
 > [d5a8efda] Executing [202@trunks:1] NoOp("PJSIP/proxytrunks-00000002", "Incoming external call from "103" <edson> to 202") in new stack
       > [d5a8efda] Executing [202@trunks:2] AGI("PJSIP/proxytrunks-00000002", "agi://127.0.0.1:4573/fastagi-runner.php?command=Dialplan/Trunks") in new stack
       > [d5a8efda] [Kernel.php:60 ] AGI Error ("PJSIP/proxytrunks-00000002", "DDI 202 not found in database.")
    -- <PJSIP/proxytrunks-00000002>AGI Script agi://127.0.0.1:4573/fastagi-runner.php?command=Dialplan/Trunks completed, returning 0
    -- Auto fallthrough, channel 'PJSIP/proxytrunks-00000002' status is 'UNKNOWN'

*************

ERROR  kamtail-proxyusers
**************
[May 11 00:14:49] [fc74762e] Request: INVITE sip:2...@x.x.x.x:5060 from sip:ed...@x.x.x.x:5060 (1 INVITE - udp:y.y.y.y:57309) [YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.]
[May 11 00:14:49] [fc74762e] AUTH: Auth needed (sip:ed...@x.x.x.x:5060 from udp:y.y.y.y) - no_credentials
[May 11 00:14:50] [fc74762e] Request: INVITE sip:2...@x.x.x.x:5060 from sip:ed...@x.x.x.x:5060 (2 INVITE - udp:y.y.y.y:57309) [YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.]
[May 11 00:14:50] [fc74762e] CLASSIFY: vpbx call Terminals#3 (b3:c2)
[May 11 00:14:50] [fc74762e] RELAY: Relaying to sip:2...@x.x.x.x:5060 via sip:127.0.0.1:6060 - fs: <null>
[May 11 00:14:50] [fc74762e] REALTIME: users:b3:c2:u4:YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE. -> {"Event":"Trying","Time":1715404490,"Call-ID":"YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.","Brand":"Obsystem","Company":"pbx-obsystem","Direction":"outbound","Owner":"202 - puelles edson","Party":"201","ID":"ab31975b"}
[May 11 00:14:50] [fc74762e] RTPENGINE: rtpengine_manage [replace-session-connection replace-origin via-branch=extra SIP-source-address ICE=remove RTP/AVP direction=172.31.54.181 direction=172.31.54.181  call-id=users-outbound-YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE. label=Aleg_label]
[May 11 00:14:50] [fc74762e] Response: 100 Trying from sip:ed...@x.x.x.x (2 INVITE - udp:172.31.54.181:6060)
[May 11 00:14:50] [fc74762e] MANAGE_REPLY: 'ed...@x.x.x.x' has 1 calls now
[May 11 00:14:50] [fc74762e] REALTIME: users:b3:c2:u4:YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE. -> {"Event":"Proceeding","Time":1715404490,"Call-ID":"YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.","ID":"ab31975b"}
[May 11 00:14:50] [fc74762e] Response: 603 Decline from sip:ed...@x.x.x.x (2 INVITE - udp:172.31.54.181:6060)
[May 11 00:14:50] [fc74762e] MANAGE-FAILURE-AS: INVITE FAILED: '603 Decline' to '2 INVITE' from 'sip:ed...@x.x.x.x:5060' (udp:172.31.54.181:6060)
[May 11 00:14:50] [fc74762e] RTPENGINE: rtpengine_manage [replace-session-connection replace-origin via-branch=extra SIP-source-address ICE=remove RTP/AVP   call-id=users-outbound-YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE. label=Aleg_label]
[May 11 00:14:50] [fc74762e] REALTIME: users:b3:c2:u4:YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE. -> {"Event":"Terminated","Time":1715404490,"Call-ID":"YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.","ID":"ab31975b"}
[May 11 00:14:50] acc [acc_cdr.c:371]: log_write_cdr(): start_time=1715404490.068; end_time=1715404490.068; duration=0; brandId=3; companyId=2; caller=202; callee=201; callid=YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.; callidHash=fc74762e; xcallid=; diversion=; referrer=; referee=; direction=outbound; userId=4; friendId=; responseCode=603
[May 11 00:14:50] acc [acc.c:282]: acc_log_request(): ACC: transaction answered: timestamp=1715404490;utctime=2024-05-11 05:14:50;method=INVITE;from_tag=764aea12;to_tag=322af490-9b0e-474b-beed-bd4748948c19;call_id=YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.;code=603;reason=Decline;from_user=edson;from_domain=x.x.x.x;src_ip=y.y.y.y;ruri_user=201;ruri_domain=x.x.x.x;cseq=2;callid=YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.;cidhash=fc74762e
[May 11 00:14:50] [fc74762e] Request: ACK sip:2...@x.x.x.x:5060 from sip:ed...@x.x.x.x:5060 (2 ACK - udp:y.y.y.y:57309) [YzMyZjg0N2Y5ZTdkZmU1MmY3ZDU0YmNlMWYzMTQ4MWE.]
[May 11 00:19:35] [64d42575] Request: REGISTER sip:x.x.x.x;transport=TCP from sip:jh...@x.x.x.x;transport=TCP (5 REGISTER - tcp:y.y.y.y:55653) [icv8FqiM3TqhfH523Kqukw..]
[May 11 00:19:35] [64d42575] AUTH: Auth needed (sip:jh...@x.x.x.x;transport=TCP from tcp:y.y.y.y) - -4
[May 11 00:19:35] [64d42575] Request: REGISTER sip:x.x.x.x;transport=TCP from sip:jh...@x.x.x.x;transport=TCP (6 REGISTER - tcp:y.y.y.y:55653) [icv8FqiM3TqhfH523Kqukw..]
[May 11 00:19:35] [64d42575] REGISTER: Contacts updated (sip:jh...@x.x.x.x;transport=TCP: sip:jh...@y.y.y.y:61396;transport=TCP;rinstance=556b2366195ff1b8)
****************

PLEASE,  some help

Screenshot_5.png
Screenshot_6.png

Kaian

unread,
May 13, 2024, 2:34:07 AM5/13/24
to ivozprovider-users
Hi!

What versions is this? Are you using two different IP addresses for kamailio trunks and kamailio users?

Best regards 

Blas KuRDo

unread,
May 13, 2024, 2:53:49 AM5/13/24
to ivozprovider-users
Same problem here ... We are using the same IP for kamailio trunks and kamailio users ... It seems like asterisk is not looking in the internal extensions and it's managing the internal call as a external call:

... NoOp("PJSIP/proxytrunks-00000002", "Incoming external call from "200" <user1> to 201") ...

Kaian

unread,
May 13, 2024, 2:57:10 AM5/13/24
to ivozprovider-users
Hi!

Yes, this is a known issue  https://github.com/irontec/ivozprovider/issues/1959

Best regards,

Blas KuRDo

unread,
May 13, 2024, 2:59:43 AM5/13/24
to ivozprovider-users
Version is a fresh halliday 3.4.1 ...

El lunes, 13 de mayo de 2024 a las 8:34:07 UTC+2, ka...@irontec.com escribió:

Kaian

unread,
May 13, 2024, 3:53:51 AM5/13/24
to ivozprovider-users
Hi!

I highly recommend start using 4.x, we've been fixing a lot of bugs in that version in the past months.

Also you can try playing with endpoint identifier setting in /etc/asterisk/pjsip.conf 
Not sure if it will fix this problem and break other thing but you can try setting this value:

endpoint_identifier_order=header,ip,username,anonymous

Best regards!
Reply all
Reply to author
Forward
0 new messages