Page 1 of 1

SIP Problem

Posted: Wed Apr 14, 2010 9:14 pm
by hvz
Hi All,

I have a couple of RB750s (V4.5) running with Ubiquiti AP and CPEs. WAN is loadbalanced between 2 ADSL lines.

While connecting to my ADSL modem from my PC I can make & receive calls via my VOIP provider without any problem. One I connect onto a AP the problem starts. Most of the time I can make & receive calls but from time to time I can not make a call or receive one. Running wireshark I can see that the signaling is working, binding (STUN) request gets a binding response but sometimes the "invite" (SIP) request does not receive a "trying" response while initiating a call. I am sure the response is sent but it gets lost/blocked somewhere on my network.

SIP helper makes no difference.

This is my mangle config:
--------------------------------------------------------------------
add action=change-mss chain=forward comment="" disabled=no in-interface=WAN1 new-mss=clamp-to-pmtu protocol=tcp tcp-flags=\
syn tcp-mss=1450-65535
add action=change-mss chain=forward comment="" disabled=no in-interface=WAN2 new-mss=clamp-to-pmtu protocol=tcp tcp-flags=\
syn tcp-mss=1450-65535
add action=change-mss chain=forward comment="" disabled=no new-mss=clamp-to-pmtu out-interface=WAN1 protocol=tcp \
tcp-flags=syn tcp-mss=1450-65535
add action=change-mss chain=forward comment="" disabled=no new-mss=clamp-to-pmtu out-interface=WAN2 protocol=tcp \
tcp-flags=syn tcp-mss=1450-65535
add action=mark-connection chain=input comment="WAN1 - Input" disabled=no in-interface=WAN1 new-connection-mark=wlan1_conn \
passthrough=yes
add action=mark-connection chain=input comment="WAN2 - Input" disabled=no in-interface=WAN2 new-connection-mark=wlan2_conn \
passthrough=yes
add action=mark-routing chain=output comment="WAN1 - Output" connection-mark=wlan1_conn disabled=no new-routing-mark=\
to_wlan1 passthrough=yes
add action=mark-routing chain=output comment="WAN2 - Output" connection-mark=wlan2_conn disabled=no new-routing-mark=\
to_wlan2 passthrough=yes
add action=mark-connection chain=forward comment="" connection-type=sip disabled=no new-connection-mark=voip-conn \
passthrough=yes
add action=mark-connection chain=forward comment="" disabled=no dst-port=5060 new-connection-mark=voip-conn passthrough=\
yes protocol=udp
add action=mark-packet chain=forward comment="" connection-mark=voip-conn disabled=no new-packet-mark=voip-packet \
passthrough=no

---------------------------------------------------------------------
Any help would be much appreciated.

Thanks
Hugo

Re: SIP Problem

Posted: Thu Apr 15, 2010 3:26 pm
by sewlist
Hi There

Did u find a solution for your problem, my new post seems somewhat related while we also losing some connection, tracking it seems there is no problem

S

Re: SIP Problem

Posted: Thu Apr 15, 2010 4:19 pm
by hvz
Hi S,

I have been struggeling with this for some time now but still no solution.

Re: SIP Problem

Posted: Thu Apr 15, 2010 7:58 pm
by changeip
track it down on the sip server side. my guess is that your phone registered for 3600s, and then when it changes it's IP address (swapping wans) the old registration is still persistent trying to send your packets elsewhere. i just ran into this when i added a secondary wan port for failover, as soon as i switched the asterisk box always tried to reply to the original IP, because it was still registered : ) a re-registration doesn't overwrite the old sometimes for some reason.

Re: SIP Problem

Posted: Mon Apr 19, 2010 11:50 am
by hvz
Hi All,

Could anyone please provide me with details as to how you successfully implemented VOIP in your network? I have a small WISP setup but have trouble with various sip phones & ATA's. At this stage it is quite a show stopper for me. If I connect a SIP phone directly to the ADSL modem there is no problem, only starts when I include the RB750.

How do one setup the router to pass-through all SIP/STUN/RTP data?
Will there be any advantages in using an Asterisks server at the gateway?
Any best practise guidelines you can advise me on?

Thanks.

Re: SIP Problem

Posted: Mon Apr 19, 2010 7:54 pm
by heavyd
I have the same problem with sip.

Please , if anyone could shed some light it would be great

Re: SIP Problem

Posted: Mon Apr 19, 2010 8:01 pm
by changeip
here is what i use that works flawlessly.

asterisk 1.4 (trixbox CE) on a public IP.
no nat, just routed.
single IP on asterisk, no more.
narrowed rtp range from 10000-20000 to 10000-10499
firewall allows all udp/5060 and udp/10000-10499 inbound to that IP.
no reinvites because i record a lot of my calls at the pbx.

grandstream sip phones, gxp2000's, etc in the field across the internet.
for cpe / phones typically all you have to do is enable sip helper, or nat forward 5060 & 5004-5008 to the phone.
most just work out of the box.

Re: SIP Problem

Posted: Tue Apr 20, 2010 9:04 am
by rodolfo
Try to disable sip helper and remove connection marks showing connection-type=sip (base mangle ony on ports and ip address).
In my case this resolved.
I read often there are problems with sip helper.