OK, I touched off a controversy with my use of the word "deprecated" that I did not intend, as the implied intellectual or policy commitment to that word is not really strong. :-)
What I meant through that particular choice of words is that there is, among those with some lengthy experience with the OpenSER pedigree, a recognised set of core functions and ancient modules which correspond to a different era of SER/OpenSER, and are not complementary to the ways of doing things that are concomitant with the present generation of the system.
Examples from modules include most of the `avpops` module functions, as well as the `usr_preferences` table - both take us back to a time before generic SQL queries and arbitrary data sources were a first-class aspect of Kamailio, as with the `sqlops` module, `htable`, etc.
In the core, there are lots of functions such as strip(), prefix(), rewritehostport(), and, in my view, force_send_socket(). These functions don't take PV arguments, and are superceded by the more flexible direct manipulation of the RURI, the destination set, and $fs, along with the wealth of transformations available nowadays, which can be chained.
Not everyone shares this exact set of tacit assumptions, I imagine, and I think that's what got folk exercised when I said "deprecated". These functions will surely remain for backward compatibility.
-- Alex
On Mon, Oct 08, 2018 at 02:07:23PM +0300, Juha Heinanen wrote:
Le 08/10/2018 à 02:27, Alex Balashov a écrit :
Hi,
- force_send_socket() is essentially deprecated in favour of mutating
$fs:
$fs = 'udp:67.215.186.219:5060';
According to wiki, $fs cannot deprecate force_send_socket.
In force_send_socket, proto can be left out:
force_send_socket
Force to send the message from the specified socket (it _must_ be one of the sockets specified with the “listen” directive). If the protocol doesn't match (e.g. UDP message “forced” to a TCP socket) the closest socket of the same protocol is used.
wheres:
$fs - Forced socket
$fs - reference to the forced socket for message sending (if any) in the form proto:ip:port
-- Juha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users