Problem with force send socket.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with force send socket.

Ola Karlsson
Hi List.

Have some problems with the force_send_socket function.

I have one Opensips 1.4 server with two physical interfaces and one alias interface.

eth0    195.x.x.101/28
eth0:1 195.x.x.106/28

eth1:   10.x.x.x

The script looks something like this where I use the force_send_socket function.

if(uri=~"sip:0009.*") {
                force_send_socket(udp:195.x.x.106:5060);
                strip(4);
                rewritehostport("195.x.x.102:5060");
                route(1);
}

In the end the Via field is set to 106 but NOT the source IP that stays .101 ..

Am I doing something wrong with this function or is OpenSIPS giving me a hard time?

/Ola

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with force send socket.

Bogdan-Andrei Iancu
Hi Ola,

Is your opensips listening on udp:195.x.x.106:5060 ?

Regards,
Bogdan

Ola Karlsson wrote:

> Hi List.
>
> Have some problems with the force_send_socket function.
>
> I have one Opensips 1.4 server with two physical interfaces and one
> alias interface.
>
> eth0    195.x.x.101/28
> eth0:1 195.x.x.106/28
>
> eth1:   10.x.x.x
>
> The script looks something like this where I use the force_send_socket
> function.
>
> if(uri=~"sip:0009.*") {
>                 force_send_socket(udp:195.x.x.106:5060);
>                 strip(4);
>                 rewritehostport("195.x.x.102:5060");
>                 route(1);
> }
>
> In the end the Via field is set to 106 but NOT the source IP that
> stays .101 ..
>
> Am I doing something wrong with this function or is OpenSIPS giving me
> a hard time?
>
> /Ola
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with force send socket.

Ola Karlsson
Lightning fast Bogdan.. ;-)

I think so.
#opensips
Listening on
             udp: 127.0.0.1 [127.0.0.1]:5060
             udp: 195.x.x.101 [195.x.x.101]:5060
             udp: 195.x.x.106 [195.x.x.106]:5060
             udp: 10.x.x.102 [10.x.x.102]:5060
             tcp: 127.0.0.1 [127.0.0.1]:5060
             tcp: 195.x.x.101 [195.x.x.101]:5060
             tcp: 195.x.x.106 [195.x.x.106]:5060
             tcp: 10.x.x.102 [10.x.x.102]:5060

#netstat -lut | grep sip
tcp        0      0 10.100.100.102:sip      *:*                     LISTEN    
tcp        0      0 195.x.x.106:sip     *:*                     LISTEN    
tcp        0      0 195.x.x.101:sip     *:*                     LISTEN    
tcp        0      0 localhost:sip           *:*                     LISTEN    
udp        0      0 10.x.x.102:sip      *:*                               
udp        0      0 195.x.x.106:sip     *:*                               
udp        0      0 195.x.x.101:sip     *:*                               
udp        0      0 localhost:sip           *:*                               

/Ola

On Tue, Nov 11, 2008 at 7:37 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Ola,

Is your opensips listening on udp:195.x.x.106:5060 ?

Regards,
Bogdan

Ola Karlsson wrote:
Hi List.

Have some problems with the force_send_socket function.

I have one Opensips 1.4 server with two physical interfaces and one alias interface.

eth0    195.x.x.101/28
eth0:1 195.x.x.106/28

eth1:   10.x.x.x

The script looks something like this where I use the force_send_socket function.

if(uri=~"sip:0009.*") {
               force_send_socket(udp:195.x.x.106:5060);
               strip(4);
               rewritehostport("195.x.x.102:5060");
               route(1);
}

In the end the Via field is set to 106 but NOT the source IP that stays .101 ..

Am I doing something wrong with this function or is OpenSIPS giving me a hard time?

/Ola
------------------------------------------------------------------------

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with force send socket.

Bogdan-Andrei Iancu
Hi Ola,

If the VIA is set to the forced outbound interface, are you sure there
is no routing rules on your system to force outbound messages from .106
to .101 ?

Regards,
Bogdan

Ola Karlsson wrote:

> Lightning fast Bogdan.. ;-)
>
> I think so.
> #opensips
> Listening on
>              udp: 127.0.0.1 <http://127.0.0.1> [127.0.0.1
> <http://127.0.0.1>]:5060
>              udp: 195.x.x.101 [195.x.x.101]:5060
>              udp: 195.x.x.106 [195.x.x.106]:5060
>              udp: 10.x.x.102 [10.x.x.102]:5060
>              tcp: 127.0.0.1 <http://127.0.0.1> [127.0.0.1
> <http://127.0.0.1>]:5060
>              tcp: 195.x.x.101 [195.x.x.101]:5060
>              tcp: 195.x.x.106 [195.x.x.106]:5060
>              tcp: 10.x.x.102 [10.x.x.102]:5060
>
> #netstat -lut | grep sip
> tcp        0      0 10.100.100.102:sip      *:*                    
> LISTEN    
> tcp        0      0 195.x.x.106:sip     *:*                    
> LISTEN    
> tcp        0      0 195.x.x.101:sip     *:*                    
> LISTEN    
> tcp        0      0 localhost:sip           *:*                    
> LISTEN    
> udp        0      0 10.x.x.102:sip      
> *:*                              
> udp        0      0 195.x.x.106:sip    
> *:*                              
> udp        0      0 195.x.x.101:sip    
> *:*                              
> udp        0      0 localhost:sip          
> *:*                              
>
> /Ola
>
> On Tue, Nov 11, 2008 at 7:37 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Ola,
>
>     Is your opensips listening on udp:195.x.x.106:5060 ?
>
>     Regards,
>     Bogdan
>
>     Ola Karlsson wrote:
>
>         Hi List.
>
>         Have some problems with the force_send_socket function.
>
>         I have one Opensips 1.4 server with two physical interfaces
>         and one alias interface.
>
>         eth0    195.x.x.101/28
>         eth0:1 195.x.x.106/28
>
>         eth1:   10.x.x.x
>
>         The script looks something like this where I use the
>         force_send_socket function.
>
>         if(uri=~"sip:0009.*") {
>                        force_send_socket(udp:195.x.x.106:5060);
>                        strip(4);
>                        rewritehostport("195.x.x.102:5060");
>                        route(1);
>         }
>
>         In the end the Via field is set to 106 but NOT the source IP
>         that stays .101 ..
>
>         Am I doing something wrong with this function or is OpenSIPS
>         giving me a hard time?
>
>         /Ola
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         Users mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>          
>
>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users