locked
Problem with reassigning Workflow DID to user. RRS feed

  • Question

  • I had two different RGS Workflows that only led to one user so I eliminated the workflows and just assigned the DID phone number to the users directly to eliminate the connection delay and all the other problems that can come from using Workflows.

    It seems to work fine but I recently discovered that one of my Branch sites can't call those two users. Only the people in this branch pool have the problem. They get an error that "there is more than one contact with the same phone number".

    if I take a user out of that branch pool they can call everyone. put them back in the branch pool and those two numbers are a problem again.

    This leads me to believe that the Branch SBA is somehow still holding on to the deleted Workflows. I've run Get-RgsWorkflow commands though and don't see the old workflows listed.

    Anyone ever have trouble reassigning old Workflow DIDs to users or see anything like this that only affects a single branch location?

    Friday, May 15, 2015 1:26 PM

Answers

  • I fixed my problem with a very un-supported solution. Obviously back up your databases and proceed at your own risk.

    Because the "duplicate number" error was only appearing at one of my branch sites I knew the problem had to be on that SBA. I suspected that is was a problem in the SBA's copy of the database and rebooting the machine or restarting the Replica service did not help. Here's what I ended up doing.

    I connected to <SBA server name>\RTCLOCAL with SQL Server Mgmt Tools

     

    Open the rtc database

     

    ResourceID is going to be the key value here.

     

    I ran this query to find which ResourceIDs had that phone number

    SELECT *

    FROM [rtc].[dbo].[ResourcePhone]

    WHERE PhoneNum = '+11234567890';

     

    This returned two results in this case ResourceId 569 and 599

     

    Then I ran

     

    select *

    from dbo.Resource

    where ResourceId = '599';

     

    That returned a user's name as the UserAtHost. I want that user to have the number so I searched the other ID.

     

    select *

    from dbo.Resource

    where ResourceId = '569';

     

    That returned my-workflow@contoso.com. That's the deleted workflow that is causing the duplicate number problem. So ResourceId 569 is my problem.

     

    Now I ran these commands. I think you have to run them in this order because of SQL rules in place.

    I'm not a SQL guy so hope for the best.

     

    delete from dbo.UserPolicy

    where ResourceId = '569';

     

    delete from dbo.ResourcePhone

    where ResourceId = '569';

     

    delete from dbo.ResourceDirectory

    where ResourceId = '569';

     

    delete from dbo.Resource

    where ResourceId = '569';

     

     

    Which will delete  the rows with ResourceId 569 from those specific tables. And then suddenly it works.

     

    I hope this helps someone someday. I supposse if I blew away my SBA and rebuilt it. That would have solved the problem in a more supported way. I tried searching for a way to force an SBA to purge it's database and rebuild but I didn't find anything helpful.

    • Marked as answer by eob455 Tuesday, May 26, 2015 6:25 PM
    Tuesday, May 26, 2015 6:25 PM

All replies

  • Not unless replication is messed up.  If you run get-csmanagementstorereplicationstatus, do all the replicas show UpToDate is true?

    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer". SWC Unified Communications

    This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Friday, May 15, 2015 3:48 PM
  • Thanks for the response.

    All my Front End servers and SBAs show True.

    I just wish the errors told me which objects/users it's seeing the duplicate entries. I've been searching AD and Lync via powershell for the DID that's giving me the problem but it only ever finds the one correct entry. Not sure where that branch SBA is coming up with the conflict.

    Nothing in the SBA's Event log.


    • Edited by eob455 Friday, May 15, 2015 6:07 PM
    Friday, May 15, 2015 6:01 PM
  • Hi,

    On one of the branch Lync user, please try to delete the Lync user profile and then test the issue again.

    Best Regards,
    Eason Huang


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Eason Huang
    TechNet Community Support

    Monday, May 18, 2015 6:55 AM
  • The local profile from C:\Users\<user name>\AppData\Local\Microsoft\Communicator? I deleted the entire Communicator folder but the problem persists. Aside from that the majority of people are on Polycom CX500 or CX 600 phones so it's those that I need to fix.
    Monday, May 18, 2015 4:17 PM
  • This is my exact problem, though so far I've tried every suggestion in this thread without success. All the scripts and searches always come back with a single entry for the numbers that are causing me a problem.

    https://social.technet.microsoft.com/Forums/en-US/608267a8-dd71-4178-9268-6c0181ccb5e9/hunt-group-eating-numbers?forum=lyncvoice


    • Edited by eob455 Monday, May 18, 2015 5:35 PM
    Monday, May 18, 2015 5:35 PM
  • I fixed my problem with a very un-supported solution. Obviously back up your databases and proceed at your own risk.

    Because the "duplicate number" error was only appearing at one of my branch sites I knew the problem had to be on that SBA. I suspected that is was a problem in the SBA's copy of the database and rebooting the machine or restarting the Replica service did not help. Here's what I ended up doing.

    I connected to <SBA server name>\RTCLOCAL with SQL Server Mgmt Tools

     

    Open the rtc database

     

    ResourceID is going to be the key value here.

     

    I ran this query to find which ResourceIDs had that phone number

    SELECT *

    FROM [rtc].[dbo].[ResourcePhone]

    WHERE PhoneNum = '+11234567890';

     

    This returned two results in this case ResourceId 569 and 599

     

    Then I ran

     

    select *

    from dbo.Resource

    where ResourceId = '599';

     

    That returned a user's name as the UserAtHost. I want that user to have the number so I searched the other ID.

     

    select *

    from dbo.Resource

    where ResourceId = '569';

     

    That returned my-workflow@contoso.com. That's the deleted workflow that is causing the duplicate number problem. So ResourceId 569 is my problem.

     

    Now I ran these commands. I think you have to run them in this order because of SQL rules in place.

    I'm not a SQL guy so hope for the best.

     

    delete from dbo.UserPolicy

    where ResourceId = '569';

     

    delete from dbo.ResourcePhone

    where ResourceId = '569';

     

    delete from dbo.ResourceDirectory

    where ResourceId = '569';

     

    delete from dbo.Resource

    where ResourceId = '569';

     

     

    Which will delete  the rows with ResourceId 569 from those specific tables. And then suddenly it works.

     

    I hope this helps someone someday. I supposse if I blew away my SBA and rebuilt it. That would have solved the problem in a more supported way. I tried searching for a way to force an SBA to purge it's database and rebuild but I didn't find anything helpful.

    • Marked as answer by eob455 Tuesday, May 26, 2015 6:25 PM
    Tuesday, May 26, 2015 6:25 PM