- Create a new Profile and name it "Speakerphone."
- Create a new State context, go to Phone --> Call. Set it to "Any."
- Create a new task, but there's no need to name it anything because it will only need a single action.
- Within the Entry task, go to Audio --> Speakerphone and set it to On.
- Exit the task editor, and then long-press on the Call Any,* context in order to add another Context.
- Add another State context, and go to Sensor --> Orientation. Set "Is" to Face Up.
- Exit out, and now long-press on the Entry task. Tasker will ask you to add an Exit Task. Create one.
- Once inside the task editor again, go to Audio --> Speakerphone again. This time set Speakerphone to Off.
That's it! Now, this profile will trigger when your phone is both a) within a phone call and b) face-up on a flat surface (the orientation is detected as face-up). On satisfying these conditions, Tasker will enable speakerphone, and when it fails to meet the condition (ie. when you exit the call or pick the phone up) speakerphone will turn off.