Hi all,
I have an infrastructure with Kamailio (reg), Asterisks farm, and Kamailio (4.3) proxy which dispatches calls.
Trunk-1 (Vlan_A)
Kam(reg) <> Asterisk Farm (5) <> Kam(proxy) <> Trunk-2 (Vlan_B)
Trunk-3 (Vlan_C)
For each trunk, I have to use the IP of the VLAN interface in "contact header". That means when I need to send a call to Trunk-1 I have to set Vlan_A IP address on the contact header.
I have achieved that by rewriting Contact Header.
###
remove_hf("Contact:");
append_hf("Contact: <sip:$fU@$var(recieved)>\r\n", "Call-ID"); #by using db
###
But this causes a problem, Kamailio does not forward the BYE message that comes from Trunk-X to Asterisk (In before, the BYE message had Asterisk IP in R-URI). However, when I use topoh
module it forward properly for one trunk. But I can not set multiple mask IP in topoh module.
I'm using the dialog module and I thought it can handle all requests in one dialog to forward to the correct asterisk but it did not.
Is there any suggestion for this case?
And also how many sub-interfaces can Kamailio handle for a good performance? Or do you suggest multiple Kamailio instances instead of multiple sub-interfaces on one server?