+int EndpointAppPBX::vootp_on(int on)
+{
+#ifndef WITH_VOOTP
+ set_tone(ea_endpoint->ep_portlist, "crypt_off");
+#else
+ if (!e_ext.otp_ident[0]) {
+ set_tone(ea_endpoint->ep_portlist, "crypt_off");
+ return -EINVAL;
+ }
+ if(ea_endpoint->ep_portlist) {
+ struct lcr_msg *message;
+
+ message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_portlist->port_id, EPOINT_TO_PORT, MESSAGE_VOOTP);
+ message->param.vootp.enable = on;
+ SCPY(message->param.vootp.id, e_ext.otp_ident);
+ message_put(message);
+ }
+ if (!on)
+ set_tone(ea_endpoint->ep_portlist, "crypt_off");
+#endif
+
+ return 0;
+}
+