Issue with inbound calls using freepbx 17 pjsipe

Hi, guys,

I have a freepbx setup with a Goip “sim gateeway”.

I am having problems getting calls into my freepbx.

I can make calls without problems through the trunk but when I get them to return to asterisk. I get the following messages back.

I leave logs.

Can you help me?

Asterisk 21.4.1, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 21.4.1 currently running on localhost (pid = 112941)
  == Endpoint goip11 is now Unreachable
    -- Contact goip11/sip:[email protected]:5288 is now Unreachable.  RTT: 0.000 msec
    -- Removed contact 'sip:[email protected]:5288' from AOR 'goip11' due to expiration
  == Contact goip11/sip:[email protected]:5288 has been deleted
    -- Added contact 'sip:[email protected]:5288' to AOR 'goip11' with expiration of 60 seconds
  == Endpoint goip11 is now Reachable
    -- Contact goip11/sip:[email protected]:5288 is now Reachable.  RTT: 59.375 msec
[2024-09-03 23:18:44] NOTICE[138804]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - No matching endpoint found
[2024-09-03 23:18:44] NOTICE[286519]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - No matching endpoint found
[2024-09-03 23:18:44] NOTICE[286519]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - Failed to authenticate
[2024-09-03 23:18:44] NOTICE[578263]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - No matching endpoint found
[2024-09-03 23:18:44] NOTICE[578263]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - Failed to authenticate
[2024-09-03 23:18:44] NOTICE[127114]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - No matching endpoint found
[2024-09-03 23:18:44] NOTICE[127114]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - Failed to authenticate
[2024-09-03 23:18:45] NOTICE[132141]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - No matching endpoint found
[2024-09-03 23:18:45] NOTICE[132141]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - Failed to authenticate
[2024-09-03 23:18:45] NOTICE[138804]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - No matching endpoint found
[2024-09-03 23:18:45] NOTICE[138804]: res_pjsip/pjsip_distributor.c:673 log_failed_request: Request 'INVITE' from '"+18143778645" <sip:[email protected]>' failed for '192.168.1.240:5288' (callid: [email protected]) - Failed to authenticate
    -- Removed contact 'sip:[email protected]:47656;ob;x-ast-orig-host=10.100.1.96:47656' from AOR '6000' due to request
  == Contact 6000/sip:[email protected]:47656;ob;x-ast-orig-host=10.100.1.96:47656 has been deleted
  == Endpoint 6000 is now Unreachable
    -- Added contact 'sip:[email protected]:47656;ob;x-ast-orig-host=10.100.1.96:47656' to AOR '6000' with expiration of 300 seconds
  == Endpoint 6000 is now Reachable
    -- Contact 6000/sip:[email protected]:47656;ob;x-ast-orig-host=10.100.1.96:47656 is now Reachable.  RTT: 129.734 msec

TRUNK:

root@localhost:/etc/asterisk# cat cat /etc/asterisk/pjsip.endpoint.conf
cat: cat: No such file or directory
;--------------------------------------------------------------------------------;
;          Do NOT edit this file as it is auto-generated by FreePBX.             ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate.                                                         ;
;--------------------------------------------------------------------------------;

[0]
#include pjsip.endpoint_custom.conf
[6000]
type=endpoint
aors=6000
auth=6000-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722
context=from-internal
callerid=MIT <6000>

dtmf_mode=rfc4733
direct_media=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
rtp_timeout=30
rtp_timeout_hold=300
rtp_keepalive=0
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord

[101]
type=endpoint
aors=101
auth=101-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722
context=from-internal
callerid=101 <101>

dtmf_mode=rfc4733
direct_media=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
rtp_timeout=30
rtp_timeout_hold=300
rtp_keepalive=0
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord

[102]
type=endpoint
aors=102
auth=102-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722
context=from-internal
callerid=102 <102>

dtmf_mode=rfc4733
direct_media=yes
mailboxes=102@default

mwi_subscribe_replaces_unsolicited=yes
aggregate_mwi=no
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=no
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
rtp_timeout=30
rtp_timeout_hold=300
rtp_keepalive=0
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord

[goip11]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,gsm,g726,g722,g719,h264,mpeg4
aors=goip11
send_connected_line=no
rtp_keepalive=0
language=en
outbound_auth=goip11
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto

[goip12]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,gsm,g726,g722,g719,h264,mpeg4
aors=goip12
send_connected_line=no
rtp_keepalive=0
language=en
outbound_auth=goip12
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto

[dpma_endpoint]
type=endpoint
context=dpma-invalid

If you look at Appendix B of the user manual for that device you will see a complete set of SIP INVITE handshakes, and so on.

What you are going to need to do is at the Debian command line do:

sudo apt install wireshark

and then run wireshark while attempting to use the gateway and capture the SIP transaction. It should then be a simple matter to match the output of wireshark against what the goIP gateway says is supposed to be happening then see what any discrepancies might be.

Fire up sngrep and filter for from IP 192.168.1.240

I have solved it in the pjsip trunk. indicating that for incoming validate authentication

Thanks guys

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