Lovely technique to escape a very common trap position - thanks. Interesting to note that Pablo Popovitch shows a similar move from the knees - another infuriatingly common position to get stuck in. Invaluable.
This is a helpful video. This is the same position Cung Le was in against Vanderlei Silva. He got kneed badly from there because he couldn't get his head out. I guess the other puzzle is how does one defend knees from there long enough to escape.
There's a traditional escape for headlocks: Short ( sucker ) Drag. When someone grabs your own arm to headlock you, you simply use that "same arm" he's using to choke ( headlock ) you, and hold the outside/back of his elbow, and simultaneously side-step towards his back foot. In other words, you'll end up facing the "same direction" if completed correctly. Also: Dip your head downward while pulling the elbow. The sidestepping opens up the 'headlock" hold, via ANGLE moving via "T" ( perpendicular).