Looking at the log sent by the user, this is not related to branch param generator at all.
What happened was the call is hangup by user (presumably due to TCP disconnection) which caused CANCEL to be sent. Then shortly after that, the stack is shutdown by the application, and PJSUA-LIB hangs up all active calls, causing another CANCEL to be sent. Since the first CANCEL transaction has not been completed, the second CANCEL would fail with that "key exists" error.
I think this is fine, unless it caused crash or similar problems.