On an Asterisk 22.0.0 instance, I’ve observed the following behaviour.
This instance is running a cloud host with two public IPv4 IPs. One of these IP is a floating one (ie it can be easily moved from one host to another one) while the other one cannot be reused on another host. The default IP is the fixed one.
So, to be able to move one day Asterisk t host to a different, I’m configuring a “simpletrans” PJSIP transport with the following [redacted] content (1.2.3.4 being the floating IP):
This transport is the only one defined in my config. On the other hand, I’ve got an endpoint for which “transport=simpletrans” is ABSENT from pjsip.conf. For this endpoint, I’ve got no audio with the following details:
SDP mentions the floating IP
Signalling uses floating IP
RTP stream is sent from fixed IP (not the floating one).
When for the same “transport=simpletrans” is PRESENT, all the above applies except that this time RTP stream is sent from the floating one and I can hear audio.
Can you reproduce this (on a later Asterisk LTS 22 version if more practical) ?
I don’t know why specifying a transport would do that, it should all be the same, but a transport controls what is bound for the SIP signaling and what goes in the SDP. It doesn’t control what is bound for RTP, and by default it will do wildcard so it is then up to the routing table to determine what interface and source IP address is used. If you want to be explicit then an option would be to set “media_address”[1] and “bind_rtp_to_media_address”[2] on the endpoint.
I don’t know why specifying a transport would do that, it should all be the same, but a transport controls what is bound for the SIP signaling and what goes in the SDP. It doesn’t control what is bound for RTP, and by default it will do wildcard so it is then up to the routing table to determine what interface and source IP address is used. If you want to be explicit then an option would be to set “media_address”[1] and “bind_rtp_to_media_address”[2] on the endpoint.