ALG's, or Application Layer Gateway's (also sometimes called SIP Helpers), are software components embedded within most routers and firewall's designed for the SOHO or SME market. Their intention is to allow VoIP traffic to traverse between Public and Private networks (ie solve the problems that NAT gives us). However, thevoicefactory employs a Session Border Controller within our data-center that performs this exact job, amongst others.
Basically, the ALG conflicts with our SBC and this results in a wide variety a side effects.
thevoicefactory have witnessed many different types of symptom caused by an ALG at the customer's site. As time progresses and others un-earth themselves, we will update this list.
Without using any tools at the local site, we can sometimes see ALG activity within the SIP messages as seen in Palladion.
SIP INVITE with ALG | SIP INVITE without ALG |
INVITE sip:08008008000@thevoicefactory.co.uk:5060;user=phone;transport=tcp SIP/2.0 Via: SIP/2.0/TCP 109.24.213.45;branch=z9hG4bKcd4c93e697345C13 From: "ALG User" <sip:02031234567@thevoicefactory.co.uk>;tag=3B8A340A-FD03DB7 To: <sip:08008008000@thevoicefactory.co.uk;user=phone> CSeq: 1 INVITE Call-ID: 85d9f620-5299760d-d13a6fda@109.24.213.45 Contact: <sip:02031234567@109.24.213.45;transport=tcp> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER Call-Info: <sip:thevoicefactory.co.uk>;appearance-index=1 User-Agent: PolycomSoundPointIP-SPIP_650-UA/3.2.1.0054 Accept-Language: en Supported: 100rel,replaces Allow-Events: talk,hold,conference Max-Forwards: 70 Content-Type: application/sdp Content-Length: 300
v=0 o=- 1332178635 1332178635 IN IP4 109.24.213.45 s=Polycom IP Phone c=IN IP4 109.24.213.45 t=0 0 a=sendrecv m=audio 2240 RTP/AVP 9 8 0 18 127 a=rtpmap:9 G722/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:127 telephone-event/8000 |
INVITE sip:08008008000@thevoicefactory.co.uk:5060;user=phone;transport=tcp SIP/2.0 Via: SIP/2.0/TCP 192.168.100.176;branch=z9hG4bKcd4c93e697345C13 From: "Non ALG User" <sip:02031234567@thevoicefactory.co.uk>;tag=3B8A340A-FD03DB7 To: <sip:08008008000@thevoicefactory.co.uk;user=phone> CSeq: 1 INVITE Call-ID: 85d9f620-5299760d-d13a6fda@192.168.100.176 Contact: <sip:02031234567@192.168.100.176;transport=tcp> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO , MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER Call-Info: <sip:thevoicefactory.co.uk>;appearance-index=1 User-Agent: PolycomSoundPointIP-SPIP_650-UA/3.2.1.0054 Accept-Language: en Supported: 100rel,replaces Allow-Events: talk,hold,conference Max-Forwards: 70 Content-Type: application/sdp Content-Length: 300
v=0 o=- 1332178635 1332178635 IN IP4 192.168.100.176 s=Polycom IP Phone c=IN IP4 192.168.100.176 t=0 0 a=sendrecv m=audio 2240 RTP/AVP 9 8 0 18 127 a=rtpmap:9 G722/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:127 telephone-event/8000 |
Above, is a real INVITE (on the right) with only the user details edited for privacy. On the left, is a mocked-up example showing what we typically see after the ALG has done its work.
Note that any Private IP's - particularly in the SDP portion, have been exchanged for the WAN IP of this user.
Unfortunately, not all ALG functionality can be spotted remotely, and there is ultimately no substitution for comparing a local packet dump to that taken from Palladion.
Where ALG's can live
Typically, the ALG will live within the device performing NAT - typically this is the local Router/Firewall. However, we have seen them in other locations - at one Enterprise site we found 4 on the same network!
Disabling an ALG
This is the desired solution to the problem, but not always possible without changing Routers, Firewalls or sometimes even ISP's.
For instructions on how to disable the ALG on your specific device, please consult the documentation. I tend to find Google-ing "deviceX disable alg" often points you in the right direction. Usually, you will find the ALG settings under the NAT or Firewall section of the Web GUI.
Points to note:
Example Telnet to a Draytek Vigor 2820:
$ telnet 192.168.1.1 Trying 192.168.1.1... Connected to 192.168.1.1. Escape character is '^]'. Password: ******** Type ? for command help > sys sip_alg ? usage: sys sip_alg [value] 0 - disable SIP ALG 1 - enable SIP ALG current SIP ALG is disabled >
Methods to work around an ALG
If you have been unable to identify and elimate all ALG's from your customers network, you may try one or more of the following techniques.
Related Articles