Voicemail calls me back

I’m using FreePBX with Mizutech webphone within an app I’ve built. From an internal extension I do this.

Webphone registers and calls the mailbox like this: *98xxxxx

I am prompted for password, enter: xxxx

Voicemail goes through the normal prompts. Then I hangup using either # or the hangup button. Doesn’t matter which.

The webphone is un-registered in order to let the person do some after call work before making another call.

After the work is done the webphone is then re-registered with the PBX. So far so good.

Now an external number is dialed. the call connects. After some time the call is ended.

The webphone is again un-registered in order to let the person do some after call work before making another call.

The webphone again re-registers with the PBX. The PBX then immediately calls back and I get the prompt to enter my password. The asterisk log says the call is coming from *98xxxxx

Any idea why this is happening and how to stop it? Any help is appreciated. I’m at a loss.

It appears I solved my own issue. Simply hanging up the call is not enough. The webphone must be unregistered before leaving or shutting down the page.