Jump to content

Question about PBXCall.ConnectedName() when using lua


Mackapacka
 Share


Recommended Posts

Hello!
I am writing a call routing script where i try to connect a call to a user and detect any transfers.
I am trying to use PBXCall.ConnectedName() and compare it to a variable i have stored with the name. The problem is that when I transfer the call using Swyxit client the PBXCall.ConnectedName() doesn't change.
Below is the snippet of code where i try to detect transfers. (number is a valid phone number)

 

Am I doing something wrong?

 

local retVal, rcDummy
retVal, rcDummy = gseConnectToEx6(number, 20, "", false, rcDummy, true, false, "", false, "",
    false)
if (retVal == gseStateConnected) then
    PBXCall.WaitForDisconnect(1)
 
    while connectedName == PBXCall.ConnectedName() and not PBXCall.IsOriginatorDisconnected() do
        PBXScript.Sleep(500)
    end
    if PBXCall.IsOriginatorDisconnected() then
        PBXScript.OutputTrace("Script Disconnect")
    else
        PBXScript.OutputTrace("Call Was transfered")
    end
end
Link to comment
Share on other sites


Hi, generally that is exactly what PBXCall.ConnectedName und PBXCall.ConnectedNumber is there for (beside figuring who took the call if you connected it to a group).

 

As it should work you should check the server trace file for more details on what name was returned by this function.

 

Here you will find some hits on how to find the server trace file and filter it down to the information you are interested in.

 

Additionally, here you will find some hints how to add own tracing into the server trace file to make debugging more easy.

 

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.