Jump to content

Callerid (Phone Number) Of Incoming Calls Only


dod

Recommended Posts

Hello


 


I made some tests using the ClientSDK Sample "Visual Studio.Net C# Simple".


 


I can handle the event of incoming and outgoing (active) calls.


 


In the method OnLineManagerMessage(ClientSdkEvents.ClientSdkEventArgs e) I can read the NewLineState and check if it is active. But the event get's fired on incoming AND on outgoing calls. Is there a way to check only for incoming calls?


 


If it's not possible to restrict it to incoming calls via NewLineState only, may be I can check it using the caller phone number or initiator of the call?


 


user1 -> user2 (outgoing)  |  user1 is the initiator of the call


user1 <- user2 (incoming)  |  user2 is the initiator of the call


 


Can the number of the initiator of a call be read from an ongoing call?


 


Regards


Link to comment
Share on other sites


Yes, the event is of course fired on any line state change, but the line state itself differs clearly between the different possibilities. 


 


Take a look e.g. in the "Samples\Visual C++ ATL PlugIn" example into the "CLMGrPubTypes.h" file. It defines all possible line states:



//possible line states
typedef enum
{
PubLSNone=-1,
PubLSInactive=0, //line is inactive
PubLSHookOffInternal, //off hook, internal dialtone
PubLSHookOffExternal, //off hook, external dialtone
PubLSRinging, //incoming call, ringing
PubLSDialing, //outgoing call, we are dialing, no sound
PubLSAlerting, //outgoing call, alerting = ringing on destination
PubLSKnocking, //outgoing call, knocking = second call ringing on destination
PubLSBusy, //outgoing call, destination is busy
PubLSActive, //incoming / outgoing call, logical and physical connection is established
PubLSOnHold, //incoming / outgoing call, logical connection is established, destination gets music on hold
PubLSConferenceActive, //incoming / outgoing conference, logical and physical connection is established
PubLSConferenceOnHold, //incoming / outgoing conference, logical connection is established, not physcically connected
PubLSTerminated, //incoming / outgoing connection / call has been disconnected
PubLSTransferring, //special LSOnHold, call is awaiting to be transferred, peer gets special music on hold
PubLSDisabled, //special LSInactive, wrap up time, we will temporary not allow calls on that line
PubLSDirectCall //incoming call, logical and physical connection is established, micro is muted
} PubCLMgrLineStates;

Link to comment
Share on other sites


Yes, I've seen that, there is a

 

PubLSActive,                   //incoming / outgoing call, logical and physical connection is established

 

but I can't see

 

PubLSActiveIncoming,    //incoming call, logical and physical connection is established

PubLSActiveOutgoing,   //outgoing call, logical and physical connection is established

 

Just to compare it with the Lync-SDK where you have in addition the direction and the status (active):

 

MediaStreamDirection.Receive
MediaStreamDirection.Send

Link to comment
Share on other sites


Yes, I can see and handle all those states.


 


Given a situation where you have a general number for multiple employees and you have the ringing event handled for every employee on client-side.. not very useful if only one employee will take the call to handle the customer request.


 


I need the custom stuff to be executed only for the one employee handle the call, not for everyone.


Link to comment
Share on other sites


Hi dod,


 


but from the ringing and alerting events you can differ if it incoming or outgoing. So from them you have the differentiation you need.


 


That's why I pasted the event definitions into my first reply, as their comments clearly show which events are for incoming and which events are for outgoing calls.


 


 


PS: not sure why you down voted me...


 


 


Tom.


Link to comment
Share on other sites


You want me to set a variable in the ringing event (p.e. _IsIncoming = true) and to check this in the active event to differntiate between incoming and outgoing?


 


- What about multiple lines on the same client?


- And when to reset the _IsIncoming = false?


 


I would prefer to ignore the ringing and dialing event completely and to directly check in the active event if it's an incoming or outgoing call and then to be able to ignore the event in case it's an outgoing call, it's as simple as that :) Just to prevent errors.


 


But It seems if I have to deal with the ringing event and a variable prior to be able to handle the active event I won't implement the functionality for SwyxIt then and stay with the Lync (Skype for Business) compatibility only then, as with Lync it works very good with one event and a direction property.


Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.