I’m facing an issue for the first time. I have a SIP trunk that is successfully registered with the provider. I’m able to do outgoing calls. Incoming calls are not working. Our SIP provider is giving us the below trace:
here are the logs I get on my FreePBX:
[2017-06-15 21:35:06] VERBOSE[2171][C-000001ef] netsock2.c: Using SIP RTP TOS bits 184
[2017-06-15 21:35:06] VERBOSE[2171][C-000001ef] netsock2.c: Using SIP RTP CoS mark 5
[2017-06-15 21:35:06] NOTICE[2171][C-000001ef] chan_sip.c: Call from ‘marwan’ (ISP_IP:5060) to extension ‘OUR_DID’ rejected because extension not found in context ‘inbound_trunk_name’.
Both outgoing and incoming trunks are online:
cloudpbx*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
inbound_trunk_name/marwan ISP_IP No No 5060 Unmonitored
outbound_trunk_name/marwan IP No No 5060 Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
This is normally your “from-trunk” or “from-somewhere-outside-the-PBX” context. Check your trunk definition and make sure your incoming context is set to something internal to your PBX.
[ISP_outbound]
type=friend
insecure=invite,port
nat=depends on the needs of the Asterisk Server
canreinvite=no
username=your_name
secret=your_asterisk_password host=sbc.voxbeam.com
context=from_trunk
Then, you can ignore the Inbound settings (leave them blank) altogether.