Easy way to distribute calls?

Discussion in 'CRM / Helpdesk / App Integration' started by millsey, Apr 12, 2013.

Thread Status:
Not open for further replies.
  1. millsey

    millsey New Member

    Joined:
    Dec 21, 2011
    Messages:
    190
    Likes Received:
    0
    I want to have a VAd which puts one in five calls to an external number, and the rest to an internal group or another VAD. I can do this using HTML requests etc - but I don't want to have to rely on an external source if possible. Iis there a simple permanent counter I can use? It has to be solid reliable as it is a shared marketign campaign with another company. So dividing the current call id by 5 would not cut it.

    Thanks
    Millsey
     
  2. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    You can use different approachs, but the most reliable in my opinion would be creating a simple DLL to be called from an external code execution component.

    When the external code execution component is configured to call a method into a .NET DLL, this is what happens:
    1) The flow executes an ASPX page in the web server (IIS or Abyss).
    2) Into that ASPX page, a new instance of the object type specified is created, using the default constructor, and then the method is executed.
    3) Into that method you can call a Singleton that atomically increments a number, and returns that number.
    4) All the VAD calls share the same memory space, so the singleton will keep the same counter for all the calls.

    It's important to increment the counter into a singleton and not into the object created by the VAD. This is because the VAD will create a different object for each call, but the Singleton will be the same instance for every call.

    Hope the information helps.

    Regards,
     
  3. millsey

    millsey New Member

    Joined:
    Dec 21, 2011
    Messages:
    190
    Likes Received:
    0
    I can do this (just) but I don't think the counter woudl survive a reboot or restart of IIS.

    I think I will do this by PHP. Is there a way to call an executable / script rather than a DLL?
     
  4. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Well, you can also persist the counter to a file, that way it will survive restarts.

    Or if you're going to do it with PHP, then you can send the HTTP request using a web interaction component, and you don't need to code anything.
     
  5. millsey

    millsey New Member

    Joined:
    Dec 21, 2011
    Messages:
    190
    Likes Received:
    0
    I will do a scalar SQL query to call a stored procedure on MS SQL database which receives the call data, gets the last row ID and modulo it against our call sharing ratio. Then if result = 0 then go to other comapny, otherwise go to next VAD

    Thanks anyway, I was overthinking it.

    Millsey
     
  6. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    That's also a good solution.
     
Thread Status:
Not open for further replies.