Patches item #2706135, was opened at 2009-03-23 09:50 Message generated for change (Tracker Item Submitted) made by ptdamore You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2706135&group_id=232389
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Phil D'Amore (ptdamore) Assigned to: Nobody/Anonymous (nobody) Summary: Change to listen= syntax to support per-interface advertised Initial Comment: [This is the patch for an idea I posted several weeks ago to the devel list. Below is the original list posting as an explanation.] The patch extends the idea of the advertised_address and advertised_port parameters so that it is possible to bind such an address to each listen= statement. Syntax-wise, it works like this: listen=[proto:]host[:port][ AS host[:port]] This new AS host[:port] syntax binds the advertised address specifically to the corresponding socket_info structure. If such an address is specified, it will be used before the address specified as advertised_address, or set in the set_advertised_address function for packets being sent on that particular socket. If it is not specified, then the old methods work as before. The core has been modified so that address tuples using the advertised address work interchangeably with the real address where you'd expect them to. grep_sock_info and find_si have been updated to allow this. Therefore, it is not necessary to explicitly name your advertised address on an alias= line. The following are now equivalent: force_send_socket(udp:adv_address:adv_port); force_send_socket(udp:real_address:real_port); Note we don't specify protocol on the advertised address. The way I see things, it makes no sense to advertise a different protocol, so it inherits the protocol of the socket. Via construction is affected in the same way that the old global advertised_address does, except the Via is written specifically for the socket used to send the message. Lump substitution is also affected. The following lump substitutions are aware of this new facility: SUBST_RCV_IP SUBST_RCV_PORT SUBST_RCV_ALL SUBST_SND_IP SUBST_SND_PORT SUBST_SND_ALL As a result of this, I was able to stop using record_route_preset in my own config, and just use standard record_route. This winds up working much better, because double-rr works properly, and add_rr_param now works as expected for me, where it was a problem using record_route_preset. Additionally, registrar and usrloc had to be modified: registrar - update the add_sock_hdr function to put the advertised address in the message instead of the real address. This allows registration information to be replicated between multi-homed proxies, and the correct interface on the peer can be used. usrloc - update db_insert_ucontact to store the advertised address in the database instead of the real address. Same reasoning as the mods to registrar. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2706135&group_id=232389 _______________________________________________ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel