I have two Asterisk servers that have been working with an IAX trunk for several years. I recently upgraded one of the Asterisk servers and changed the trunk to SIP.
The problem I an now having is with conflicting extension numbers on two Asterisk servers. This has not been an issue for several years as each server has a dial prefix to route calls to the other server. For instance Ext 7001 local would dial 7001 but 857001 for the other Asterisk server/office.
Most calls are working between the offices except where there is a matching extension/user on the other end.
When calling a number that has a matching extension/user on the far ens Asterisk finds a match and is attempting to authenticate which fails. Here is a short snip of the sip debug:
Using INVITE request as basis request - 12926e1f5c318ee61ce60aa779237e5b@192.168.118.238
Found peer ‘7804’ for ‘7804’ from 192.168.118.238:5060
<— Reliably Transmitting (NAT) to 192.168.118.238:5060 —>
SIP/2.0 403 Forbidden
For calls that do not have a matching extension/user on the far end it is using the trunk name, no match is found and no authentication is attempted.
Using INVITE request as basis request - 22b87e741214040e57785d1a61d21a95@192.168.118.238
Found peer ‘Bytes-Montreux’ for ‘7894’ from 192.168.118.238:5060
I need some direction on how this should be working in this case. Is there a way to force it to not match the end to end peers?
The trunk config is simple and the same on both ends. I have originally had the context as from-internal
[Bytes-Montreux]
type=friend
context=from-trunk
host=192.168.118.238
disallow=all
allow=ulaw
nat=no
qualify=yes
directmedia=no