02086 if (!chan->tech->indicate || res) {
02087 /*
02088 * Device does not support (that) indication, lets fake
02089 * it by doing our own tone generation. (PM2002)
02090 */
02091 if (condition >= 0) {
02092 const struct tone_zone_sound *ts = NULL;
02093 switch (condition) {
02094 case AST_CONTROL_RINGING:
02095 ts = ast_get_indication_tone(chan->zone, "ring");
02096 break;
02097 case AST_CONTROL_BUSY:
02098 ts = ast_get_indication_tone(chan->zone, "busy");
02099 break;
02100 case AST_CONTROL_CONGESTION:
02101 ts = ast_get_indication_tone(chan->zone, "congestion");
02102 break;
02103 }
02104 if (ts && ts->data[0]) {
02105 ast_log(LOG_DEBUG, "Driver for channel '%s' does not support indication %d, emulating it\n", chan->name, condition);
02106 ast_playtones_start(chan,0,ts->data, 1);
02107 res = 0;
02108 } else if (condition == AST_CONTROL_PROGRESS) {
02109 /* ast_playtones_stop(chan); */
02110 } else if (condition == AST_CONTROL_PROCEEDING) {
02111 /* Do nothing, really */
02112 } else if (condition == AST_CONTROL_HOLD) {
02113 /* Do nothing.... */
02114 } else if (condition == AST_CONTROL_UNHOLD) {
02115 /* Do nothing.... */
02116 } else if (condition == AST_CONTROL_VIDUPDATE) {
02117 /* Do nothing.... */
[COLOR="Red"]02118 } else {
02119 /* not handled */
02120 ast_log(LOG_WARNING, "Unable to handle indication %d for '%s'\n", condition, chan->name);
02121 res = -1;[/COLOR]
02122 }
02123 }