SIP Stops Working When Using VLANS - IAX2 OK

Here’s a strange one. Asterisk’s SIP channel completely craps out when I place the box into a different VLAN, but ZAP and IAX work just fine.

It seems to me that Asterisk’s SIP stack must depend on some unknown service that I lose when I change from VLAN 1 to VLAN 2. Does anybody have any ideas?

My SIP hardphones (Aastras) are in VLAN 2. My PC is in VLAN 1 & VLAN 2. When Asterisk is part of VLAN 1 & 2 there is no problem. But when I take Asterisk out of VLAN 1 my Aastras lose registration immediately. And no calls (from ZAP or IAX extensions) will go out Asterisk’s SIP trunks. But calls WILL go out ZAP trunks and IAX trunks. My IAX softphone on my PC works fine. It is only SIP that dies.

What could it be? (The port for the Internet link is in VLANs 1 & 2.)

The problem seems to have resolved itself by restarting Asterisk.


I think you need to confirm the Vlans that things are in.

If the phones are in Vlan2 and * in Vlan2 then It should work. Things to check are the Vlans and also the Localnet settings.

Maybe run tcpdump or ethereal to see whats going on.


Yes, phones and Asterisk were in VLAN 2. Like I said, restarting Asterisk fixed the problem. I also had to restart several other services (httpd, sendmail) for them to work after changing Asterisk’s VLAN.

Using CentOS 4.2.

weird. sounds like something with the vlan switch (maybe a table that mapped MAC addresses to VLAN or something, although i dunno why restarting tcp/udp services would fix that…)