Community discussions

MikroTik App
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Trouble with policy routing for voip sip trunk

Wed Jun 04, 2014 7:08 pm

Good day,

I really hope that some one can help me here.

I have been struggling for about a week now at a client trying to get thier PBX to use a separate line.

Summary of my problem:

What I have done:
- Setup a firewall list off all ips to be marked to ues ISP2
- Added a mangle rule, prerouting, src = addressList, action is mark route ISP2
- Added NAT masqurade rule for ISP2
- Added route with routing mark ISP2

This is all in addition to the working router with all devices running on ISP1.

Now my problem.

If I add a pc / desktop IP to the address list, all is well. Their internet is routed through ISP2 and all works happily. The same for multiple address. (ie multiple cpcs)

Now the minute I add my pbx ip to the address list, both my two SIP trunks go offline, and they say trying..
,17:39:33,192.168.1.30,"<13>Jun  3 17:40:15 asterisk: 
[20140603 174015.353] NOTIC[06862] chan_sip.c:25898: find a peer device,host is: 
"
,17:39:44,192.168.1.30,"<13>Jun  3 17:40:26 asterisk: 
[20140603 174026.847] NOTIC[06862] chan_sip.c:15877:    -- Registration for '278********@sip.nexus.co.za' timed out, trying again (Attempt #4)
"
,17:39:44,192.168.1.30,"<13>Jun  3 17:40:26 asterisk: 
[20140603 174026.950] NOTIC[06862] chan_sip.c:15877:    -- Registration for '278********@sip.mweb.net' timed out, trying again (Attempt #4)
"
,17:39:49,192.168.1.30,"<13>Jun  3 17:40:31 asterisk: 
[20140603 174031.330] NOTIC[06862] chan_sip.c:25898: find a peer device,host is: 
"
,17:39:51,192.168.1.30,"<12>Jun  3 17:40:33 asterisk: 
[20140603 174033.247] WARN [06862] chan_sip.c:4585: Retransmission timeout reached on transmission 29808-1662610c7447c5980566ca2a40@pbxgenacc.dyndns.org for seqno 105 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
However they both happily connect when I go through the default route to ISP1.


So that suggests that I have some where messed up a setting, and I have gone through everything multiple times and I cant find it.

Both the PPPoE Clients are from the same dsl provider, I have the same settings in the pppoe clients (except for credentials)

Are the sip packets somehow not being caught by the src address? ( I have tried identifying by mac address as well and no luck), but it looks as though they are being caught by the mangle, So i really dont know.

I have attached my config export for those who want some deeper info.
You do not have the required permissions to view the files attached to this post.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: Trouble with policy routing for voip sip trunk

Thu Jun 05, 2014 10:27 pm

Ok,

So I have been doing some more investigating into the issue, and I think I mayb have found the cause,

My primary line and my VoIP line are from the same provider. Below is the address I have received from them:

admin@Mikrotik Switch] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 192.168.1.1/24 192.168.1.0 bridge-local
1 192.168.2.45/24 192.168.2.0 ether2-gateway2
2 192.168.0.2/24 192.168.0.0 ether1-gateway1
3 D 10.65.74.63/32 10.112.112.111 3G
4 D 41.143.253.132/32 41.133.98.1 VoIP DSL
5 D 41.143.99.239/32 41.133.98.1 ADSL

Please take note of ip 4 and 5.


I did some packet sniffing on the VoIP interface, and The weirdest this is there,

There are tx packets with a src address of: 41.143.99.239 on the VoiP DSL interface???
How is this possible? it has the source address of a different interface? And obviously my sip provider is responding to the wrong address. Now I have no Idea what could be causing this.

But I did notice, if I disable ADSL interface, then it works. So this must definitely have something to do with the two being on the same network.


Please could some one with abit more networking knowledge help me out here, and rty and explain what is happening? And how I can work around this. However this is only happening with my SIP packets, other packets seems fine. So I though it might have something to do wiht the NAT travel mechanism on the PBX. so I removed the dyndns host name and put in the ip of the VoIP DSL line directly, and it still showed up in the packet sniffer with a src address of the DSL interface.

Who is online

Users browsing this forum: arm920t, Google [Bot], mojojojo, pajapatak and 108 guests