IP-Phone connected to Asterisk behind FritzBox does not send Audio correctly but receives well

Hello everyone,

I am relativly new to Asterisk and I spent a bunch of days trying to configure a setup behind an (in germany) famous router FritzBox provided by our ISP.

Currently I am able to place a phone call from my cellphone to our landline registered in FritzBox. Our current configuration leads to our IP-Phones ringing according to our dialplan. If the ringing phone is answered I can hear the audio beeing send by my cell but no signal get’s out from the IP-Phone to the cell phone.
I am wondering why the packets from my internal LAN cannot be received by my cell, I thought the inward path through all firewalls and routing would be more critical, howevery outgoing does not work :frowning:

Issue graphical

 Cell Phone              ISP                     FritzBox                 Asterisk                 UDM Pro                 IP-Phone  
 +--------+ Audio OK     +--------+ Audio OK     +--------+ Audio OK      +--------+ Audio OK      +--------+ Audio OK     +--------+
 |        | -----------> |        | -----------> |        | ----------->  |        | ----------->  |        | -----------> |        |
 |        |              |        |              |        |               |        |               |        |              |        |
 |        |              |        |              |        |               |        |               |        |              |        |
 |        |              |        |              |        |               |        |               |        |              |        |
 |        |              |        |              |        |               |        |               |        | no Audio :(  |        |
 |        | ------------ |        | <----------- |        | <-----------  |        | <-----------  |        | <----------- |        |
 +--------+              +--------+              +--------+               +--------+               +--------+              +--------+

Network Layout

 Internet SIP from ISP                                                  
    |                                                                   
    |                                                                   
    |                                                                   
 FritzBox                                                               
 192.168.0.1/24                                                            
    |                                                                   
    |-------------------------|                                         
    |                         |                                         
 192.168.0.197              192.168.0.5                                 
 Ubiquiti UDM Pro          Asterisk Server                              
 192.168.40.1/24                                                           
    |                                                                   
    |                                                                   
    |                                                                   
    |                                                                   
    |-------------------|------------...------|                 
    |                   |                     |                         
    |                   |                     |                         
 192.168.40.10       192.168.40.11         192.168.40.21                
 Fanvil X4G          Fanvil X4G            Fanvil X4G                                                                                                                                                  

When trying to capture IP-Packets from the IP-Phone, the SIP seems to work fine. But RTP packets are send to the wrong IP-Address! The IP-Phone sends the packets direktly to FritzBox, if I understand
correctly it should send those packets first to Asterisk and they will be forwarded to FritzBox by Asterisk.
So how do I tell the IP-Phone to send the RTP packets to Asterisk?

Can you help me, what additional information do you need?
Looking forward to hearing from you!

Used Asterisk Version
Asterisk 18.1.1 on a x86_64 running Linux

Used Linux Version
Debian GNU/Linux 10 (buster)

Used IP-Phone Version
Fanvil X4G, Firmware X4-2.14.0.7386

Used Router from Ubiquiti
UDM-Pro: Dream Machine Pro

Used Router from ISP
AVM FRITZ!Box 6490 Cable

best regards,

Nicolas

Which channel driver? What are your direct media settings? I don’t see any SIP to or from the …10 address. It looks to me as though the phone is ignoring Asterisk and configured to talk directly to the gateway.

Hi David,

thank you for that quick reply, I messed up the IP addresses in my schematic. I just corrected them, now it should fit the wireshark screenshot, sorry!

What kind of settings do you mean, in the IP-Phone?
This is the setting for the IP-Phone x.40.21:

The request on line 18 looks like it might be a re-INVITE (I assume that is what in dialog means). In that case Asterisk may have reconfigured the SDP for direct media, because you neither disabled it, nor used dialplan applications that were incompatible.

Generally, this sort of message sequence chart display isn’t enough. We need to the full text of the SDP, as produced when using “pjsip set logger on” (or “sip set debug on”). Also, generally diagnostics from Asterisk are easier to read, because people are used to reading them.

Hello David,

sorry for the long delay, I do not have direct access to the system and have to schedule a meeting with someone on site before I was able to gather information.

Now I tried two different scenarios, in the first one I call from my cell to the number and the state is as described: Incoming sound is audible from my cell to IP-phone but my cell stays silent and i cannot hear anything.

In the second scenario I replaced my current dialplan with the one from the simple setup playing “Hello world” to an incoming call. This was audible during my cell call! So we should be bascially able to establish a two-way connection.

I hope that helps to resolve my issue, thanks in advance!

best regards,
Nicolas

PS: Sorry for using wetransfer I am not allowed as a “new user” to upload any files here, and characters are limited to 32k. The logs are way bigger than that…

I looked at the first log. It is very noisy, and definitely incomplete. It lacks time stamps, so appears to have been screen scraped, rather than taken from the log file.

The first INVITE is actually a re-INVITE to direct media, so I’m guessing that one of the parties is not able to directly route to the other.

What do you mean by “noisy”?
I just copied the commandline-output you are right that is not an actual logfile. Where would I find that file?

Yes thats basically my problem one direction (IP-Phone outwards to cell) is not possible!
Do you mean the INVITE in line 315?
What configuration should I check? In the IP-Phone or rather in Asterisk? Do you have any idea what I could look for?

It contains a lot of events that don’t relate to your call.

That’s also a Re-INVITE, but I was referring to line 272.

You need to check the configuration of both the A an B parties for their network connectivity and routing data. This is OS stuff, not VoIP.

In /var/log/asterisk on normal configurations. You may have to adjust /etc/asterisk/logger.conf.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

I was able to determine the missing configuration!
Adding a “direct_media=no” to the pjsip-configuration made the pakets go in the right direction.
I think forcing Asterisk to not use direct media makes the pakets flow to asterisk and then further to FritzBox.

No everything works fine!

This topic can be closed: Problem solved.