We have TAPI application based on julmar atapi which in general processes 3 events:
- CallInfo
- CAllState
- NewCall
It also writes info about this events in our database. Also We have PBX Nortel meridian
In general is used next scheme:
When external agent(not in our office) call to the our office he is addressed to the virtual number of pbx and then there is a call to the call center
My problem is the following: When NewCall event is fired ConnectedID is null until the called agent not answering when state changes to "connected" then connectedID (external number) available
I need to get external number before call center agent answering.
any suggestions?
Get the CallerId when from the call on the virtual number on the PBX.
ConnectedId is for "The connected party is the party that was actually connected to. This may be different from the called-party ID if the call was diverted." from Tapi reference
On most PBX, ConnectedId will only be used after the call has passed the connected state.
Also, if you are looking at the LINE_APPNEWCALL for the agents device, you are most likely looking at the consultation leg of a supervised transfer that only completes after the agent answers the call. So even if the ConnectedId was filled in, you would see something like the virtual number up to the CONNECTED state and then a small fraction after the CONNECTED state, see this change into the customer number (this change would be the supervised transfer completing).