On Mon, Feb 6, 2023 at 3:00 AM Daniel-Constantin Mierla <miconda(a)gmail.com>
wrote:
By changing contact addresses to kamailio ip, you lose
the routing
information of the call. The proxy should leave the contact address as
it is (eventually updating for nat traversal purposes) and do record
routing to ensure that requests within dialog come through proxy as well.
Makes sense.
My goal is not to hide internal topology-- I'm just trying to make the most
compatible platform. A Contact with an unreachable domain felt wrong.
Without using kam to modify the packets, kam forwards/sends to my sip
provider:
INVITE
sip:+12125551212@siptrunk.example.com:5060;transport=UDP SIP/2.0.
Record-Route:
<sip:<KAM_PUB_ADDR>;lr;ftag=BT0Fm09r5mcpK;did=ee9.a235;nat=yes>.
Via: SIP/2.0/UDP
<KAM_PUB_ADDR>:5060;branch=z8hG4bK29ea.49cb328da4d0bb2e14f5c1858de9c558.0.
Via: SIP/2.0/UDP
<UAS_PRIV_ADDR>;rport=5060;branch=z8hG4bKp46Qc44j2DX4a.
Contact: <sip:<UAS_PRIV_ADDR>:5060>.
[...]
Are you saying that as long as an Invite and OK have correct/public
addresses in record-route, then it's okay/normal/expected for the contact
field to contain a private/unreachable ip address? Is there something
besides topoh to just fix/change the contact in this case?
If I did use topoh, can I make the mask_ip be the public ip address of
kamailio-- like by modparaming to $RAi or a pre-processor define (I have
many kams in front of many private uas and don't want to maintain separate
configs) ?
Thanks