Hello!
FreePBX16.0.40.13 + Asterisk 18.20.2 + Mikrotik
Microtik - 5060, 10000-20000 port forwarding, Sipalg is enabled
Asterisk is on Proxmox. 2 network interfaces. 1st local area network, 2nd trunk of the city telephone network operator.
Access to the outside world via the 1st interface and microtik. The 2nd (trunk) is connected directly to the modem.
Internal numbers in the office are registered via the local address 192.168…
Internal numbers outside the office via the external address 91.122…
Trunk of the city telephone network operator without registration. Operator data: IP, mask, gateway, proxy, phone number.
Everything works except the driver in the trunk. Below is a server dump on 2 interfaces and a dump on a client PC with MicroSIP.
The problem is that there is no sound, and when the call ends on the other end, the conversation “continues” for another 30 seconds.
I see that the return invite is not working. I think the problem is that the address was incorrectly sent when receiving the call. Hence the lack of sound and BYE commands.
But I can’t figure out how to fix it.
In Asterisk SIP Settings, add 10.200.46.224/28
to Local Networks.
After Submit and Apply Config, you must restart Asterisk.
If you still have trouble, post new pcaps.
Thank you very much!!!
Everything worked out. But why is this the case? The operator provided the network:
Netmask:255.255.255.248
GW: 10.200.46.233
and I specified 10.200.46.232/29 in the settings
Sorry, I don’t know the details of how Asterisk decides when to substitute its WAN address.
It just seemed weird that your own 10.200.46.230 address was not included in your local netblock, so I guessed that including it would fix it. We lucked out.
Because 10.200.46.232/29 would mean that 232 is the Network, 239 is the Broadcast and the usables are 233 - 238 with 233 being assigned as the gateway that leaves 234-238 (5 usable IPs). Therefore, 10.200.46.230 is outside of the /29 and by making it a /28 you are doubling the size of the block. Now as a /28 the Network is 224 and the Broadcast is still 239 but it makes the usables .225 to .238 and thus puts the 10.200.46.230 is the range.
When a request is made to/from an IP not defined in the Local Network settings, it is considered an external request and the external media/signalling is applied to the request.
Address of the remote SIP proxy server:
IP: 10.200.46.230
And I entered the address 10.200.46.230 as a proxy
and 10.200.46.232/29 as a local network.
But the proxy could have been 1.2.3.4
, and then I would probably have thought that this network was not described anywhere. But I was distracted by the instruction 10.200.46.xxx
In fact, I changed the local network back to 10.200.46.232/29 and added another local network on 10.200.46.230/32 and everything is working correctly for me as well.