To buy a traditional life insurance policy sometimes the underwriting can take up to 3 months to get approved. If you are leaving next month, don't get your hopes up in getting a life insurance policy in place before you leave. One thing to also consider is the risk in some Middle Eastern countries. I don't know what part of the Middle East your are going to, but if you're going to a place like Egypt, Afganistan, and any other place where there is war or civil unrest, an insurance company could flat out decline your application based on that alone becuase it's a huge risk to them (you pay $100 for the first month, then they pay out $500,000 a month later if you die in the middle of a war zone in Iraq or something...they'd be taking a suckers bet on that).
Now, that being said, if you do apply and they do approve you, barring any specific exclusions, if the policy is inforce and you die in a different country, the policy would pay out as long as it's within the rules of the policies. Once a policy is approved the the first premium chck is cashed, it's in force and eligible to make a claim. If you bought a policy, got it approved and the check went through, then as you're walking out of your insurance agents office you get hit by a bus, it should pay out (obviously a very generalized explanation). Some policies have exclusions for suicide within the first 2 years, some exclude an act of war, etc. Every company offers different exclusions and policy options.
Check with a local broker to see what options you have. Every province/state/country has different options available to them. Also, check into travel insurance policies. These can be issued at a much shorter time period but the payout might not be as big...might only be a couple thousand dollars at most.