[SR-Users] Need help in routing configuration

Nelson Pereira npereira at protus.com
Thu May 20 13:39:43 CEST 2010


Here is the info requested:

listen=udp:10.98.6.6:5060
listen=tcp:10.98.6.6:5060
listen=tcp:10.98.6.6:5065
listen=tcp:10.98.6.6:5066
listen=tcp:10.98.6.6:5067



root at qa-qsuitePBX-01:/etc/kamailio# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:78:c5:c7
          inet addr:10.98.6.5  Bcast:10.98.7.255  Mask:255.255.254.0
          inet6 addr: fe80::20c:29ff:fe78:c5c7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1243947 errors:0 dropped:0 overruns:0 frame:0
          TX packets:118228 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:98039640 (93.4 MB)  TX bytes:24794667 (23.6 MB)
          Base address:0x1400 Memory:f4820000-f4840000

eth1      Link encap:Ethernet  HWaddr 00:0c:29:78:c5:d1
          inet addr:10.98.6.6  Bcast:10.98.7.255  Mask:255.255.254.0
          inet6 addr: fe80::20c:29ff:fe78:c5d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1184823 errors:0 dropped:0 overruns:0 frame:0
          TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:89172609 (85.0 MB)  TX bytes:30206 (29.4 KB)
          Base address:0x1440 Memory:f4840000-f4860000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:434 errors:0 dropped:0 overruns:0 frame:0
          TX packets:434 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:238102 (232.5 KB)  TX bytes:238102 (232.5 KB)



root at qa-qsuitePBX-01:/etc/kamailio# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.98.6.0       0.0.0.0         255.255.254.0   U     0      0        0 eth0
10.98.6.0       0.0.0.0         255.255.254.0   U     0      0        0 eth1
0.0.0.0         10.98.6.1       0.0.0.0         UG    100    0        0 eth0
0.0.0.0         10.98.6.1       0.0.0.0         UG    100    0        0 eth1
root at qa-qsuitePBX-01:/etc/kamailio#





-----Original Message-----
From: Klaus Darilion [mailto:klaus.mailinglists at pernau.at] 
Sent: Wednesday, May 19, 2010 4:44 PM
To: Nelson Pereira
Cc: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Need help in routing configuration

 From Kamailio point of view everything is OK. There are just some 
issues with your network/TCP configuration.

Kamailio is unable to open a TCP connection to 10.98.118.20, this can 
have several reasons:
- no route to 10.98.118.20
- at 10.98.118.20 there is no application listening on port 5060
- a firewall between you and 10.98.118.20
- a local network configuration problem

It would be useful if you could post your Kamailio "listen=" 
configuration, an "ifconfig" dump and a "route -n" dump.

regards
Klaus

configuration

