|
@@ -22,7 +22,7 @@ from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRID
|
|
|
SPACE, SOFIA, \
|
|
|
ORIGINATE, PARK, SET, EAVESDROP, SMF_ALEG, EXECUTE, PLAYBACK, PAUSE, TRANSFER, UUID_TRANSFER, UUID_BROADCAST, \
|
|
|
UUID_BREAK, UUID_HOLD, \
|
|
|
- UUID_RECORD, UUID_SETVAR, UUID_GETVAR, UUID_KILL
|
|
|
+ UUID_RECORD, UUID_SETVAR, UUID_GETVAR, UUID_KILL, ANSWER
|
|
|
import src.core.callcenter.esl.utils.esl_event_util as EslEventUtil
|
|
|
import src.core.callcenter.esl.handler as event_handler
|
|
|
from src.core.callcenter.esl.constant.sip_header_constant import sipHeaderHoldMusic, profile1, profile2
|
|
@@ -630,9 +630,23 @@ class OutboundClient:
|
|
|
return call_info
|
|
|
|
|
|
def hold(self, con, call_id, device_id):
|
|
|
+ msg = ESL.ESLevent("sendmsg", device_id)
|
|
|
+ msg.addHeader("call-command", EXECUTE)
|
|
|
+ msg.addHeader("execute-app-name", ANSWER)
|
|
|
+ e = con.sendMSG(msg)
|
|
|
+ self.server.logger.info("hold.answer::complete::e=%s", e)
|
|
|
+
|
|
|
+ msg = ESL.ESLevent("sendmsg", device_id)
|
|
|
+ msg.addHeader("call-command", EXECUTE)
|
|
|
+ msg.addHeader("execute-app-name", PLAYBACK)
|
|
|
+ msg.addHeader("execute-app-arg", HOLD_MUSIC_PATH)
|
|
|
+ msg.addHeader("async", "true")
|
|
|
+ e = con.sendMSG(msg)
|
|
|
+ self.server.logger.info("hold.hold_play::complete::e=%s", e)
|
|
|
+
|
|
|
# self.bridge_break(con, call_id, device_id)
|
|
|
# self.server.cache.set_need_play_hold_music(call_id)
|
|
|
- self.hold_play(con, device_id, HOLD_MUSIC_PATH)
|
|
|
+ # self.hold_play(con, device_id, HOLD_MUSIC_PATH)
|
|
|
|
|
|
def bridge_break(self, con, call_id, device_id):
|
|
|
"""拆线"""
|