Bug on r1732
When multiple providers share the same hostname, you create a merged incoming context based on this hostname.
Ex. two lines on voip.belgacom.be will create a context SIP-PROVIDER-voip.belgacom.be-incoming.
The problem is that you don't merge the inbound routed numbers but redirect assume that those numbers are the usernames.
With voip.belgacom.be, the username is not the phone number, so your context looks like:
[ Context 'SIP-PROVIDER-voip.belgacom.be-incoming' created by 'pbx_config' ]
'u234865xx' => 1. Goto(SIP-PROVIDER-5028176174d9065435d38e-incoming,s,1) [pbx_config]
'u288096xx' => 1. Goto(SIP-PROVIDER-19976182854c9a299885c6b-incoming,s,1) [pbx_config]
Creating a new merged context is the way to go but you should really create a full context merging the two inbound rules instead, discarding, in this example, the SIP-PROVIDER-5028176174d9065435d38e-incoming and SIP-PROVIDER-19976182854c9a299885c6b-incoming.
As the same logic works even if you don't have multiple lines, why couldn't this be the general rule (ie. SIP-PROVIDER-fqdn-incoming) for SIP providers?
My current workaround is to create custom hostname aliases to avoid the merging and put all the incoming rules in the first profile, hence doing the merging manually.
Also, when corrected, it would be wise to do this based on the IP since, for example voip.nomado.eu and sip.3starsnet.com are in fact the same servers with the same IP. If you create 2 different contexts, only one will be used, the other being discarded.