Manually re-invite

I’ve searched and cannot find an answer to this anywhere. I’m sorry if this has already been answered. :confused:

I am trying to find a way to re-invite the media stream back to the Asterisk server after it has been moved off of it. The idea would be to, by default, re-invite the media to go directly between the peers. Then, at some point in time, re-invite that media back to the Asterisk server. I hope this makes sense and I really appreciate your help. Be gentle with me… I’m an Asterisk noob. :stuck_out_tongue:

I don’t believe that Asterisk was ever designed to allow this to be done. However, you might be able to redirect the channels to achieve it. My guess is that you would have to redirect them both into a conference, to remove the external bridge.

You can’t find an answer because it not something people want to do and it is not somethinf for which any explicit provision has been made.

As with all such strange requirements, it is best to say to what problem this is the proposed solution.

Thanks for the reply.

Basically, we have hundreds of users concurrently using our software which implements a web based interface to use our dialers. To minimize traffic and CPU usage to our dialer boxes, we would like to allow the RTP traffic to be handled directly between the peers. The problem is that our solution allows a user to do things like play recorded messages or start monitoring calls that are in process. If the RTP traffic is not on the Asterisk box, this can’t happen. So we would like to be able to pull it back in when needed. Mostly, we’re trying to optimize the usage of our dialer servers to save the company money.

I hope this helps. Again, thanks for the help.

Just a thought…

Our system is PHP backed. Suppose there are two legs of a call being controlled by Asterisk and the RTP traffic has already been re-invited to be between the two peers. In theory it would be possible to use PHP to issue a re-invite to the peers to redirect their RTP traffic back to the Asterisk server. The part that I’m unclear on is what Asterisk would do with the RTP traffic once it’s been redirected. Would it even be able to handle that? Could it redirect both legs into a conference to achieve the desired result? :confused:

Please advise.

There is no direct control of re-invites, however, if you actuallly redirect a caller to a voice message, Asterisk should re-invite it back without your having to do anything specific. At first, I thought you wanted to maintain both parties to an existing call.

Actually, I do want to be able to maintain both legs of the call. One such case would be when a third party wants to connect to an existing call to monitor it.

If Asterisk fails to re-invite back when you start a monitor on it, please follow the SIP bug reporting rules and raise an bug report on issuses.asterisk.org. They only time I might expect it to get confused is if you changed the sip.conf settings mid-call.

Thanks much for your continued help.

Would the same be true if we were using ChanSpy?

Any change in the call configuration that is incompatible with native bridging out to cause a re-invite back in, as long as it is applied to the call and not the devices. I can’t say whether or not something is broken in this area, but you need to try it and prove it doesn’t work first.

So far this seems to be working! Thanks for all of your help! :smiley: