Won't receive DTMF event if calling through 4g, but works through LAN

Not sure if this is the right place to ask this.

I’ve set a node.js server following this exact example. It works flawlessly if I make the call via LAN from my cellphone. But if I use 4g to call my Asterisk I receive the “hello world” greeting but the dial doesn’t trigger the “ChannelDtmfReceived” event. It never enters the function.

After 30 seconds the line drops.

The node and the Asterisk run in 2 different virtual machines.

Any idea?

Thank you very much

edit:

If I call to my pc no audio is received in the PC but audio is received in the cellphone. Also line drops after 30 seconds.

edit: allright this seems like either a firewall or a port forwarding issue. I have created a DMZ towards my Asterisk VM, the VM network interface is in bridged mode and every firewall is shut down. Still can’t hear nothing from any external ip call.

4G is a mobile phone air interface. Asterisk doesn’t directly support any air interfaces. Please describe how your 4G uplink reaches Asterisk.

If the final hop is SIP, what is dtmfmode and what is the codec.

As a general note, mobile phone normally send DTMF out of band as the GSM codec is incompatible with it. Normally the base station regenerates the actual inband tones, which travel inband to the boundary of the circuit switched network.

I’m pretty new to Asterisk so I’ll try to answer from what I know.

I’ve set an extension for my cellphone. When I turn on my wifi and point my app towards the Asterisk local IP I can successfully call my pc and listen each way. If I turn off my wifi and change the IP to my Asterisk public IP it registers successfully and is able to call my pc, but I can’t listen my cellphone.

I don’t know what is dtmfmode nor which codec is set. Everything is set to default. I installed latest version of AsteriskNow with Asterisk 13.

Thank you very much!

Do you have port forwarding from your router to the rtp port range of the Asterisk server? Sounds like a NAT issue.

yes actually I set a DMZ in order to avoid port issues (temporarily of course).