I’m setting up 2 peers in sip.conf, Peer 1 (Carrier) and Peer 2 (Down stream PBX). The scenario is the following:
- A call comes in via Peer 1, drops to a context that sends the call to Peer 2.
- Peer 2 answers, then decides to transfer the call to a different number on the pstn using refer to.
- The refer message comes back in to asterisk via the Peer 2 definition and we send a new invite out to the PSTN via Peer 1.
The goal is the following:
Once the second call is answered, I want asterisk to send 2 reinvites to peer 1 telling the first leg of the call and the second leg to point to each other’s SDP IP for media cut through, taking Asterisk out of the media path of the 2 calls.
My peer definitions are as follows:
(Carrier)
[Peer 1]
type=peer
host=x.x.x.x
context=to_peer2
disallow=all
allow=g729,ulaw
dtmfmode=rfc2833
canreinvite=yes
insecure=port,invite
(Downstream PBX)
[Peer 2]
type=peer
host=x.x.x.x
context=to_peer1
disallow=all
allow=g729,ulaw
dtmfmode=rfc2833
canreinvite=no
insecure=port,invite
Do I need to have Peer 1 and Peer 2 set to canreinvite = yes? or just Peer 1? I don’t want peer 1 bypassing Asterisk and re-inviting to peer 2 during the first part of the call setup. I only want the reinvite to come from asterisk to the incoming call leg from the PSTN and the outbound call leg to the PSTN to have them send media between the 2 PSTN peers.