Cannot use a trunk with the same domain / ip

Hello, as it says on the title I cannot use a trunk with the same domain / ip, I have Asterisk 18.11.2 and it’s a fresh install.

Whenever I try to use those two trunks it breaks my whole system, I cannot connect to my user account it says connecting and won’t do anything, when I look up in the asterisk console and type pjsip show registrations or endpoints it will say there are no objects found. I tried to use the line=yes but it doesn’t change anything.

Here is the configuration of both of my trunks

==================================

[wintoz]
type = registration
transport = transport-udp
outbound_auth = telnyx
client_uri = sip:xxxxx@sip.wintoz.fr:5060
server_uri = sip:sip.wintoz.fr:5060

[wintoz]
type = auth
auth_type = userpass
username = xxxxx
password = xxxxx

[wintoz]
type = aor
contact = sip:xxxxx@sip.wintoz.fr

[wintoz]
type = endpoint
transport = transport-udp
context = Tout
disallow=all
allow=opus
allow=g722
allow=ulaw
allow=alaw
from_user = xx
auth = telnyx
outbound_auth = telnyx
aors = telnyx
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes

[wintoz]
type = identify
endpoint = wintoz
match = sip.wintoz.fr

==================================

[telnyx]
type = registration
transport = transport-udp
outbound_auth = telnyx
client_uri = sip:xxxxxxxx@sip.telnyx.com:5060
server_uri = sip:sip.telnyx.com:5060

[telnyx]
type = auth
auth_type = userpass
username = xxxxxxxx
password = xxxxxxxx
[telnyx]
type = aor
contact = sip:xxxxxxxx@sip.telnyx.com

[telnyx]
type = endpoint
transport = transport-udp
context = Tout
disallow=all
allow=opus
allow=g722
allow=ulaw
allow=alaw
from_user = xxxxxxxx
auth = telnyx
outbound_auth = telnyx
aors = telnyx
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes

[telnyx]
type = identify
endpoint = telnyx
match = sip.telnyx.com

=====================================

Both domains redirects on the same IP address in case you’re wondering

Thanks a lot

SIP doesn’t have trunks!

I can’t see where you have duplicated a domain or IP in your configuration, however such can cause problems as both sides can have difficulty in telling the two apart.

You have lots of settings for broken NAT workarounds, but I see no evidence that you have actually set the key NAT setting (local networks and media and signalling public addresses).

Actually both domains points to the same ip, I tried to see if this was a domain issue or an ip related issue it turns out it is an ip issue, the problem is that as you mentioned it can’t tell which trunk I’m using.

However I don’t understand what you mean by SIP doesn’t have trunks can you elaborate more please ?

Thanks

Nowhere in the SIP RFC does the word trunk appear, nor does the word extension.

To the extent that Asterisk is the one having difficulty, there are two possible workarounds. One is the line parameter, but some providers don’t honour it The other is to use two transports, on different port numbers. Again the provider might not consider the port number significant.

The cleanest solution, though is to use one account, and to split the billing on your side.

The problem I’m facing is that I’m planning to give a specific DID to a specific account however I cannot configure this in any other mean expect this one, if both of these workarounds doesn’t solve the problem what solutions could work then :confused:

Expose two different public IP addresses.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.