Hey, i have a verry basic setup using chan_sip, but still need to use it since we need dahua support
Anway, setting up a simple test case like below
When i start a call from 6000 to 6001 , everything works
6000 = client inside lan
6001 = linphone on android
port 5060 opened, also RTP port range
When calling to 6001 when 6001 is connected to local lan (wifi), all works, also early video before pickup
When 6001 is connected to a cellular network, i only see video AFTER i pickup, but not in early stage … what could be wrong? why is early video acting different when connected to cellular/mobile network?
Here are logs from pjsip, and config, my router external is doing port forwarding from 9051 to 5160
also tried 5160 to 5160 and changing below, also tried media_address as IP instead of DNS, no difference …
Played also with these settings below, no difference
1-2 ) All these below i tested , domain.com is the public IP of my asterisk server, ther are always the same configured, i also tested IP instead of hostname
The phone’s addresses, not Asterisk: signalling: xx.xx.82.189; media: 100.81.102.232
The B leg INVITE appears after the OK for the A leg’s BYE’s OK. That’s not because they happened in that order, which would have made early medial possible, but because the order is shuffled in the log. I think the BYE appears twice in one of them.
The expectation is that you will make the evidence easy for us to examine.
xx.xx.75.66 => 6002 IP = IP from my cellular provider (dynamic)
xx.xx.34.18:9051 => public IP asterisk server
xx.xx.102.232 => unknown to me ? ice/stun ? something maybe from linphone client?
There’s no incoming video from the callee, so Asterisk cannot learn the correct video media address, based, on symmetric media, so has to rely on the SDP. As a result, video from the caller goes to xx.xx.102.232, and, and is, presumably, lost.
Audio probably works because the callee sends RTP first, allowing symmetric media to work.
Symmetric media is a workaround for endpoints behind NAT that do not properly understand they are behind NAT.
It is quite possible that the mobile network is assigning different addresses from its NAT pool to signalling and media, or even to media at different times.
NAT is a kludge.
SIP wasn’t designed for NAT.
Mobile phone networks weren’t designed to allow servers to be run on mobiles, and although people insist on calling them clients, SIP user agents are servers for incoming calls, and are server like, even for outgoing ones, as far as incoming media is concerned.
Once you add NAT and mobiles, you are relying heavily on workarounds getting things right.
You will either have to get the phone app to work out its own address correctly, or get it to send video itself, in order to prime the symmetric media operation. I don’t think either of those can be addressed from the Asterisk end.
hey @david551 , i need to figure out what this IP is : xx.xx.102.232
i now tried a different sofphone app, and early media now works with the same asterisk config, so maybe Linphone is using some service thats killing my early media
gonna make some new logs with the other softphone so i can compare
but anyway, it looks like the asterisk config is correct, just need to figure out the : xx.xx.102.232 and probably i need to configure it somewhere in asterisk when i use Linphone?
You can’t configure that in Asterisk. Asterisk takes that information from the SDP, from the far side, and, if you have rtp symmetric, will override with the source address of media coming to Asterisk on the correct Asterisk side port for that stream. Both of these use information provided by the remote side.