This paper proposes a smartphone-based warning system to evaluate the risk of a motor vehicle for vulnerable pedestrians (VP). The acoustic sensors are embedded in the roadside to receive vehicle sounds and they are classified into heavy vehicles, light vehicles with low speed, light vehicles with high speed, and no vehicle classes. For this aim, we extract new features by Mel-frequency Cepstrum Coefficients (MFCC) and Linear Predictive Coefficients (LPC) algorithms. We use different classification algorithms and show that MLP neural network achieves at least $96.77$% accuracy criterion. To install this system, directional microphones are embedded on the roadside and the risk is classified. Then, for every microphone, a danger area is defined and the warning alarms have been sent to every VPs’ smartphones covered in this danger area.