Problems with inbound calls on multiFXO device

Hi,
I’m copying my post here since I understand this probably is a problem that need some code in the SIP channel.
Thanks

Hi,
I have a Quintum ASM-400 device with 4 FXO connected and working with Asterisk 1.2.13
I can make calls, and receive calls.
The quintum has the following IP address 192.168.2.80
each FXO is identified with port 5064 for FXO-1 and port 5067 for FXO-4
My Asterisk Box is in the same network at 192.168.2.10

When I generate an outbound call, the call is redirected to the especific FXO port and I can check that in the CLI and in one Snom 320 phone through the hint/subscription.

The problem is, when I receive calls.
All the calls shows the FXO-4 trunk number, it doesn’t matter where the call ring.

Ex FXO-4 Trunk ID = 63 and FXO-1 Trunk ID = 11, when a call rings in the phisical port FXO-1, my Asterisk CLI and the reports allways shows the incoming call enter in FXO-4 with the trunl ID = 63.

After trying a lot of different configs, I tried to read the source code in the Channel SIP, I’m not a programmer just a curious and it looks like the chan_sip check the port to generate the outbound call but it doesn’t check the port when receive a call, just check the IP address.

Please, someone with more knowledge can help me to verify my assumption about if the port is checked when Asterisk receive an incoming call?

Any potential solution?

Should I report it as a Bug?

Thanks