MT#7377 API: check uniqueness of pbx_extension.

Otherwise we get a duplicate entry error when creating the
corresponding primary number.
MT#7395 API: implement NCOS level and pattern

Manage levels and patterns via REST.