You need to configure the ports connecting to the Asterisk server as:
switchport mode access
switchport access vlan 10
switchport voice vlan is used by the CDP or LLDP negociations done by an endpoint (phone) when booting up. At boot up, the phone tells the switch it can use a data vlan (port for PC at the back of the phone) and a voice vlan. You can define both VLAN's separately with "access vlan" (data) and "voice vlan" (for voice traffic obviously)
With any device that doesn't do this kind of negociation, even though it is indeed a voice vlan, you need to use access