wiki tells:
$fs - reference to the forced socket for message sending (if any) in the form proto:ip:port
should it be [proto:]ip:port instead?
-- juha
On 10/17/12 9:28 AM, Juha Heinanen wrote:
wiki tells:
$fs - reference to the forced socket for message sending (if any) in the form proto:ip:port
should it be [proto:]ip:port instead?
why, isn't the proto always in the value of $fs?
Cheers, Daniel
Daniel-Constantin Mierla writes:
$fs - reference to the forced socket for message sending (if any) in the form proto:ip:port
should it be [proto:]ip:port instead?
why, isn't the proto always in the value of $fs?
i have been using this kind of calls without any problems:
force_send_socket(EXTERNAL_IP:EXTERNAL_PORT);
is that is equivalent to
$fs = "EXTERNAL_IP:EXTERNAL_PORT";
if yes, then proto is optional.
-- juha
On 10/17/12 4:34 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
$fs - reference to the forced socket for message sending (if any) in the form proto:ip:port
should it be [proto:]ip:port instead?
why, isn't the proto always in the value of $fs?
i have been using this kind of calls without any problems:
force_send_socket(EXTERNAL_IP:EXTERNAL_PORT);
is that is equivalent to
$fs = "EXTERNAL_IP:EXTERNAL_PORT";
if yes, then proto is optional.
the value returned by $fs is always with proto, afaik. When you assign something to it is just to identify the listening socket, i.e., the given string value is parsed and used to search in the list of local listen sockets and if something matching is found, then $fs is linked to that socket structure.
I think the description is good in regard to its value, maybe would be good to add notes about assignment value.
Cheers, Daniel
Daniel-Constantin Mierla writes:
the value returned by $fs is always with proto, afaik. When you assign something to it is just to identify the listening socket, i.e., the given string value is parsed and used to search in the list of local listen sockets and if something matching is found, then $fs is linked to that socket structure.
I think the description is good in regard to its value, maybe would be good to add notes about assignment value.
ok, i added a sentence to the description text as an attempt to clarify the issue:
It is R/W variable (you can assign values to it directly in configuration file). Transport proto can be omitted when assigning value, in which case it is taken from destination URI of the message.
-- juha
IIRC, port is also optional.
-ovidiu
On Wed, Oct 17, 2012 at 11:27 AM, Juha Heinanen jh@tutpro.com wrote:
Daniel-Constantin Mierla writes:
the value returned by $fs is always with proto, afaik. When you assign something to it is just to identify the listening socket, i.e., the given string value is parsed and used to search in the list of local listen sockets and if something matching is found, then $fs is linked to that socket structure.
I think the description is good in regard to its value, maybe would be good to add notes about assignment value.
ok, i added a sentence to the description text as an attempt to clarify the issue:
It is R/W variable (you can assign values to it directly in configuration file). Transport proto can be omitted when assigning value, in which case it is taken from destination URI of the message.
-- juha
In this case, you will need to specify the port. If no port is specified, then the default 5060 is assumed (I think). If you listen on two interfaces with non standard ports, then not setting the port in fs should not match any interface.
-ovidiu
On Wed, Oct 17, 2012 at 12:41 PM, Juha Heinanen jh@tutpro.com wrote:
Ovidiu Sas writes:
IIRC, port is also optional.
lets say that you have two listening ports on the same ip, one that is used for external traffic and the other for internal. if you leave port out when you force the socket, which socket it is using?
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users