Connecting Arduino to a 56k voice modem and recording audio.

I really don't see why you need the same code that is present in every Arduino IDE, but here you are:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(38400);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  mySerial.begin(38400);
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if(Serial.available()) {
    mySerial.write(Serial.read());
  }
}

@jregminton Yes, the sound isn't that good, but it is good enough for the recorded voice to be intelligible so for this use it should be fine.