DavidLiu před 3 měsíci
rodič
revize
79b885b298
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      src/core/voip/bot.py

+ 3 - 2
src/core/voip/bot.py

@@ -166,6 +166,7 @@ class Account(pj.Account):
         print("***OnRegState: " + prm.reason, ai.id,ai.isDefault,ai.uri,ai.regIsConfigured,ai.regIsActive,ai.regExpiresSec,ai.regStatus,ai.regStatusText,ai.regLastErr,ai.onlineStatus,ai.onlineStatusText)
 
     def onIncomingCall(self, prm):
+        self.agent.logger.info("daviddebugger::onIncomingCall::%s", prm)
         ai = self.getInfo()
         print("***onIncomingCall: ", prm.callId, ai.id,ai.isDefault,ai.uri,ai.regIsConfigured,ai.regIsActive,ai.regExpiresSec,ai.regStatus,ai.regStatusText,ai.regLastErr,ai.onlineStatus,ai.onlineStatusText)
 
@@ -192,7 +193,7 @@ class MyCall(pj.Call):
         self.session_id = kwargs.get('variable_sip_h_P-LIBRA-CallId')
         self.device_id = kwargs.get('variable_sip_h_P-LIBRA-DeviceId')
         self.call_phone = kwargs.get("Caller-Caller-ID-Number")
-        self.logger.info("self.session_id:%s, self.call_phone:%s", self.session_id,self.call_phone)
+        self.logger.info("daviddebugger::self.session_id:%s, self.call_phone:%s", self.session_id,self.call_phone)
         self.taskId = "10001"
         # self.scripts = build_demo_script()
         self.user_asr_text_queue = queue.Queue(maxsize=100)
@@ -278,7 +279,7 @@ class MyCall(pj.Call):
         # pj.PJSIP_INV_STATE_CONNECTING
         # pj.PJSIP_INV_STATE_CONFIRMED
         # pj.PJSIP_INV_STATE_DISCONNECTED
-
+        self.logger.info("daviddebugger::onCallState::", call_info)
         if call_info.state == pj.PJSIP_INV_STATE_CONFIRMED:
             # 当呼叫状态为已确认(即接通)
             self.bot_say_hello()