notification = refer_progress_notification_alloc(attended->progress, response,
PJSIP_EVSUB_STATE_TERMINATED);
if (notification) {
- refer_progress_notify(notification);
+ if (ast_sip_push_task(attended->progress->serializer, refer_progress_notify, notification)) {
+ ao2_cleanup(notification);
+ }
}
}
PJSIP_EVSUB_STATE_TERMINATED);
if (notification) {
- refer_progress_notify(notification);
+ if (ast_sip_push_task(refer->progress->serializer, refer_progress_notify, notification)) {
+ ao2_cleanup(notification);
+ }
}
} else if (refer->progress) {
/* If attended transfer and progress monitoring is being done attach a frame hook so we can monitor it */
ast_channel_name(chan));
if (notification) {
- refer_progress_notify(notification);
+ if (ast_sip_push_task(refer->progress->serializer, refer_progress_notify, notification)) {
+ ao2_cleanup(notification);
+ }
}
}
ast_channel_name(chan));
if (notification) {
- refer_progress_notify(notification);
+ if (ast_sip_push_task(refer->progress->serializer, refer_progress_notify, notification)) {
+ ao2_cleanup(notification);
+ }
}
ao2_cleanup(refer->progress);
ast_channel_name(chan));
if (notification) {
- refer_progress_notify(notification);
+ if (ast_sip_push_task(refer->progress->serializer, refer_progress_notify, notification)) {
+ ao2_cleanup(notification);
+ }
}
ast_channel_lock(chan);
if (notification) {
/* The refer_progress_notify function will call ao2_cleanup on this for us */
- refer_progress_notify(notification);
+ if (ast_sip_push_task(progress->serializer, refer_progress_notify, notification)) {
+ ao2_cleanup(notification);
+ }
}
}