To originate calls from a Linux server you will need to install either a SIP client or a SIP switch software (like Asterisk or Freeswitch). I'm not sure if any of the SIP clients support the scenario you described, but it would be fairly straight forward with software like Asterisk or Freeswitch.
SIP Express router or Kamailio would be good choices. Asterisk is could also do it, but since its more of a PBX model, it has a lot more unneeded overhead for this kind of function.