Am 19.05.2010 20:11, schrieb Nelson Pereira:
> I did see that the TM module syntax did change, so I made the changes in the route, and it looks like this:
>
> # main request routing logic
>
> route{
>          if (!mf_process_maxfwd_header("10")) {
>                  sl_send_reply("483","Too Many Hops");
>                  exit;
>          };
>          if (msg:len>=  2048 ) {
>                  sl_send_reply("513", "Message too big");
>                  exit;
>          };
>          if (loose_route()) {
>                  append_hf("P-hint: rr-enforced\r\n");
>                  route(1);
>          };
>          if (!uri==myself) {
>                  append_hf("P-hint: outbound\r\n");
>                  route(1);
>          };
>          route(1);
> }
>
> route[1]
> {
>          if (src_ip==10.98.6.5) {
>                          t_relay_to_tcp("10.98.118.20", "5060");
>                  }
>                  else {
>                         t_relay_to_tcp();
>                 }
> }
>
>
> This still does not work, im getting the bellow in syslog:
>
> May 19 14:05:09 qa-qsuitePBX-01 /usr/sbin/kamailio[2215]: WARNING:<core>  [tcp_main.c:1200]: WARNING: tcp_do_connect 10.98.118.20:5060: could not find corresponding listening socket for 10.98.6.5, using default...
> May 19 14:05:19 qa-qsuitePBX-01 /usr/sbin/kamailio[2227]: ERROR:<core>  [tcp_main.c:3748]: connect 10.98.118.20:5060 failed (timeout)
> May 19 14:05:39 qa-qsuitePBX-01 /usr/sbin/kamailio[2215]: WARNING:<core>  [tcp_main.c:1200]: WARNING: tcp_do_connect 10.98.118.20:5060: could not find corresponding listening socket for 10.98.6.5, using default...
> May 19 14:05:54 qa-qsuitePBX-01 /usr/sbin/kamailio[2227]: ERROR:<core>  [tcp_main.c:3748]: connect 10.98.118.20:5060 failed (timeout)
> May 19 14:07:53 qa-qsuitePBX-01 /usr/sbin/kamailio[2215]: WARNING:<core>  [tcp_main.c:1200]: WARNING: tcp_do_connect 10.98.118.20:5060: could not find corresponding listening socket for 10.98.6.5, using default...
>
>
>
> Nelson Pereira
>
>
> -----Original Message-----
> From: sr-users-bounces at lists.sip-router.org [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Alex Balashov
> Sent: Wednesday, May 19, 2010 2:01 PM
> To: sr-users at lists.sip-router.org
> Subject: Re: [SR-Users] Need help in routing configuration
>
> You might do well to specify what about it "doesn't work," e.g. log
> messages and such.
>
> If you're using Kamailio 3.0+, the reason is most likely that t_relay()
> invocation syntax has changed:
>
> http://www.kamailio.org/docs/modules/3.0.x/modules/tm.html#t_relay
>
> On 05/19/2010 01:41 PM, Nelson Pereira wrote:
>
>> I have the bellow setup for openser, yet this wont work in Kamilio.
>>
>> Wondering if anyone could help to make this routing code work?
>>
>> What Im looking to do is receive Invites in UDP and relaying it via TCP….
>>
>> route{
>>
>> if (!mf_process_maxfwd_header("10")) {
>>
>> sl_send_reply("483","Too Many Hops");
>>
>> exit;
>>
>> };
>>
>> if (msg:len>= 2048 ) {
>>
>> sl_send_reply("513", "Message too big");
>>
>> exit;
>>
>> };
>>
>> if (loose_route()) {
>>
>> append_hf("P-hint: rr-enforced\r\n");
>>
>> route(1);
>>
>> };
>>
>> if (!uri==myself) {
>>
>> append_hf("P-hint: outbound\r\n");
>>
>> route(1);
>>
>> };
>>
>> route(1);
>>
>> }
>>
>> route[1]
>>
>> {
>>
>> if (src_ip==10.98.6.5) {
>>
>> if (dst_port==5060) {
>>
>> t_relay("tcp:10.98.118.20:5060");
>>
>> }
>>
>> if (dst_port==5065) {
>>
>> t_relay("tcp:10.98.118.20:5065");
>>
>> }
>>
>> else if (dst_port==5066) {
>>
>> t_relay("tcp:10.98.118.20:5066");
>>
>> }
>>
>> else if (dst_port==5067) {
>>
>> t_relay("tcp:10.98.118.20:5067");
>>
>> }
>>
>> # else {
>>
>> # t_relay("tcp:10.98.118.20:5060");
>>
>> # }
>>
>> }
>>
>> else {
>>
>> t_relay("udp:10.98.6.5:5060");
>>
>> };
>>
>> }
>>
>> *Nelson Pereira*
>>
>> Senior Network Specialist
>>
>> Protus<http://www.protus.com/>
>> npereira at protus.com<mailto:name at protus.com>
>> phone: 613.733.0000 ext.528
>> MyFax: 613.822.5083
>>
>> _MyFax.com<http://www.myfax.com/>_ | _my1voice.com
>> <http://www.my1voice.com/>_ | _Campaigner.com<http://www.campaigner.com/>_
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


More information about the sr-users mailing list