Hi Jolly,
Sorry for the delayed response. It took some time to get the proper phone models.
I tried this scenario with 7970 phones as well as 7960 phones. On 7970 phones this works fine because the phone is capable of handling two simultaneous commands. First is the dial command and the second is the xml (menu) object being sent to the phone.
But the 7960 and the 7940 phones are not capable of executing these two commands simultaneously. You might have observed that just after the Exit key is pressed on the menu, the call is made.
I was getting some issues running your application, so I created a small application to test this scenario. I am attaching the application named "CallInitiated_Menu" with this post. Kindly have a look into the app and let me know if this solution works for you.
I have introduced a negligible sleep of 500 milliseconds before I send the menu object to the phone. This gives the phone a little time to dial the numbers before the menu item is pushed to the phone.
I do not have a 7940 phone with me right now, so I could not run this on 7940. Can you please run it 0n 7940 and let me know the results?
Regards,
Rakesh