[asterisk-users] One Way Audio Problem
Brent Davidson
brent at texascountrytitle.com
Fri Oct 17 16:23:27 CDT 2008
GNUbie wrote:
> What particular configs are you looking for? Below is my current setup
> and scenario:
>
> [snom] ==LAN==> [asterisk] ==FXO/POTS ==> [analog_telephone/mobile_phone]
>
> SNOM is using the 192.168.101.102 IP address
> Asterisk is using 192.168.101.1 IP address for its eth1 interface
> FXO port is connected to the POTS
> SNOM doesn't need to go out to the Internet in this scenario, AFAIK.
>
> Below is my current NAT rules:
>
> # iptables -L -v -t nat
> Chain PREROUTING (policy ACCEPT 63795 packets, 7162K bytes)
> pkts bytes target prot opt in out source
> destination
> 11460 760K RETURN 0 -- any any 192.168.101.0/24
> !192.168.101.0/24
>
> Chain POSTROUTING (policy ACCEPT 570 packets, 41836 bytes)
> pkts bytes target prot opt in out source
> destination
> 11408 757K MASQUERADE 0 -- any eth0 192.168.101.0/24
> anywhere
>
> Chain OUTPUT (policy ACCEPT 570 packets, 41836 bytes)
> pkts bytes target prot opt in out source destination
>
> Please advice if you need more information from me.
>
> Regards,
>
> GNUbie
Having had many years of experience working with iptables I can tell you
that when IP Forwarding is enabled on a Linux machine things can get a
bit tricky. In my experience using a Masquerade rule can cause some
major weirdness. Try doing this:
Instead of the Masquerade rule use:
iptables -t nat -A POSTROUTING -i eth1 -o eth0 -j SNAT --to-source
<public ip of eth0>
Also, in the general section of your sip.conf make sure you have:
bindaddr=192.168.101.1
to make sure asterisk is not sending sip packets using the public IP
then effectively trying to communicate with the phone by Masquerading
the packets coming in over the eth1 to eth0. This is more than likely
what is happening. (It's normlly bindaddr=0.0.0.0)
Good luck,
Brent
More information about the asterisk-users
mailing list