Skip to content

fix(mod_callcenter): propagate member channel variables to agent originate leg via ovars #3094

Description

@gaurang1102

Describe the bug
When mod_callcenter dispatches an agent call in agent_dispatch_thread(), it builds an outbound variable event (ovars) and passes it to switch_ivr_originate(). The cc_export_vars parameter is intended to allow operators to specify which member-channel variables should be injected into this agent leg.

However, variables listed in cc_export_vars are not reliably applied to the ovars event that is constructed for the originate call. As a result, SIP-layer variables that must be present before the INVITE is sent — specifically sip_invite_domain — are missing from the agent's outbound INVITE, causing routing and authentication failures in SIP deployments where the agent's SIP domain must be explicitly declared. Also codec_string variable.

** Affected Code**
File: src/mod/applications/mod_callcenter/mod_callcenter.c
Function: agent_dispatch_thread() — specifically the section that builds ovars before calling switch_ivr_originate().

To Reproduce
Steps to reproduce the behavior:
(1) Configure a callcenter queue with in the queue XML.
(2) Set sip_domain and codec_string on an inbound call entering the queue via a dialplan
action application="set" data="sip_domain=sip.example.com"
action application="set" data="codec_string=G729,PCMU,PCMA,G722,iLBC@30i"
(3) Have an agent answer the call.
(4) Capture the agent's outbound SIP INVITE with
fs_cli -x "sofia global siptrace on"
(5) Observe that the Request-URI, Contact and CODEC do not include the expected domain, sip_invite_domain and codec string is absent from the originate variable set.

Expected behavior
Variables declared in cc_export_vars are read from the member channel and added to the agent's ovars event before switch_ivr_originate() is called, so the agent INVITE includes those variables.

Package version or git hash

  • Version [1.10.7 through 1.11.1.]

Trace logs
Provide freeswitch logs w/ DEBUG and UUID logging enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions