How To Force Asterisk To Reply With Floating IP With Chan_sip ?

Home » Asterisk Users » How To Force Asterisk To Reply With Floating IP With Chan_sip ?
Asterisk Users No Comments

Hello,

I’m setting up a new cluster that must replace several old Asterisk instances. For various reasons, this new cluster must use chan_sip (migration to PJSIP
is planned in a later phase).

This new cluster uses VRRP in active/passive mode:
– at any time, only one cluster member is active,
– when a member becomes active, it inherits several floating IP addresses, it changes its IP configuration (with ip rule or ip route statements) and it starts Asterisk.

Beside tweaking Linux IP configuration, is there a way to teach Asterisk’s chan_sip “to always reply using as IP source, the destination IP it got the SIP request from” ?

For instance, if Asterisk’s chan_sip listen on IPs IP A, Ip B and IP C, all belonging to the same network, then I want Asterisk to reply with IP A for any request it received through IP A.

Looking at ASTDB SIP/Registry instances, Asterisk does not save the IP
address it heard an incoming REGISTER with.

Did I miss something ?
Suggestions ?

Best regards