774056846 4 months ago
parent
commit
55918f14b8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/voip/bot.py

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

@@ -358,7 +358,7 @@ class MyCall(pj.Call):
             self.agent.hangup(self.user_part)
         elif action_code == 'transfer':  # 转人工
             print('todo 转人工')
-            sip_headers = {'bye_h_X-CIN-HangUpReason':'transferToAgent'}
+            sip_headers = {'sip_bye_h_X-CIN-HangUpReason':'transferToAgent'}
             self.agent.hangup(self.user_part, **sip_headers)
 
 class ToTextBotAgent:
@@ -552,7 +552,7 @@ class BotAgent:
         sip_header_vector = pj.SipHeaderVector()
         for k, v in sip_headers.items():
             _sip_header = pj.SipHeader()
-            _sip_header.hName = f"sip_h_{k}"
+            _sip_header.hName = str(k)
             _sip_header.hValue = str(v)
             print('hangup, header_name=%s, header_value=%s'%(k, v))
             sip_header_vector.push_back(_sip_header)