@ -191,20 +191,25 @@ static struct ast_frame *refer_progress_framehook(struct ast_channel *chan, stru
/* Media is passing without progress, this means the call has been answered */
/* Media is passing without progress, this means the call has been answered */
notification = refer_progress_notification_alloc ( progress , 200 , PJSIP_EVSUB_STATE_TERMINATED ) ;
notification = refer_progress_notification_alloc ( progress , 200 , PJSIP_EVSUB_STATE_TERMINATED ) ;
} else if ( f - > frametype = = AST_FRAME_CONTROL ) {
} else if ( f - > frametype = = AST_FRAME_CONTROL ) {
progress - > subclass = f - > subclass . integer ;
/* Based on the control frame being written we can send a NOTIFY advising of the progress */
/* Based on the control frame being written we can send a NOTIFY advising of the progress */
if ( ( f - > subclass . integer = = AST_CONTROL_RING ) | | ( f - > subclass . integer = = AST_CONTROL_RINGING ) ) {
if ( ( f - > subclass . integer = = AST_CONTROL_RING ) | | ( f - > subclass . integer = = AST_CONTROL_RINGING ) ) {
progress - > subclass = f - > subclass . integer ;
notification = refer_progress_notification_alloc ( progress , 180 , PJSIP_EVSUB_STATE_ACTIVE ) ;
notification = refer_progress_notification_alloc ( progress , 180 , PJSIP_EVSUB_STATE_ACTIVE ) ;
} else if ( f - > subclass . integer = = AST_CONTROL_BUSY ) {
} else if ( f - > subclass . integer = = AST_CONTROL_BUSY ) {
progress - > subclass = f - > subclass . integer ;
notification = refer_progress_notification_alloc ( progress , 486 , PJSIP_EVSUB_STATE_TERMINATED ) ;
notification = refer_progress_notification_alloc ( progress , 486 , PJSIP_EVSUB_STATE_TERMINATED ) ;
} else if ( f - > subclass . integer = = AST_CONTROL_CONGESTION ) {
} else if ( f - > subclass . integer = = AST_CONTROL_CONGESTION ) {
progress - > subclass = f - > subclass . integer ;
notification = refer_progress_notification_alloc ( progress , 503 , PJSIP_EVSUB_STATE_TERMINATED ) ;
notification = refer_progress_notification_alloc ( progress , 503 , PJSIP_EVSUB_STATE_TERMINATED ) ;
} else if ( f - > subclass . integer = = AST_CONTROL_PROGRESS ) {
} else if ( f - > subclass . integer = = AST_CONTROL_PROGRESS ) {
progress - > subclass = f - > subclass . integer ;
notification = refer_progress_notification_alloc ( progress , 183 , PJSIP_EVSUB_STATE_ACTIVE ) ;
notification = refer_progress_notification_alloc ( progress , 183 , PJSIP_EVSUB_STATE_ACTIVE ) ;
} else if ( f - > subclass . integer = = AST_CONTROL_PROCEEDING ) {
} else if ( f - > subclass . integer = = AST_CONTROL_PROCEEDING ) {
progress - > subclass = f - > subclass . integer ;
notification = refer_progress_notification_alloc ( progress , 100 , PJSIP_EVSUB_STATE_ACTIVE ) ;
notification = refer_progress_notification_alloc ( progress , 100 , PJSIP_EVSUB_STATE_ACTIVE ) ;
} else if ( f - > subclass . integer = = AST_CONTROL_ANSWER ) {
} else if ( f - > subclass . integer = = AST_CONTROL_ANSWER ) {
progress - > subclass = f - > subclass . integer ;
notification = refer_progress_notification_alloc ( progress , 200 , PJSIP_EVSUB_STATE_TERMINATED ) ;
notification = refer_progress_notification_alloc ( progress , 200 , PJSIP_EVSUB_STATE_TERMINATED ) ;
}
}
}
}