This is just a rumor and i just wanted to share with you. The mother of a flight attendant said she received a phone call from her daughter saying machine guns were being fired in the cabin and then the connection ended.
The stewardess was from the city of Nova Kakhovka and was my wife's classmate. Don't know if the rumor stands, however i guess we'll soon find out. If there was indeed gunfire, the Iranians will be quick to reveal that info, in order to clear themselves from the missile theory.
Since at this stage we all operate on very noisy and unreliable data, we should really talk in probabilities (and understand them as well -- unlike the media that blamed Nate Silver for assigning Trump "only" 30% probability to win).
So back to the topic.
I'd say that machine gun fire inside the cabin has about 0.1% probability to down the airliner in the manner we have seen (and on the data we can reasonably trust). First, the pilots would probably notify ATC or at least change the transponder code (hijacking). Second, I don't know about security in Tehran airport, but Tehran itself is not a war zone, it is not Baghdad, not even a typical US inner city overflown with guns. So someone bringing a machine gun onto an airplane is basically unbelievable.
Now, to divide the rest 99.9%, IMHO.
0.9% intentional downing by a state actor, either Iran or US (fully aware that it is passenger airplane)
19% intentional downing by a MANPADS, operated by some kind of guerilla or rogue force inside Iran
50% of iran making a tragic mistake with nervous and trigger-happy air defences which expected massive retaliation after hitting US bases with missiles
20% uncontained engine failure or other technical fault
20% some kind of unplanned accidental interference with US or Iran military operation (collision with the US drone, unfortunate collateral damage in legitimate Iran action to shoot down existing US aircraft or drone, etc).
I have assigned highest probability to iran's tragic mistake due to Iran being very tame about this incident and claiming basically immediately that it was not downed by a missile. Please note the usual fiery rhetoric from Iran about USA and the West in general (the great Satan etc.) Claiming that it wasn't a missile basically when aircraft barely touched the ground reveals that they know more than they are saying and the tame reaction basically means that they feel at least partly responsible for the downing - or they are sure there were no missiles in vicinity, therefore technical fault. MANPADS or any organized guerilla force in such close vicinity of Tehran airport and indeed urban city itself would be also a massive humiliation to Iran, so that would probably met with subdued silence as well.
Otherwise they would be screaming all over, after all there were two busloads of Iranians on that plane!
Note (0.9% still means that the outcome is possible... but very unlikely, lesson Nate Silver and Trump election).