[SR-Users] no socket found for match second RR

Ovidiu Sas osas at voipembedded.com
Fri Sep 21 16:29:08 CEST 2012


It would need to be per loose_route() call, because a server can have
mixed traffic (real sockets only and real and advertised).
For real sockets, you would want to run the checks.
For advertised, you would not want to run the checks.

Then in the config, you will need to track calls through advertised
addresses and call appropriately loose_route().
Because of this, I implemented the warning disable parameter.
It is not optimal either, because for traffic through real sockets the
warning should be printed.


Regards.
Ovidiu Sas

On Fri, Sep 21, 2012 at 10:18 AM, Juha Heinanen <jh at tutpro.com> wrote:
> Ovidiu Sas writes:
>
>> I forgot to reply to you that I added that warning in the code for the
>> same reason.
>> What do you mean by a parameter that disables looking for the socket?
>
> hi ovidiu,
>
> the piece of code currently looks like this:
>
>                 if (enable_double_rr && is_2rr(&puri.params)) {
>                         /* double route may occure due different IP and port, so force as
>                          * send interface the one advertise in second Route */
>                         if (parse_uri(rt->nameaddr.uri.s,rt->nameaddr.uri.len,&puri)<0) {
>                                 LM_ERR("failed to parse the double route URI\n");
>                                 return RR_ERROR;
>                         }
>                         si = grep_sock_info( &puri.host, puri.port_no, puri.proto);
>                         if (si) {
>                                 set_force_socket(_m, si);
>                         } else {
>                                 if (enable_socket_mismatch_warning)f
>                                         LM_WARN("no socket found for match second RR\n");
>                         }
>
> when the "disable socket check" parameter would have been given either
> globally or per loose_route() call, then this part of the code would not
> be executed at all:
>
>                         si = grep_sock_info( &puri.host, puri.port_no, puri.proto);
>                         if (si) {
>                                 set_force_socket(_m, si);
>                         } else {
>                                 if (enable_socket_mismatch_warning)f
>                                         LM_WARN("no socket found for match second RR\n");
>                         }
>
>
> which would save some cpu cycles.
>
> -- juha



More information about the sr-users mailing list