Sip Audio?
-
Hi,
I was wondering if someone could help or guide to what I might have wrong. I previous configured my elastix server with no issues and everything works with my SIP trunk. Now that I want to call using zoiper on my data plan and call another ext there is no audio. But If im within the the sub-net of elastix there is audio.zoiper iphone data–---calls ext 300------granstream (on the same sub-net as elastix)= no audio
zoiper iphone wifi (same sub-net as elastix)-----calls ext 300------granstream (on the same subnet as elastix)= yes audioI thought i had configured something wrong but not sure if its the NAT on pfSense or the NAT config on elastix
Thank you
See pictures
-
First off, thanks for providing a clear picture of what you're trying to do!
A couple of tiny pieces of information that would be helpful in troubleshooting:
Since your Elastix box is actually connected to 2 subnets, ext 300 is on which subnet?
Same thing for zoiper, can you please clarify both use cases?No audio is almost always an RTP related issue. Specifically why it isn't working can in many cases be related to NAT, and frequently related to the SIP SDP message itself.
If you're handy with packet captures, you'll want to setup a capture to watch all traffic to/from your zoiper client on Elastix and/or on pfSense LAN/WAN intefaces in both working and non-working cases to understand what the traffic streams looks like when it is working and when it is not working.
Save the captures and open them using Wireshark's handy an use the Telephony–>Voip Calls flow analysis features, so you can have a look and see if:
The SIP SDP message contains erroneous information (wrong IP/port being assigned)
The NAT is working as expected or notElastix (Asterisk) is a bit of a strange beast when it has two network interfaces in it, and personally, I prefer to run with only 1 NIC and setup the SIP trunk (or IAX if the provider supports it) through the firewall.
-
The other thing that I know works well is to establish an OpenVPN connection from the zoiper phone to the the pfSense/Elastix subnet.
I do this all the time with my cell phone/zoiper connecting to my FreePBX/asterisk setup.
I'd second the recommendation to check the subnets that Elastix will allow for traffic, as I recall that was an initial stumbling block for me as well.
-
Thanks guys for the response, After many trail and errors i figured out what is the issue, now im trying to see how can I resolve it.
- I now get audio using zoiper after adding on the sip nat.config on elastix to
nat=yes externip = 190.xx.xx.xx localnet=192.168.1.0/255.255.255.0
but after doing that when i call the pbx the IVR answers but then after 5 seconds it hangs up so i thought it has to be something with the network
Then I was looking at network settings on elastix as you see there's 2 network cards one is LAN and the other is the trunk, But whats odd the eth0 has a different IP from the trunk config on elastix. So i did a trail/error
i reedited the sip nat.config
nat=yes externip = 172.22.102.162 localnet=192.168.1.0/255.255.255.0
after doing so that IVR goes though without any issues but now zoiper audio does not work
So after that I realize something is wrong with the network on elastix, the person before never really gave any information about the setup so im right now trying to decipher
- So i guess my real question is why the eth0 have this IP 172.22.102.162 while the trunk IP is different Im going to call my lSP tomorrow to see if they could shed some light
Thank you again
-
Have a look at the routing table on Elastix, from Linux command line:
ip route
You will likely have static routes via eth1 (sip trunk line) for the sip trunk provider.
What divsys says about OpenVPN is also a good idea, that way the client terminates on the inside of the network, and it removes NAT issues completely.
Like I said about Asterisk an NAT; if you have more than 1 network interface, it gets ugly.
If you set the externip value, then whenever it is talking to anything NOT on localnet, it will set the IP address of the SDP packet (the one that negotiates RDP stream) to have the externip value in it. The won't work if you set the eth1 value since that isn't reachable from Internet….BUT you also need to NOT have it use the 190.xx.xx.xx value when talking to the SIP provider that is also NOT on the localnet...see the problem???You will probably need several localnet lines, one for each subnet where you don't want it messing with the SDP packet, specifically to include the IP ranges of the SIP provider.
-
Thanks for the reply awebster,
The issue is that the client does not want to be connecting every time they want to call an ext though VPN (that would make my life easier :)
I was wondering does this always happened when the PSTN line is outside of the LAN?
Any way or somehow to make Elastix think that my WAN is the 190.xxx.xxx.xx instead of the 172
Thank you
-
just want to update for anyone else having this issue so far now i get one sided audio while before I would get none
I have been reading few other sites and been trouble shooting i re changed my trunk settings and my extensions.
But now i got this so i think im making progress see pictures
granstream(LAN IP) voice to zoiper(3G) –--One way audio
but on zoiper(3G) to granstream(lan)---no audio
but i guess howcome before I would get no audio but now im getting on the granstream phone (LAN) they cannot hear from what the person is saying on the zoiper(3g) but when talking from the granstream(lan) you can hear on the zoiper(3g)
Any asterisk guru? Its probably the wrong place to get help :-\
Thank you