One Way audio - 2 nics

Hi,

I am trying to setup a Asterisk server using 2 network cards for the first time. To explain the setup:

eth0:
ip: xxx.xxx.xxx.xxx
used for all internet traffic and all sip devices will connect here

eth1:
ip: yyy.yyy.yyy.yyy
This is a private connection to a SIP provider and is used as the trunk.

So essentially when i make a call it is from a sip phone connected through eth0 and the call will go out through the trunk connected to eth1.

The problem i am having is that when i make a call it takes about 10 seconds before it even starts to call and when it does get connected i can only hear audio that goes from my SIP phone to PSTN. No audio is passed from pstn to my SIP phone.

I have tried set bindaddr = 0.0.0.0 in my sip.conf. As both networks are set up with public IPs i have nat=no . I am using asterisk 1.6.0.26. Would anyone know of what else it could be? Should asterisk be listening on both interfaces already or should i configure some IP rules to bridge the connections?

Thanks for any help.

Your setup is similar to mine. I have a dim memory that this problem is caused by Asterisk trying to allow the SIP devices to talk directly to each other. The solution is to put “canreinvite=no” in your sip.conf device configuration so Asterisk will stay in the middle to bridge the call. Here’s a working example from my 1.8.0-rc2 installation:

[line1];IPKall 123-456-7890
type=peer
dtmfmode=rfc2833
context=from-sip
insecure=port,invite
host=voiper.ipkall.com
canreinvite=no
localnet = 192.168.90.0/255.255.255.0
qualify=yes