I am having a one-way audio problem with my mobile softphone using mobile connectivity.
The configuration of the endpoints is in pjsip_wizard.conf.
Below is a list of the general characteristics of the system:
Asterisk in a cloud server exposed directly to the interface with public address (no NAT).
My mobile phone is connected to the mobile data connection, which I assume is in NAT.
If I call an extension (telephone) in my office behind a router from my mobile phone, I do not hear whoever is speaking from the office, but whoever is in the office hears my voice from my mobile phone.
If I call my mobile phone from my office phone, as in the previous case, my mobile phone doesn’t hear anything, while the voice from my mobile phone is heard from the office phone.
I’m not very experienced, but I think it’s a NAT problem.
My test configuration in pjsip_wizard.conf is as follows:
Alice is the test phone extension placed in the office, while bob refers to the mobile phone.
Both Alice and Bob can be reached with two different numbers.
What am I doing wrong?
Thank you in advance for your help.
The option is “endpoint/rtp_symmetric”. If that is actually correct and you’ve just provided it incorrectly here, then you’d need to look at “rtp set debug on” and see where media is actually going.
Hi @jcolp
Thank you for you reply.
I set to RTP set debug on.
I’m honest; I’m not good at reading this debugging.
Find the result below.
Just a few background considerations on IP addresses:
93.38.XXX.XXX is the public address of my office.
100.104.XXX.XXX: private address (NAT) of my mobile phone
109.118.XX.XX: public address of my mobile phone.
Below is the RTP debug output:
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024474, ts 000160, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024475, ts 000320, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024476, ts 000480, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024477, ts 000640, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024478, ts 000800, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024479, ts 000960, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024480, ts 001120, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024481, ts 001280, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024482, ts 001440, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024483, ts 001600, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024484, ts 001760, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024485, ts 001920, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024486, ts 002080, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024487, ts 002240, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024488, ts 002400, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024489, ts 002560, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024490, ts 002720, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024491, ts 002880, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024492, ts 003040, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024493, ts 003200, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024494, ts 003360, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024495, ts 003520, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024496, ts 003680, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024497, ts 003840, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024498, ts 004000, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024499, ts 004160, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
> 0x5627071afcb0 -- Strict RTP qualifying stream type: audio
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024500, ts 004320, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024501, ts 004480, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024502, ts 004640, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
> 0x5627071afcb0 -- Strict RTP switching source address to 109.118.XX.XX:59726
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000010, ts 2755771633, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024503, ts 004800, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000011, ts 2755771793, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024504, ts 004960, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000012, ts 2755771953, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024505, ts 005120, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024506, ts 005280, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000013, ts 2755772113, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000014, ts 2755772273, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024507, ts 005440, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000015, ts 2755772433, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024508, ts 005600, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000016, ts 2755772593, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024509, ts 005760, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000017, ts 2755772753, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024510, ts 005920, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000018, ts 2755772913, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024511, ts 006080, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000019, ts 2755773073, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024512, ts 006240, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000020, ts 2755773233, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024513, ts 006400, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000021, ts 2755773393, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024514, ts 006560, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000022, ts 2755773553, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024515, ts 006720, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000023, ts 2755773713, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024516, ts 006880, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000024, ts 2755773873, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024517, ts 007040, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024518, ts 007200, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000025, ts 2755774033, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000026, ts 2755774193, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024519, ts 007360, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000027, ts 2755774353, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024520, ts 007520, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000028, ts 2755774513, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024521, ts 007680, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000029, ts 2755774673, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024522, ts 007840, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000030, ts 2755774833, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024523, ts 008000, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000031, ts 2755774993, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024524, ts 008160, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000032, ts 2755775153, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024525, ts 008320, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000033, ts 2755775313, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024526, ts 008480, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000034, ts 2755775473, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024527, ts 008640, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024528, ts 008800, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000035, ts 2755775633, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000036, ts 2755775793, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024529, ts 008960, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000037, ts 2755775953, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024530, ts 009120, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000038, ts 2755776113, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024531, ts 009280, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000039, ts 2755776273, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024532, ts 009440, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000040, ts 2755776433, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024533, ts 009600, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000041, ts 2755776593, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024534, ts 009760, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000042, ts 2755776753, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024535, ts 009920, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000043, ts 2755776913, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024536, ts 010080, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000044, ts 2755777073, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024537, ts 010240, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000045, ts 2755777233, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024538, ts 010400, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000046, ts 2755777393, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024539, ts 010560, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000047, ts 2755777553, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024540, ts 010720, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Got RTP packet from 109.118.XX.XX:59726 (type 00, seq 000048, ts 2755777713, len 000160)
Sent RTP P2P packet to 93.38.XXX.XXX:10108 (type 00, len 000160)
Got RTP packet from 93.38.XXX.XXX:10108 (type 00, seq 024541, ts 010880, len 000160)
Sent RTP P2P packet to 100.104.XXX.XXX:7078 (type 00, len 000160)
Thank you very much in advance for your precious help.
Hi @david551 ,
You were fantastic! Your eye works incredibly well! I removed the final “s,” and now everything works correctly!
Thanks also for the support of the past few days!
I am very grateful to you!