signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.32k stars 1.38k forks source link

mod_callcenter bug #2516

Open BIT-ja opened 4 days ago

BIT-ja commented 4 days ago

Describe the bug centos7 + freeswitch1.10.9 + lua5.3 In my Lua script, when I use app[callcenter] to allocate an idle agent, after the agent answers, aleg still continues to play moh_sound.

below my code:

local call_str="sofia/external/sip:dst_number@1.1.1.1:5060"

local session = freeswitch.Session("{origination_caller_id_number=123,effective_caller_id_number=aaa,sip_h_P-Asserted-Identity=<sip:824641937@1.1.1.1>}"..call_str)

session:execute("wait_for_answer")
session:setAutoHangup(false);
if session:ready() then
        session:execute("callcenter","support@default")
end

and then i use [callcenter] in my dialplan like this, it works right.

local call_str="sofia/external/sip:dst_number@1.1.1.1:5060"

local session = freeswitch.Session("{origination_caller_id_number=123,effective_caller_id_number=aaa,sip_h_P-Asserted-Identity=<sip:824641937@1.1.1.1>}"..call_str)

session:execute("wait_for_answer")
session:setAutoHangup(false);
if session:ready() then
       session:execute("transfer","aabbcc XML public")
end
<include>
  <extension name="public_did">
    <condition field="destination_number" expression="^(aabbcc)$">
      <action application="callcenter" data="support@default"/>
    </condition>
  </extension>
</include>