change nbi to uem and write sms content to ams_history