Hello,
We are using channel.c
to generate HOLD
and UNHOLD
cel events using ast_moh_start
and ast_moh_stop
as below:
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass){
RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
blob = ast_json_pack("{s: s}", "event", "HOLD");
ast_cel_publish_event(chan, AST_CEL_HOLD, blob);
if (ast_moh_start_ptr){
return ast_moh_start_ptr(chan, mclass, interpclass);
}
ast_verb(3, "Music class %s requested but no musiconhold loaded.\n", mclass ? mclass :
(interpclass ? interpclass : "default"));
return -1;
}
void ast_moh_stop(struct ast_channel *chan)
{
RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
blob = ast_json_pack("{s: s}", "event", "UNHOLD");
ast_cel_publish_event(chan, AST_CEL_UNHOLD, blob);
if (ast_moh_stop_ptr){
ast_moh_stop_ptr(chan);
}
}
For a normal scenario, A
calls B
, holds/unholds the events are written correctly in the database.
However, if I make a Blind/Attended Transfer I see in the db extra UNHOLD
events usually associated from the channel which is being transfered.
So it looks like, whenever a channel is being taken from a specific bridge and bridged on another bridge, the channel is being considered as held (without triggering a HOLD) and triggers UNHOLD
when connected on the final bridge.
Is this a normal behaviour?