Guide Request for connecting

hi
i’m an amature in Asterisk and my native language isn’t English, so excuse me for these two.
My router has two interfaces, first for Internet access (wan01 with ip X.X.X.X) and the second one is connected to a private network with no internet access (wan02 with ip:172.16.70.20). On my local network i started an asterisk server (with ip:192.168.1.5) with some internal users which can communicate to each other on the local network and over the internet and it seems the basis of the Asterisk server work fine.
My next challenge is connecting my Asterisk server to the voip server which is over the second interface of my router (over wan02 with ip:172.16.1.10). VOIP server responds to ping from my local network, but my asterisk server don’t receive any response from VOIP server. It takes me a lot of time with no result . so i decide to request professionals’ advice.
Best Regards

Generally you need to show us your configuration, so we can work out what you have done wrong. Also, I’m not clear about how the local network is connected. Is it connected over the wan01 interface?

You should use tcpdump and/or wireshark, or sngrep, to determine whether you are sending to the VoIP server and whether their replies are making it to the firewall on you Asterisk server.

Also, you need to provide the full log to show how far through Asterisk the outbound request is getting.

Thanks for your attention. I had some difficulty for posting response here because of new user policy.
any way, i thought my description was clear. this is my pjsip.conf
pjsip.conf.txt (2.6 KB)
and here is my pjsip logger
MobaXterm_192.168.1.5heydar_20240604_184957.txt (3.2 KB)

bind = 192.168.1.5

transport=transport-udp-nat

You appear to have given it no choice other than to use wan01

1 Like

I changed bind to it’s default value 0.0.0.0

pjsip.conf (2).txt (2.6 KB)
but nothing changed. here is my log
MobaXterm_192.168.1.5heydar_20240604_184957.txt (5.6 KB)

What do you get when you issue the route command at a root level Linux shell prompt?

1 Like

i don’t know command syntax

“route”

1 Like

image
I do appreciate your patience

My mistake. I misunderstood the configuration. Where it gets confused is at the router. I was thinking the interfaces were directly on your Linux box.

I believe you need to provide a second transport, for wan02’s external addresses, assuming there is NAT on that. (If there isn’t, which I think is unlikely, you would need to include the provider’s network in your local networks. If it isn’t doing NAT, the provider would need to know that 192.168.1.0/24 belongs to you, but that seems to be the standard private network for home LANs, so every home customer would use that range.)

(I tend to think, in such cases, it is less confusing if you have two routers, so each one is only dealing with one externally visible address, and putting them on different interfaces, on the Asterisk box, will keep things even simpler.)

1 Like