IP Phone > Asterisk > sip provider > media gateway > TDM telephone
IP Phone > Asterisk > sip provider > whole sale
My asterisk is gateway of my network and have a iptables firewall, it running in 4060 udp port.
IP Phone regster in asterisk
calls placed to sip provider with destination in TDM telephone is terminated using media gateway in case 1.
calls placed to sip providers with all other destinations is terminated by whole sale
Every time o make or receive calls from TDM telephone i can not hear anything. In asterisk console, i run rtp debug and i can see rtp packets traffic.
The packets show me real IP from media gateway and false ip from my ip phone.
So, i think that media gateway can not send packets directly to ip phone, how i make asterisk to proxy this connection ??
OBS: if i call other number terminated by whole sale, all works fine. In rtp debug i see real ip from wholesale gateway and false ip from my ip phone.
to ‘proxy the connection’ try canreinvite=no for the phone in sip.conf.
that said, you are saying calls go through a provider, then to your media gateway? that is odd…
for the false IP on your IP phone, is it using STUN? If the phone is using STUN it will report the exernal IP of your network. May need to turn this off on the phone.
Lastly, setup an extension for echotesting (exten => whatever,1,Echo() ). If this works, the rest is easy…
post some more info… the fake IP the phone is giving you, is it an internal IP for your network? An external IP that your network uses? A totally bogus IP? That is where your problem lies…
Using tcpdump i can found that Media Gateway was using a udp port for RTP that not allow in my firewall. After allowed now port range, all calls work fine.