PSTN to PSTN transfer - how?

Should this be possible?

  • Forget it. It will never work.
  • Yes, it might.

0 voters

I make a call from one of my asterisk hosted SIP phones to the PSTN (via SIP trunking). I get connected, we talk. Then I need to place a consultation call another PSTN party, so I place the 1st party on hold. All works well to this point.

Party 1 is on hold (out on the PSTN)
Party 2 is talking with me (also out on the PSTN).

Now i want to transfer Party 1 to Party 2 and get myself out of the call. I do an attended transfer. All works well. Party 1 is now speaking to Party 2 (PSTN to PSTN) and I am out of the call. So far so good.

However, when I look at my network, the voice packets from Party 1 and coming into my network to my asterisk server and then being hairpinned back to Party 2. So I am still in the speech path.

Id really like to get myself out of that speech path.

Is there any way to get Asterisk to do an optimization using a REFERR or TEMPORARILY MOVED back to the PSTN SIP carrier to get itself out of the speech path?

Simple Plain Old Telephony (POTS) used to be able to do this with hook flash and attended transfer. I wish we could still do it with SIP.

Is this simply impossible with asterisk because it is a B2BUA? Or could I tweek some code to enhance this?

Thanks for any pointers.

i dont think asterisk can completely separate itself from the call, however if you are using reinvites on both trunks you should be able to at least get it out of the media path…

Yeah, thats the problem, I cant get it to get itself out of the media path even with re-invites. Its re-inviting each time using my IP-Address as the terminating party on both re-invites. So I am acting as a hair-pin.

I realize this would be needed for NAT traversal, however, it would be cool if I could hand the re-invite back off to the carrier to do on my behalf, so I am out of the loop.

It’s not goign to happen.
PSTN is pretty dumb.
If you had ISDN and CAPI, then with CAPI you can transfer from the trunk ONLY if your provider allows you to.

I would believe you except it works when i do not connect Asterisk but just use a dumb SIP phone instead - hooked directly to my SIP provider. There I can do a re-invite and the SIP PSTN provider accepts it and I am out of the loop.

I just cant make Asterisk get out of the loop. Its always using its IP-Address as the terminating party on both re-invites.

Hold on…
You’re saying you get a SIP trunk from your provider and they’re doing the PSTN termination you will of course be able to transfer. They are committed to holding onto the PSTN-terminated connection.

If you chuck an analog phone on the PSTN end point, you cannot just transfer the call off, AFAIK. Sure, you can hook-flash it, but the call is still on your PSTN trunk. Once you let it go, it’s gone - of course, I may be wrong - but I’m 99% sure.

How do the telcos make their money? If we could transfer from the trunk,bridge the call and p*** it off, we wouldn’t have to pay carriage. Yeah? I can’t see how the exchange will allow the call to do that without you as the intermediate party - they just don’t allow that to happen. It’s all voltages and crp like that - 50v on/off makes the phone ring or something like that.

I’ll show my colleague tomorrow this post - he’s been in the telco game for 30 years or so. It’s 11:15pm - I should be in bed :wink:

Good luck until then m. magill

This is pretty basic TDM telecom stuff. It has worked for years but you did have to subscribe to it.

Basically the Telco still earn money and bill you for the call but they do what is called “Route Optimization”. That means, they realize you no longer want to be part of the call and re-route the call internally in their Class 5 PSTN switch and take you out of the loop.

Naturally as long as those two people talk, you are going to get billed for it but your phone is now free again to take other calls.

This feature was called “Trunk to Trunk Transfer”.

Ah ha.
So does that mean your provider is doing the route optimisation but you’re having trouble with the asterisk part of it?
If so, sorry for the hassles, but at least it’s out there for another to see.
mylo