Community discussions

MikroTik App
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Forwarding SIP port to Asterisk PBX Question?

Sat Oct 03, 2009 5:43 pm

Hi there.


I have on Question here that i have no idea why is doing that.

My Question is :


In my company we have a Asterisk PBX working fine , and on the Mikrotik i redirect the SIP port into the Asterisk box , and work fine, the remote user can connect and make phone calls with no problem but if i check the ext that are register on the Asterisk all the remote user are register with the Router Board ip add.

That is a eg



svoip*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
212/212 192.168.1.1 D 2048 Unmonitored
211/211 192.168.1.1 D 2048 Unmonitored
210/210 (Unspecified) D 0 Unmonitored
209/209 (Unspecified) D 0 Unmonitored
208/208 192.168.1.1 D 2048 Unmonitored
207/207 192.168.1.1 D 5061 Unmonitored
206/206 192.168.1.1 D 2051 Unmonitored
205/205 192.168.1.1 D 5061 Unmonitored
204/204 192.168.1.1 D 5060 Unmonitored
203/203 192.168.1.1 D 0 Unmonitored
201/201 192.168.1.1 D 1025 Unmonitored
200/200 192.168.1.1 D 2051 Unmonitored

As you Guys can see all the Extensions are register with the same ip add this ip 192.168.1.1 is my router board ip add.

Does some one know why?


Thanks


Daniel Abreu.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: Forwarding SIP port to Asterisk PBX Question?

Sat Oct 03, 2009 9:00 pm

you probably have both src-nat and dst-nat. can you post the "/ip firewall nat export" results?
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Re: Forwarding SIP port to Asterisk PBX Question?

Mon Oct 05, 2009 10:44 pm

Hi there!


Thanks for the answer


That is my redirect ports running on the router board now


;;; Redirect Port - Server Voip / SIP - UDP
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=5060 protocol=udp in-interface=pppoe-out1 dst-port=5060

6 ;;; Redirect Port - Server Voip / IAX - UDP
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=4569 protocol=udp dst-port=4569


Watch is wrong here?

Thanks

Daniel
 
kthameen
Frequent Visitor
Frequent Visitor
Posts: 87
Joined: Wed Dec 21, 2005 4:22 am
Location: Leuven,Belgium

Re: Forwarding SIP port to Asterisk PBX Question?

Mon Oct 05, 2009 11:00 pm

Can you be clear in your topology and if clients are behing mikrotik forsure pbx will see them as 1 ip coz your routerboard is natted and not routed
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Forwarding SIP port to Asterisk PBX Question?

Mon Oct 05, 2009 11:02 pm

Are those _all_ the rules under "/ip firewall nat", or just the ones that you think are relevant?
If the latter, please post all the rules.
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Re: Forwarding SIP port to Asterisk PBX Question?

Tue Oct 06, 2009 11:14 am

fewi - this is all my rules on my firewall nat table.

kthameen - Thanks very much for tell me about it , but if you can help me out , i just want know how can i route that rather nat into my network.

Thanks alot


Daniel

0 ;;; Masquerade
chain=srcnat action=masquerade

1 ;;; Redirect Port - Server
chain=dstnat action=dst-nat to-addresses=192.168.37.24 to-ports=3389 protocol=tcp dst-port=3389

2 ;;; Redirect Port - Server Voip / TNG
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=7080 protocol=tcp in-interface=pppoe-out1 dst-port=7080

3 ;;; Redirect Port - Server Voip / Webmin
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=10000 protocol=tcp dst-port=10000

4 ;;; Redirect Port - Server Voip / SSH
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=1222 protocol=tcp in-interface=pppoe-out1 dst-port=1222

5 ;;; Redirect Port - Server Voip / SIP - UDP
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=5060 protocol=udp in-interface=pppoe-out1 dst-port=5060

6 ;;; Redirect Port - Server Voip / IAX - UDP
chain=dstnat action=dst-nat to-addresses=192.168.37.25 to-ports=4569 protocol=udp dst-port=4569

7 ;;; Redirect Port - Deskto Sarah / VNC
chain=dstnat action=dst-nat to-addresses=192.168.37.122 to-ports=5940 protocol=tcp dst-port=5940

8 ;;; Redirect Port - Deskto Emma / VNC
chain=dstnat action=dst-nat to-addresses=192.168.37.113 to-ports=5900 protocol=tcp dst-port=5900

9 ;;; Redirect Port - Server NEO / VNC
chain=dstnat action=dst-nat to-addresses=192.168.37.20 to-ports=5920 protocol=tcp dst-port=5920

10 ;;; Redirect Port - Server IT / SSH
chain=dstnat action=dst-nat to-addresses=192.168.37.23 to-ports=2222 protocol=tcp in-interface=pppoe-out1 dst-port=2222
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

Re: Forwarding SIP port to Asterisk PBX Question?

Mon Oct 19, 2009 10:01 am

Thanks for all the help guys!


snowman040 , i have done the tip that you told me and it work!


Thanks very much , problem solve !


Daniel Abreu.