Is Asterisk able to use cheapest phone line?

I currently have two phone lines (with different telecom providers) and multiple mobile phones (with a subscription to other telecom providers). I was just wondering whether it’s possible to call from my mobile phone and let Asterisk decide which line is the cheapest to call from at the current day, time and type of phone number that is being called. However, some mobile phone users aren’t allowed to call via a certain phone line while others do. Is this possible with Asterisk?

Yes. You can either do time & destination based rules in your Asterisk dialplan or install a full-blown rate engine to do least cost routing.

So if I’m not at home how would Asterisk be able to handle my request? I assume that it would be very slow if the line would go like this:
Mobile phone -> Internet -> Asterisk -> phoneline 1
or the other way: Phoneline1 -> Asterisk -> Internet -> Mobile phone

Is Asterisk also able to show the person that receives my phone call that he will see my mobile number instead of my phoneline1 number?

In terms of routing decisions, there is nothing built into Asterisk, but the configuration language has the power to do almost anything.

In terms of caller ID presentation, the limitation is set by the service providers. Many are reluctant to forward numbers that they don’t supply, because of the risk of fraudulent use, as well as lost revenue.

That’s nice! So where can I buy Asterisk ready-to-use router? Or should I build it myself? If so, how much will it approximately cost?