Who did the prime minister call? At the end of Ghost in the Shell SAC 2nd Gig, the prime minister was placed under arrest. She then calls someone from her phone (after the Americans don't answer her), and gets her power back.

The other characters kept saying, "She couldn't have called...", but we are never told who she called.

Who did she call?
It seems that the prime minister had acquired a modest amount of military backing and/or created task forces that the governing body (and section 9) were unaware of.

Similar to the clone army in Star Wars, Sifo-Dyas believed he had commissioned the secret army "for the Republic" to be held in reserve for the coming conflict. Neither the ruling party nor the Jedi council were aware of "their" army.

Exerpt from wiki:  


  "During the refugee crisis, she is arrested under charges of treason
  for requesting United Nations intervention in the crisis, though this
  action on the part of the Ruling Party chairman was not sanctioned
  by either party, or electorate - her escape from custody and the aid
  of Section 9 prevented this secret coup d'état from becoming a
  reality, and also then sent a clear signal to the American Empire that
  Japan prefers a Stand-alone status within the international community.
  
  This demonstration of capability, and the calling in of favours owed
  at the height of the crisis increased her ability to control Japan in
  the wake thereof. She also demonstrated that she held clout from a
  military stand-point: The JASDF was her tool of choice for reminding
  the contending land and sea force commanders where Japan's true
  military prowess was to be found, from both a domestic and military
  stand-point. Kayabuki displayed great wisdom by selecting Daisuke
  Aramaki and Major Kusanagi as personal advisors that prevented
  potentially cataclysmic events during the beginning of her
  premiership."


The bottom line is that she used the state's military forces (the two jets that buzzed the American sub), to protect the state, from the state, all without the state even knowing. Refusing to contribute to genocide against the refugees (and possible future citizens), the JASDF branch she called was obviously led by a patriot* who backed the State, rather than the Leadership.

Edit: *Actually, it is unclear as to whether or not the JASDF commander knew that Kayabuki had been arrested and was being fired. I like to believe in "true patriots" standing up for what's right, but it's also possible that the JASDF commander was simply not aware of Takakura's actions and would have refused Kayabuki's order, if he'd known. Since Kayabuki was being fired but wasn't fired yet (publicly), he also may have just been "following orders". The JASDF excercise is called a "favor", which leans toward the commander knowing the details of the situation and voluntarily following Kayabuki's order.