File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export interface SIPCoreConfig {
6868 /** Output configuration */
6969 out : String ;
7070 auto_answer : boolean ;
71- popup_config : PopupConfig | null ;
71+ popup_config : Object | null ;
7272 popup_override_component : string | null ;
7373 /**
7474 * Whether to use video in SIP calls.
@@ -553,11 +553,14 @@ export class SIPCore {
553553 let shouldAutoAnswer = this . config . auto_answer ; // Default to global setting
554554
555555 // Check if there's an extension-specific auto_answer setting
556- if ( this . config . popup_config ?. extensions ?. [ callerExtension ] ) {
557- const extensionConfig = this . config . popup_config . extensions [ callerExtension ] ;
558- if ( typeof extensionConfig . auto_answer === 'boolean' ) {
559- shouldAutoAnswer = extensionConfig . auto_answer ;
560- console . info ( `Using extension-specific auto_answer for ${ callerExtension } : ${ shouldAutoAnswer } ` ) ;
556+ if ( this . config . popup_config && typeof this . config . popup_config === 'object' ) {
557+ const popupConfig = this . config . popup_config as any ;
558+ if ( popupConfig . extensions ?. [ callerExtension ] ) {
559+ const extensionConfig = popupConfig . extensions [ callerExtension ] ;
560+ if ( typeof extensionConfig . auto_answer === 'boolean' ) {
561+ shouldAutoAnswer = extensionConfig . auto_answer ;
562+ console . info ( `Using extension-specific auto_answer for ${ callerExtension } : ${ shouldAutoAnswer } ` ) ;
563+ }
561564 }
562565 }
563566
You can’t perform that action at this time.
0 commit comments