[asterisk-commits] file: trunk r103313 - /trunk/channels/chan_skinny.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 11 08:43:04 CST 2008
Author: file
Date: Mon Feb 11 08:43:04 2008
New Revision: 103313
URL: http://svn.digium.com/view/asterisk?view=rev&rev=103313
Log:
Change chan_skinny to use debug messages as appropriate.
(closes issue #11967)
Reported by: mvanbaak
Patches:
2008021000-skinnydebug.diff.txt uploaded by mvanbaak (license 7)
Modified:
trunk/channels/chan_skinny.c
Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=103313&r1=103312&r2=103313
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Feb 11 08:43:04 2008
@@ -1859,7 +1859,7 @@
return;
if (skinnydebug)
- ast_verbose("Setting Callinfo to %s(%s) from %s(%s) on %s(%d)\n", fromname, fromnum, toname, tonum, s->device->name, instance);
+ ast_debug(1, "Setting Callinfo to %s(%s) from %s(%s) on %s(%d)\n", fromname, fromnum, toname, tonum, s->device->name, instance);
if (fromname) {
ast_copy_string(req->data.callinfo.callingPartyName, fromname, sizeof(req->data.callinfo.callingPartyName));
@@ -1959,7 +1959,7 @@
struct skinny_req *req;
if (skinnydebug)
- ast_verbose("Setting ringer mode to '%d'.\n", mode);
+ ast_debug(1, "Setting ringer mode to '%d'.\n", mode);
if (!(req = req_alloc(sizeof(struct set_ringer_message), SET_RINGER_MESSAGE)))
return;
@@ -1991,14 +1991,14 @@
req->data.clearpromptstatus.callReference = reference;
if (skinnydebug)
- ast_verbose("Clearing Display\n");
+ ast_debug(1, "Clearing Display\n");
} else {
if (!(req = req_alloc(sizeof(struct displaytext_message), DISPLAYTEXT_MESSAGE)))
return;
ast_copy_string(req->data.displaytext.text, text, sizeof(req->data.displaytext.text));
if (skinnydebug)
- ast_verbose("Displaying message '%s'\n", req->data.displaytext.text);
+ ast_debug(1, "Displaying message '%s'\n", req->data.displaytext.text);
}
transmit_response(s, req);
@@ -2015,7 +2015,7 @@
req->data.displaynotify.displayTimeout = htolel(t);
if (skinnydebug)
- ast_verbose("Displaying notify '%s'\n", text);
+ ast_debug(1, "Displaying notify '%s'\n", text);
transmit_response(s, req);
}
@@ -2032,7 +2032,7 @@
req->data.clearpromptstatus.callReference = htolel(callid);
if (skinnydebug)
- ast_verbose("Clearing Prompt\n");
+ ast_debug(1, "Clearing Prompt\n");
} else {
if (!(req = req_alloc(sizeof(struct display_prompt_status_message), DISPLAY_PROMPT_STATUS_MESSAGE)))
return;
@@ -2043,7 +2043,7 @@
req->data.displaypromptstatus.callReference = htolel(callid);
if (skinnydebug)
- ast_verbose("Displaying Prompt Status '%s'\n", text);
+ ast_debug(1, "Displaying Prompt Status '%s'\n", text);
}
transmit_response(s, req);
@@ -2226,10 +2226,10 @@
for (l = d->lines; l; l = l->next) {
if (has_voicemail(l)) {
if (skinnydebug)
- ast_verbose("Checking for voicemail Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Checking for voicemail Skinny %s@%s\n", l->name, d->name);
ast_app_inboxcount(l->mailbox, &new, &old);
if (skinnydebug)
- ast_verbose("Skinny %s@%s has voicemail!\n", l->name, d->name);
+ ast_debug(1, "Skinny %s@%s has voicemail!\n", l->name, d->name);
transmit_lamp_indication(s, STIMULUS_VOICEMAIL, l->instance, l->mwiblink?SKINNY_LAMP_BLINK:SKINNY_LAMP_ON);
device_lamp++;
} else {
@@ -2265,7 +2265,7 @@
enum ast_rtp_get_result res = AST_RTP_TRY_NATIVE;
if (skinnydebug)
- ast_verbose("skinny_get_rtp_peer() Channel = %s\n", c->name);
+ ast_debug(1, "skinny_get_rtp_peer() Channel = %s\n", c->name);
if (!(sub = c->tech_pvt))
@@ -2285,7 +2285,7 @@
if (!l->canreinvite || l->nat){
res = AST_RTP_TRY_PARTIAL;
if (skinnydebug)
- ast_verbose("skinny_get_rtp_peer() Using AST_RTP_TRY_PARTIAL \n");
+ ast_debug(1, "skinny_get_rtp_peer() Using AST_RTP_TRY_PARTIAL \n");
}
ast_mutex_unlock(&sub->lock);
@@ -2330,7 +2330,7 @@
transmit_response(s, req);
if (skinnydebug)
- ast_verbose("Peerip = %s:%d\n", ast_inet_ntoa(them.sin_addr), ntohs(them.sin_port));
+ ast_debug(1, "Peerip = %s:%d\n", ast_inet_ntoa(them.sin_addr), ntohs(them.sin_port));
if (!(req = req_alloc(sizeof(struct start_media_transmission_message), START_MEDIA_TRANSMISSION_MESSAGE)))
return -1;
@@ -2338,7 +2338,7 @@
fmt = ast_codec_pref_getsize(&l->prefs, ast_best_codec(l->capability));
if (skinnydebug)
- ast_verbose("Setting payloadType to '%d' (%d ms)\n", fmt.bits, fmt.cur_ms);
+ ast_debug(1, "Setting payloadType to '%d' (%d ms)\n", fmt.bits, fmt.cur_ms);
req->data.startmedia.conferenceId = htolel(sub->callid);
req->data.startmedia.passThruPartyId = htolel(sub->callid);
@@ -3321,7 +3321,7 @@
d = l->parent;
s = d->session;
if (skinnydebug)
- ast_verbose("skinny_hangup(%s) on %s@%s\n", ast->name, l->name, d->name);
+ ast_debug(1, "skinny_hangup(%s) on %s@%s\n", ast->name, l->name, d->name);
if (d->registered) {
if ((l->type = TYPE_LINE) && (l->hookstate == SKINNY_OFFHOOK)) {
@@ -3366,7 +3366,7 @@
start_rtp(sub);
}
if (skinnydebug)
- ast_verbose("skinny_answer(%s) on %s@%s-%d\n", ast->name, l->name, d->name, sub->callid);
+ ast_debug(1, "skinny_answer(%s) on %s@%s-%d\n", ast->name, l->name, d->name, sub->callid);
if (ast->_state != AST_STATE_UP) {
ast_setstate(ast, AST_STATE_UP);
}
@@ -3693,7 +3693,7 @@
tmp->nativeformats = default_capability;
fmt = ast_best_codec(tmp->nativeformats);
if (skinnydebug)
- ast_verbose("skinny_new: tmp->nativeformats=%d fmt=%d\n", tmp->nativeformats, fmt);
+ ast_debug(1, "skinny_new: tmp->nativeformats=%d fmt=%d\n", tmp->nativeformats, fmt);
if (sub->rtp) {
ast_channel_set_fd(tmp, 0, ast_rtp_fd(sub->rtp));
}
@@ -3765,7 +3765,7 @@
/* Channel needs to be put on hold */
if (skinnydebug)
- ast_verbose("Putting on Hold(%d)\n", l->instance);
+ ast_debug(1, "Putting on Hold(%d)\n", l->instance);
ast_queue_control_data(sub->owner, AST_CONTROL_HOLD,
S_OR(l->mohsuggest, NULL),
@@ -3809,7 +3809,7 @@
/* Channel is on hold, so we will unhold */
if (skinnydebug)
- ast_verbose("Taking off Hold(%d)\n", l->instance);
+ ast_debug(1, "Taking off Hold(%d)\n", l->instance);
ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
@@ -3866,7 +3866,7 @@
req->data.regack.secondaryKeepAlive = htolel(keep_alive);
transmit_response(s, req);
if (skinnydebug)
- ast_verbose("Requesting capabilities\n");
+ ast_debug(1, "Requesting capabilities\n");
if (!(req = req_alloc(0, CAPABILITIES_REQ_MESSAGE)))
return -1;
@@ -3890,7 +3890,7 @@
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
}
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
if (l->cfwdtype & cfwdtype) {
@@ -3986,7 +3986,7 @@
}
} else {
if (skinnydebug)
- ast_verbose("No owner: %s\n", l->name);
+ ast_debug(1, "No owner: %s\n", l->name);
}
return 1;
}
@@ -4008,7 +4008,7 @@
instance = letohl(req->data.stimulus.stimulusInstance);
callreference = letohl(req->data.stimulus.callreference);
if (skinnydebug)
- ast_verbose("callreference in handle_stimulus_message is '%d'\n", callreference);
+ ast_debug(1, "callreference in handle_stimulus_message is '%d'\n", callreference);
/* Note that this call should be using the passed in instance and callreference */
sub = find_subchannel_by_instance_reference(d, d->lastlineinstance, d->lastcallreference);
@@ -4025,7 +4025,7 @@
switch(event) {
case STIMULUS_REDIAL:
if (skinnydebug)
- ast_verbose("Received Stimulus: Redial(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Redial(%d/%d)\n", instance, callreference);
if (ast_strlen_zero(l->lastnumberdialed)) {
ast_log(LOG_WARNING, "Attempted redial, but no previously dialed number found.\n");
@@ -4046,7 +4046,7 @@
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
}
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_RINGOUT);
@@ -4066,7 +4066,7 @@
struct skinny_speeddial *sd;
if (skinnydebug)
- ast_verbose("Received Stimulus: SpeedDial(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: SpeedDial(%d/%d)\n", instance, callreference);
if (!(sd = find_speeddial_by_instance(d, instance, 0))) {
return 0;
}
@@ -4087,7 +4087,7 @@
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
}
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_RINGOUT);
@@ -4110,7 +4110,7 @@
break;
case STIMULUS_HOLD:
if (skinnydebug)
- ast_verbose("Received Stimulus: Hold(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Hold(%d/%d)\n", instance, callreference);
if (!sub)
break;
@@ -4123,17 +4123,17 @@
break;
case STIMULUS_TRANSFER:
if (skinnydebug)
- ast_verbose("Received Stimulus: Transfer(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Transfer(%d/%d)\n", instance, callreference);
/* XXX figure out how to transfer */
break;
case STIMULUS_CONFERENCE:
if (skinnydebug)
- ast_verbose("Received Stimulus: Conference(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Conference(%d/%d)\n", instance, callreference);
/* XXX determine the best way to pull off a conference. Meetme? */
break;
case STIMULUS_VOICEMAIL:
if (skinnydebug)
- ast_verbose("Received Stimulus: Voicemail(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Voicemail(%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
c = skinny_new(l, AST_STATE_DOWN);
@@ -4156,7 +4156,7 @@
}
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
@@ -4179,12 +4179,12 @@
break;
case STIMULUS_CALLPARK:
if (skinnydebug)
- ast_verbose("Received Stimulus: Park Call(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Park Call(%d/%d)\n", instance, callreference);
/* XXX Park the call */
break;
case STIMULUS_DND:
if (skinnydebug)
- ast_verbose("Received Stimulus: DND (%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: DND (%d/%d)\n", instance, callreference);
/* Do not disturb */
if (l->dnd != 0){
@@ -4201,7 +4201,7 @@
break;
case STIMULUS_FORWARDALL:
if (skinnydebug)
- ast_verbose("Received Stimulus: Forward All(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Forward All(%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
c = skinny_new(l, AST_STATE_DOWN);
@@ -4218,7 +4218,7 @@
break;
case STIMULUS_FORWARDBUSY:
if (skinnydebug)
- ast_verbose("Received Stimulus: Forward Busy (%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Forward Busy (%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
c = skinny_new(l, AST_STATE_DOWN);
@@ -4235,7 +4235,7 @@
break;
case STIMULUS_FORWARDNOANSWER:
if (skinnydebug)
- ast_verbose("Received Stimulus: Forward No Answer (%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Forward No Answer (%d/%d)\n", instance, callreference);
#if 0 /* Not sure how to handle this yet */
if (!sub || !sub->owner) {
@@ -4255,11 +4255,11 @@
case STIMULUS_DISPLAY:
/* Not sure what this is */
if (skinnydebug)
- ast_verbose("Received Stimulus: Display(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Display(%d/%d)\n", instance, callreference);
break;
case STIMULUS_LINE:
if (skinnydebug)
- ast_verbose("Received Stimulus: Line(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Stimulus: Line(%d/%d)\n", instance, callreference);
l = find_line_by_instance(d, instance);
@@ -4295,7 +4295,7 @@
sub = c->tech_pvt;
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_OFFHOOK);
@@ -4313,7 +4313,7 @@
break;
default:
if (skinnydebug)
- ast_verbose("RECEIVED UNKNOWN STIMULUS: %d(%d/%d)\n", event, instance, callreference);
+ ast_debug(1, "RECEIVED UNKNOWN STIMULUS: %d(%d/%d)\n", event, instance, callreference);
break;
}
ast_device_state_changed("Skinny/%s@%s", l->name, d->name);
@@ -4374,7 +4374,7 @@
sub = c->tech_pvt;
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_OFFHOOK);
@@ -4425,7 +4425,7 @@
sub->cxmode = SKINNY_CX_RECVONLY;
transmit_callstate(s, l->instance, l->hookstate, sub->callid);
if (skinnydebug)
- ast_verbose("Skinny %s@%s went on hook\n", l->name, d->name);
+ ast_debug(1, "Skinny %s@%s went on hook\n", l->name, d->name);
if (l->transfer && (sub->owner && sub->next && sub->next->owner) && ((!sub->outgoing) || (sub->next && !sub->next->outgoing))) {
/* We're allowed to transfer, we have two active calls and
we made at least one of the calls. Let's try and transfer */
@@ -4478,12 +4478,12 @@
scodec = letohl(req->data.caps.caps[i].codec);
acodec = codec_skinny2ast(scodec);
if (skinnydebug)
- ast_verbose("Adding codec capability '%d (%d)'\n", acodec, scodec);
+ ast_debug(1, "Adding codec capability '%d (%d)'\n", acodec, scodec);
codecs |= acodec;
}
d->capability &= codecs;
- ast_verbose("Device capability set to '%d'\n", d->capability);
+ ast_verb(0, "Device capability set to '%d'\n", d->capability);
for (l = d->lines; l; l = l->next) {
ast_mutex_lock(&l->lock);
l->capability = d->capability;
@@ -4607,7 +4607,7 @@
for (l = d->lines; l; l = l->next) {
if (l->instance == lineInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_LINE, lineInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_LINE, lineInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_LINE;
req->data.buttontemplate.definition[i].instanceNumber = htolel(lineInstance);
lineInstance++;
@@ -4620,7 +4620,7 @@
if (!btnSet) {
for (sd = d->speeddials; sd; sd = sd->next) {
if (sd->isHint && sd->instance == lineInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_LINE, lineInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_LINE, lineInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_LINE;
req->data.buttontemplate.definition[i].instanceNumber = htolel(lineInstance);
lineInstance++;
@@ -4638,7 +4638,7 @@
for (l = d->lines; l; l = l->next) {
if (l->instance == lineInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_LINE, lineInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_LINE, lineInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_LINE;
req->data.buttontemplate.definition[i].instanceNumber = htolel(lineInstance);
lineInstance++;
@@ -4651,7 +4651,7 @@
if (!btnSet) {
for (sd = d->speeddials; sd; sd = sd->next) {
if (sd->isHint && sd->instance == lineInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_LINE, lineInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_LINE, lineInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_LINE;
req->data.buttontemplate.definition[i].instanceNumber = htolel(lineInstance);
lineInstance++;
@@ -4659,7 +4659,7 @@
btnSet = 1;
break;
} else if (!sd->isHint && sd->instance == speeddialInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_SPEEDDIAL, speeddialInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_SPEEDDIAL, speeddialInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_SPEEDDIAL;
req->data.buttontemplate.definition[i].instanceNumber = htolel(speeddialInstance);
speeddialInstance++;
@@ -4676,7 +4676,7 @@
for (l = d->lines; l; l = l->next) {
if (l->instance == lineInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_LINE, lineInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_LINE, lineInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_LINE;
req->data.buttontemplate.definition[i].instanceNumber = htolel(lineInstance);
lineInstance++;
@@ -4692,7 +4692,7 @@
for (sd = d->speeddials; sd; sd = sd->next) {
if (!sd->isHint && sd->instance == speeddialInstance) {
- ast_verbose("Adding button: %d, %d\n", BT_SPEEDDIAL, speeddialInstance);
+ ast_verb(0, "Adding button: %d, %d\n", BT_SPEEDDIAL, speeddialInstance);
req->data.buttontemplate.definition[i].buttonDefinition = BT_SPEEDDIAL;
req->data.buttontemplate.definition[i].instanceNumber = htolel(speeddialInstance - 1);
speeddialInstance++;
@@ -4705,7 +4705,7 @@
case BT_NONE:
break;
default:
- ast_verbose("Adding button: %d, %d\n", btn[i].buttonDefinition, 0);
+ ast_verb(0, "Adding button: %d, %d\n", btn[i].buttonDefinition, 0);
req->data.buttontemplate.definition[i].buttonDefinition = htolel(btn[i].buttonDefinition);
req->data.buttontemplate.definition[i].instanceNumber = htolel(0);
buttonCount++;
@@ -4719,7 +4719,7 @@
req->data.buttontemplate.totalButtonCount = htolel(buttonCount);
if (skinnydebug)
- ast_verbose("Sending %d template to %s\n",
+ ast_debug(1, "Sending %d template to %s\n",
d->type,
d->name);
transmit_response(s, req);
@@ -4755,7 +4755,7 @@
{
/* no response necessary */
if (skinnydebug)
- ast_verbose("Received Alarm Message: %s\n", req->data.alarm.displayMessage);
+ ast_debug(1, "Received Alarm Message: %s\n", req->data.alarm.displayMessage);
return 1;
}
@@ -4802,7 +4802,7 @@
}
if (skinnydebug)
- ast_verbose("ipaddr = %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
+ ast_debug(1, "ipaddr = %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
if (!(req = req_alloc(sizeof(struct start_media_transmission_message), START_MEDIA_TRANSMISSION_MESSAGE)))
return -1;
@@ -4810,7 +4810,7 @@
fmt = ast_codec_pref_getsize(&l->prefs, ast_best_codec(l->capability));
if (skinnydebug)
- ast_verbose("Setting payloadType to '%d' (%d ms)\n", fmt.bits, fmt.cur_ms);
+ ast_debug(1, "Setting payloadType to '%d' (%d ms)\n", fmt.bits, fmt.cur_ms);
req->data.startmedia.conferenceId = htolel(sub->callid);
req->data.startmedia.passThruPartyId = htolel(sub->callid);
@@ -4836,7 +4836,7 @@
pthread_t t;
if (skinnydebug)
- ast_verbose("Received Enbloc Call: %s\n", req->data.enbloccallmessage.calledParty);
+ ast_debug(1, "Received Enbloc Call: %s\n", req->data.enbloccallmessage.calledParty);
sub = find_subchannel_by_instance_reference(d, d->lastlineinstance, d->lastcallreference);
@@ -4859,7 +4859,7 @@
sub = c->tech_pvt;
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
@@ -4937,7 +4937,7 @@
if (!l) {
if (skinnydebug)
- ast_verbose("Received Softkey Event: %d(%d/%d)\n", event, instance, callreference);
+ ast_debug(1, "Received Softkey Event: %d(%d/%d)\n", event, instance, callreference);
return 0;
}
@@ -4946,11 +4946,11 @@
switch(event) {
case SOFTKEY_NONE:
if (skinnydebug)
- ast_verbose("Received Softkey Event: None(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: None(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_REDIAL:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Redial(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Redial(%d/%d)\n", instance, callreference);
if (ast_strlen_zero(l->lastnumberdialed)) {
ast_log(LOG_WARNING, "Attempted redial, but no previously dialed number found.\n");
@@ -4976,7 +4976,7 @@
transmit_callstate(s, l->instance, SKINNY_OFFHOOK, sub->callid);
}
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_RINGOUT);
@@ -4993,7 +4993,7 @@
break;
case SOFTKEY_NEWCALL: /* Actually the DIAL softkey */
if (skinnydebug)
- ast_verbose("Received Softkey Event: New Call(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: New Call(%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
c = skinny_new(l, AST_STATE_DOWN);
@@ -5017,7 +5017,7 @@
}
if (skinnydebug)
- ast_verbose("Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
+ ast_debug(1, "Attempting to Clear display on Skinny %s@%s\n", l->name, d->name);
transmit_displaymessage(s, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(s, SKINNY_DIALTONE, l->instance, sub->callid);
transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_OFFHOOK);
@@ -5031,7 +5031,7 @@
break;
case SOFTKEY_HOLD:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Hold(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Hold(%d/%d)\n", instance, callreference);
if (sub) {
if (sub->onhold) {
@@ -5044,12 +5044,12 @@
break;
case SOFTKEY_TRNSFER:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Transfer(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Transfer(%d/%d)\n", instance, callreference);
/* XXX figure out how to transfer */
break;
case SOFTKEY_DND:
if (skinnydebug)
- ast_verbose("Received Softkey Event: DND(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: DND(%d/%d)\n", instance, callreference);
/* Do not disturb */
if (l->dnd != 0){
@@ -5066,7 +5066,7 @@
break;
case SOFTKEY_CFWDALL:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Forward All(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Forward All(%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
c = skinny_new(l, AST_STATE_DOWN);
@@ -5083,7 +5083,7 @@
break;
case SOFTKEY_CFWDBUSY:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Forward Busy (%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Forward Busy (%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
c = skinny_new(l, AST_STATE_DOWN);
@@ -5100,7 +5100,7 @@
break;
case SOFTKEY_CFWDNOANSWER:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Forward No Answer (%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Forward No Answer (%d/%d)\n", instance, callreference);
#if 0 /* Not sure how to handle this yet */
if (!sub || !sub->owner) {
@@ -5119,11 +5119,11 @@
break;
case SOFTKEY_BKSPC:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Backspace(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Backspace(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_ENDCALL:
if (skinnydebug)
- ast_verbose("Received Softkey Event: End Call(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: End Call(%d/%d)\n", instance, callreference);
if (l->hookstate == SKINNY_ONHOOK) {
/* Something else already put us back on hook */
@@ -5134,7 +5134,7 @@
l->hookstate = SKINNY_ONHOOK;
transmit_callstate(s, l->instance, l->hookstate, sub->callid);
if (skinnydebug)
- ast_verbose("Skinny %s@%s went on hook\n", l->name, d->name);
+ ast_debug(1, "Skinny %s@%s went on hook\n", l->name, d->name);
if (l->transfer && (sub->owner && sub->next && sub->next->owner) && ((!sub->outgoing) || (sub->next && !sub->next->outgoing))) {
/* We're allowed to transfer, we have two active calls and
we made at least one of the calls. Let's try and transfer */
@@ -5168,11 +5168,11 @@
break;
case SOFTKEY_RESUME:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Resume(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Resume(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_ANSWER:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Answer(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Answer(%d/%d)\n", instance, callreference);
transmit_ringer_mode(s,SKINNY_RING_OFF);
transmit_lamp_indication(s, STIMULUS_LINE, l->instance, SKINNY_LAMP_ON);
@@ -5192,38 +5192,38 @@
break;
case SOFTKEY_INFO:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Info(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Info(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_CONFRN:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Conference(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Conference(%d/%d)\n", instance, callreference);
/* XXX determine the best way to pull off a conference. Meetme? */
break;
case SOFTKEY_PARK:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Park Call(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Park Call(%d/%d)\n", instance, callreference);
/* XXX Park the call */
break;
case SOFTKEY_JOIN:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Join(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Join(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_MEETME:
/* XXX How is this different from CONFRN? */
if (skinnydebug)
- ast_verbose("Received Softkey Event: Meetme(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Meetme(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_PICKUP:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Pickup(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Pickup(%d/%d)\n", instance, callreference);
break;
case SOFTKEY_GPICKUP:
if (skinnydebug)
- ast_verbose("Received Softkey Event: Group Pickup(%d/%d)\n", instance, callreference);
+ ast_debug(1, "Received Softkey Event: Group Pickup(%d/%d)\n", instance, callreference);
break;
default:
if (skinnydebug)
- ast_verbose("Received unknown Softkey Event: %d(%d/%d)\n", event, instance, callreference);
+ ast_debug(1, "Received unknown Softkey Event: %d(%d/%d)\n", event, instance, callreference);
break;
}
ast_device_state_changed("Skinny/%s@%s", l->name, d->name);
@@ -5279,7 +5279,7 @@
break;
case REGISTER_MESSAGE:
if (skinnydebug)
- ast_verbose("Device %s is attempting to register\n", req->data.reg.name);
+ ast_debug(1, "Device %s is attempting to register\n", req->data.reg.name);
res = handle_register_message(req, s);
break;
@@ -5294,7 +5294,7 @@
int callReference;
if (skinnydebug)
- ast_verbose("Collected digit: [%d]\n", letohl(req->data.keypad.button));
+ ast_debug(1, "Collected digit: [%d]\n", letohl(req->data.keypad.button));
lineInstance = letohl(req->data.keypad.lineInstance);
callReference = letohl(req->data.keypad.callReference);
@@ -5343,42 +5343,42 @@
break;
case CAPABILITIES_RES_MESSAGE:
if (skinnydebug)
- ast_verbose("Received CapabilitiesRes\n");
+ ast_debug(1, "Received CapabilitiesRes\n");
res = handle_capabilities_res_message(req, s);
break;
case SPEED_DIAL_STAT_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Received SpeedDialStatRequest\n");
+ ast_debug(1, "Received SpeedDialStatRequest\n");
res = handle_speed_dial_stat_req_message(req, s);
break;
case LINE_STATE_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Received LineStatRequest\n");
+ ast_debug(1, "Received LineStatRequest\n");
res = handle_line_state_req_message(req, s);
break;
case TIME_DATE_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Received Time/Date Request\n");
+ ast_debug(1, "Received Time/Date Request\n");
res = handle_time_date_req_message(req, s);
break;
case BUTTON_TEMPLATE_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Buttontemplate requested\n");
+ ast_debug(1, "Buttontemplate requested\n");
res = handle_button_template_req_message(req, s);
break;
case VERSION_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Version Request\n");
+ ast_debug(1, "Version Request\n");
res = handle_version_req_message(req, s);
break;
case SERVER_REQUEST_MESSAGE:
if (skinnydebug)
- ast_verbose("Received Server Request\n");
+ ast_debug(1, "Received Server Request\n");
res = handle_server_request_message(req, s);
break;
@@ -5387,13 +5387,13 @@
break;
case OPEN_RECEIVE_CHANNEL_ACK_MESSAGE:
if (skinnydebug)
- ast_verbose("Received Open Receive Channel Ack\n");
+ ast_debug(1, "Received Open Receive Channel Ack\n");
res = handle_open_receive_channel_ack_message(req, s);
break;
case SOFT_KEY_SET_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Received SoftKeySetReq\n");
+ ast_debug(1, "Received SoftKeySetReq\n");
res = handle_soft_key_set_req_message(req, s);
break;
@@ -5402,13 +5402,13 @@
break;
case UNREGISTER_MESSAGE:
if (skinnydebug)
- ast_verbose("Received Unregister Request\n");
+ ast_debug(1, "Received Unregister Request\n");
res = handle_unregister_message(req, s);
break;
case SOFT_KEY_TEMPLATE_REQ_MESSAGE:
if (skinnydebug)
- ast_verbose("Received SoftKey Template Request\n");
+ ast_debug(1, "Received SoftKey Template Request\n");
res = handle_soft_key_template_req_message(req, s);
break;
@@ -5420,7 +5420,7 @@
break;
default:
if (skinnydebug)
- ast_verbose("RECEIVED UNKNOWN MESSAGE TYPE: %x\n", letohl(req->e));
+ ast_debug(1, "RECEIVED UNKNOWN MESSAGE TYPE: %x\n", letohl(req->e));
break;
}
if (res >= 0 && req)
@@ -5476,7 +5476,7 @@
}
} else if (res == 0) {
if (skinnydebug)
- ast_verbose("Skinny Client was lost, unregistering\n");
+ ast_debug(1, "Skinny Client was lost, unregistering\n");
skinny_unregister(NULL, s);
return -1;
}
@@ -5489,7 +5489,7 @@
ast_log(LOG_WARNING, "read() returned error: %s\n", strerror(errno));
if (skinnydebug)
- ast_verbose("Skinny Client was lost, unregistering\n");
+ ast_debug(1, "Skinny Client was lost, unregistering\n");
skinny_unregister(NULL,s);
ast_mutex_unlock(&s->lock);
@@ -5500,7 +5500,7 @@
if (res == 0) {
if (skinnydebug)
- ast_verbose("Skinny Client was lost, unregistering\n");
+ ast_debug(1, "Skinny Client was lost, unregistering\n");
skinny_unregister(NULL, s);
}
@@ -5629,7 +5629,7 @@
}
}
if (skinnydebug)
- ast_verbose("killing accept thread\n");
+ ast_debug(1, "killing accept thread\n");
close(as);
return 0;
}
More information about the asterisk-commits
mailing list