if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
- ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
+ ast_copy_string(p->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(p->context));
+ ast_copy_string(chan->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(chan->context));
ast_verb(3, "Distinctive Ring matched context %s\n",p->context);
break;
}
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
- ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
+ ast_copy_string(p->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(p->context));
+ ast_copy_string(chan->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(chan->context));
ast_verb(3, "Distinctive Ring matched context %s\n",p->context);
break;
}
}
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
- ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
+ ast_copy_string(p->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(p->context));
+ ast_copy_string(chan->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(chan->context));
ast_verb(3, "Distinctive Ring matched context %s\n",p->context);
break;
}