SIP forwarding to PSTN

I’m a complete newbie with Asterisk and is currently evaluating whether it makes sense for me to use it or not. So please bear with me if I seem ignorant – I tried diligently searching for an answer but didn’t succeed.

Anyway. My question is the following:

User A: Has a sip account at some free service, for example iptel.org, which doesn’t offer outbound calls to PSTN.
User B: Has a sip account at some voip provider that offers outbound PSTN calls.

Is it possible for User B to setup Asterisk to allow User A to call User B with a specially formatted number containing a PSTN number, the call then being forwarded to the PSTN number via User B’s sip account? Authentication would be taken care of either by including a password or nonce in the sip number or by means of user A’s caller-ID / originating IP address. User A does not have the ability to install anything at his end, he just has his free sip service.

(I hope the above makes sense, maybe it’s possible to create the above functionality in a much less convoluted way. Or maybe there are already services providing this service, which would also be great).

If anyone can give me pointers to solving the above, or let me know if it’s possible with Asterisk at all, I would appreciate it.

Thanks in advance!

I don’t see the logic in providing a public SIP service, other than a registry, that doesn’t give PSTN access. SIP can operate in a fully distributed mode.

From a technical point of view, Asterisk can do this, although it might be better to register the phone directly. You would need to check whether your service contract permits this.

Thanks for the answer.

Oh, so you are saying that SIP can be set up to allow calls to pass through another account or something along those lines? I don’t have too much experience with SIP yet, but would be delighted if such functionality would be available without using Asterisk.

It’s not supposed to be a public service, I just want to allow User A to be able to make calls to any PSTN number using User B’s account (on a different server) so to speak (but indirectly without knowing his SIP password). Is this possible in a SIP-only setting?

Thomas