message->data.reg_ack.secondary_keep_alive = keep_alive;
switch_copy_string(message->data.reg_ack.reserved2, reserved2, 4);
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Sending Register Ack with Keep Alive (%d), Date Format (%s), Secondary Keep Alive (%d)\n",
- keep_alive, date_format, secondary_keep_alive);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Sending Register Ack with Keep Alive (%d), Date Format (%s), Secondary Keep Alive (%d)\n",
+ keep_alive, date_format, secondary_keep_alive);
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
switch_copy_string(message->data.speed_dial_res.line, speed_line, 24);
switch_copy_string(message->data.speed_dial_res.label, speed_label, 40);
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Sending Speed Dial Stat Res with Number (%d), Line (%s), Label (%s)\n",
- number, speed_line, speed_label);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Sending Speed Dial Stat Res with Number (%d), Line (%s), Label (%s)\n",
+ number, speed_line, speed_label);
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
message->data.call_info.call_security_status = call_security_status;
message->data.call_info.party_pi_restriction_bits = party_pi_restriction_bits;
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Send Call Info with Line Instance (%d)...\n", line_instance);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Send Call Info with Line Instance (%d)...\n", line_instance);
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
message->data.define_time_date.milliseconds = milliseconds;
message->data.define_time_date.timestamp = timestamp;
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Send Define Time Date with %.4d-%.2d-%.2d %.2d:%.2d:%.2d.%d, Timestamp (%d), DOW (%d)\n",
- year, month, day, hour, minute, seconds, milliseconds, timestamp, day_of_week);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Send Define Time Date with %.4d-%.2d-%.2d %.2d:%.2d:%.2d.%d, Timestamp (%d), DOW (%d)\n",
+ year, month, day, hour, minute, seconds, milliseconds, timestamp, day_of_week);
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
skinny_create_empty_message(message, CAPABILITIES_REQ_MESSAGE);
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Send Capabilities Req%s\n", "");
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Send Capabilities Req%s\n", "");
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
memcpy(message->data.version.version, version, 16);
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Send Version with Version(%s)\n", version);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Send Version with Version(%s)\n", version);
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
message->data.select_soft_keys.soft_key_set = soft_key_set;
message->data.select_soft_keys.valid_key_mask = valid_key_mask;
- skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
- "Send Select Soft Keys with Line Instance (%d), Call ID (%d), Soft Key Set (%d), Valid Key Mask (%x)\n",
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
+ "Send Select Soft Keys with Line Instance (%d), Call ID (%d), Soft Key Set (%d), Valid Key Mask (%x)\n",
line_instance, call_id, soft_key_set, valid_key_mask);
+ }
return skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
}
ptr = (char *) reply;
if (listener_is_ready(listener)) {
- if (listener->profile->debug >= 10 || reply->type != KEEP_ALIVE_ACK_MESSAGE) {
+ if (listener->profile->debug >= 10 ||
+ (listener->profile->debug >= 9 && reply->type != KEEP_ALIVE_ACK_MESSAGE)) {
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
"Sending %s (type=%x,length=%d).\n",
skinny_message_type2str(reply->type), reply->type, reply->length);
message->data.forward_stat.line_instance = request->data.forward_stat_req.line_instance;
- skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Forward Stat Req Message with Line Instance (%d)\n",
- request->data.forward_stat_req.line_instance);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Forward Stat Req Message with Line Instance (%d)\n",
+ request->data.forward_stat_req.line_instance);
+ }
skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
return SWITCH_STATUS_SUCCESS;
skinny_check_data_length(request, sizeof(request->data.speed_dial_req));
- skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Speed Dial Stat Request for Number (%d)\n", request->data.speed_dial_req.number);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Speed Dial Stat Request for Number (%d)\n", request->data.speed_dial_req.number);
+ }
skinny_speed_dial_get(listener, request->data.speed_dial_req.number, &button);
skinny_execute_sql(profile, sql, profile->sql_mutex);
switch_safe_free(sql);
}
- skinny_log_l(listener, SWITCH_LOG_DEBUG, "Codecs %s supported.\n", codec_string);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Codecs %s supported.\n", codec_string);
+ }
switch_safe_free(codec_string);
return SWITCH_STATUS_SUCCESS;
}
if (listener->soft_key_set_set) {
message = switch_core_hash_find(listener->profile->soft_key_set_sets_hash, listener->soft_key_set_set);
- skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Set Request with Set (%s)\n", listener->soft_key_set_set);
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Set Request with Set (%s)\n", listener->soft_key_set_set);
+ }
}
if (!message) {
message = switch_core_hash_find(listener->profile->soft_key_set_sets_hash, "default");
- skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Set Request with Set (%s)\n", "default");
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Set Request with Set (%s)\n", "default");
+ }
}
if (message) {
skinny_send_reply_quiet(listener, message, SWITCH_FALSE);
message->data.soft_key_template.soft_key[i].soft_key_event = soft_key_template_default_events[i];
}
- skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Template Request with Default Template\n");
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Template Request with Default Template\n");
+ }
skinny_send_reply_quiet(listener, message, SWITCH_TRUE);
switch_safe_free(sql);
}
- skinny_log_l(listener, SWITCH_LOG_DEBUG, "Update headset accessory status (%s)\n",
- skinny_accessory_state2str(request->data.headset_status.mode));
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Update headset accessory status (%s)\n",
+ skinny_accessory_state2str(request->data.headset_status.mode));
+ }
return SWITCH_STATUS_SUCCESS;
}
{
skinny_check_data_length(request, sizeof(request->data.reg_lines));
- skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Register Available Lines\n");
+ if ( listener->profile->debug >= 9 ) {
+ skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Register Available Lines\n");
+ }
/* Do nothing */
return SWITCH_STATUS_SUCCESS;
switch_event_t *event = NULL;
char *tmp = NULL;
- skinny_log_l(listener, SWITCH_LOG_INFO, "Received XML alarm (length=%d).\n", request->length);
+ skinny_log_l(listener, SWITCH_LOG_DEBUG, "Received XML alarm (length=%d).\n", request->length);
/* skinny::xml_alarm event */
skinny_device_event(listener, &event, SWITCH_EVENT_CUSTOM, SKINNY_EVENT_XML_ALARM);
/* Ensure that the body is null-terminated */
switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *request)
{
- if (listener->profile->debug >= 10 || request->type != KEEP_ALIVE_MESSAGE) {
+ if (listener->profile->debug >= 10 ||
+ (listener->profile->debug >= 9 && request->type != KEEP_ALIVE_MESSAGE)) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Received %s (type=%x,length=%d).\n",
skinny_message_type2str(request->type), request->type, request->length);
}