from wazo I get this error:
WARNING[14181]: res_pjsip_outbound_registration.c:1007 handle_registration_response: 403 Forbidden fatal response received from ‘sip:192.168.2.6:5060’ on registration attempt to ‘sip:sbc_user@192.168.2.6:5060’, retrying in ‘30’ seconds
from freePBX I get this error:
ERROR[2361]: chan_sip.c:17092 register_verify: Peer ‘sbc_user’ is trying to register, but not configured as host=dynamic
NOTICE[2361]: chan_sip.c:28390 handle_request_register: Registration from ‘sip:sbc_user@192.168.2.6’ failed for ‘192.168.2.61:5060’ - Peer is not supposed to register
Hi, thanks for your answer. I did it and eventually, I can register for a few seconds:
**[2020-03-25 22:37:54.9080] VERBOSE[12661] res_pjsip/pjsip_configuration.c: Endpoint TEST-TRUNK is now Reachable**
**[2020-03-25 22:37:54.9080] VERBOSE[12661] res_pjsip/pjsip_options.c: Contact TEST-TRUNK/sip:sbc_user@192.168.2.61:5060 is now Reachable. RTT: 0.895 msec**
**[2020-03-25 22:37:57.9674] WARNING[12661]: res_pjsip_outbound_registration.c:1007 handle_registration_response: 403 Forbidden fatal response received from 'sip:192.168.2.6:5060' on registration attempt to 'sip:sbc_user@192.168.2.6:5060', retrying in '30' seconds**
But after a few seconds the trunk status is rejected:
[Mar 25 23:43:49] -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[2020-03-25 23:43:50.6868] ERROR[22353]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("dynamic", "(null)", ...): Name or service not known
[2020-03-25 23:43:50.6868] ERROR[22353]: res_pjsip_endpoint_identifier_ip.c:550 ip_identify_apply: Identify 'TEST-TRUNK' failed when adding resolution results of 'dynamic'
[2020-03-25 23:43:50.6868] ERROR[22353]: res_sorcery_config.c:407 sorcery_config_internal_load: Could not create an object of type 'identify' with id 'TEST-TRUNK' from configuration file 'pjsip.conf'
It means your trunks are not using the good credentials. If it’s a first for you i advise you create a really simple configuration with the same login and the same trunk name on both side. If you can don’t even setup registration on wazo and set up some firewall rules instead it’ll be easier until you get confortable with trunks
one more thing is host on dynamic on wazo, can’t you put your freepbx IP ?
Hi, finally I realized that the freePBX had a fail2ban rule who was banning the traffic from my wazo. I’ve just added the IP to the whitelist and it works fine.