Tying together AJAM web app and softphone

Hi Folks,
I have a small web app that uses AMI (well, AJAM) to make call transfers etc on a small system that has several “operators” each with their own PC which uses a soft phone as an “operator headset”.

I’m now faced with some feature requests that require the web app to know which call on the system has originated from the softphone on the PC that is running the web app.

Without having the user “log in” to the web app and provide caller ID info that way (or otherwise tick a box on the web app next to a channel icon etc, there should ideally be no operator intervention required) is there any way you can think of doing this from javascript and AMI? I can get the IP address of the operators machine into the javascript environment, so that’s a good start perhaps, but am a bit stumped as to how to proceed.

I have full control over the asterisk machine so can add things to the diaplan etc if necessary.

Any good ideas out there?

Many Thanks,