Author Topic: Get current ConnID from Interaction  (Read 2128 times)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Get current ConnID from Interaction
« on: September 25, 2017, 03:47:35 PM »
Hi guys
Having a situation here.


PSDK C#


I need to get the current connID of an interaction. I am developing a software which monitors a few DNs. The idea is that a supervisor can release a call (by business model) at any time.
Do I need to monitor the events of each DN to get the ConnID for the current call on each Event or is there a way I could just query the ConnID of a DN at any moment to send the RequestReleaseCall?


Thanks

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: Get current ConnID from Interaction
« Reply #1 on: September 25, 2017, 04:28:52 PM »
RequestQueryAddress might do the trick (you can even do that on the TestPhone on the Query tab to see how the output comes - EventAddressInfo). You don’t even need to be registered to the DN to perform the RequestQueryAddress (although you’ll need to be registered to send the RequestReleaseCall)

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: Get current ConnID from Interaction
« Reply #2 on: October 19, 2017, 01:54:48 PM »
Do you have an IInteraction object? If you do, you can get the ConnID like this:

interaction.EntrepriseLastInteractionEvent.ConnID.ToString()
« Last Edit: October 19, 2017, 01:57:16 PM by Gabi »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Get current ConnID from Interaction
« Reply #3 on: October 19, 2017, 01:58:13 PM »
Thanks guys, got it.
Just to mention that the connid in the PSDK is always capital letters and TServer uses lower ones...so be careful with that.

Enviado de meu E6633 usando Tapatalk