add support for sms_exchange_[begin|end] directives