title: IOS Audio is playing on ear piece though it is forced to play on speaker
body: <p>I m working on VoIP app which has a requirement to play audio on speaker by default and I have used the below code for the purpose.But still audio is playing on ear piece.Any Idea whats going wrong.My app is supposed to run on ios7 and in ios7 there is airplay option in control centre which can be used to shift audio from ear piece to speaker and speaker to ear piece.Is that apple doesn't allow apps to   play audio on speaker by default . Pls shed some light.</p>
  
  <pre><code>func SetUpCallAudio(){
          AVAudioSession.sharedInstance()
          var sessionActive = AVAudioSession.sharedInstance().setActive(true, error: nil)
          NSLog("Audiosession setActive is \(sessionActive)")
          var outputroutes = AVAudioSession.sharedInstance().currentRoute.outputs
          NSLog("output routes are \(outputroutes)")
          AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord , error: nil)
          var audioRouteOverride  = AVAudioSessionPortOverride.Speaker
          var success =  AVAudioSession.sharedInstance().overrideOutputAudioPort(audioRouteOverride, error: nil)
          NSLog("audio override to speaker call is \(success)")
      }
  </code></pre>