[Asterisk-Dev] sip refer

Olle E. Johansson oej at edvina.net
Wed Oct 20 01:59:27 MST 2004


Richard wrote:

> Hi,
> 
> When * gets a sip REFER message, it looks through the context and dial 
> plan. Since I use * as a PSTN gateway with ser, the desired effect would 
> be * sending a sip INVITE message to the “Refer-To” address inside the 
> sip REFER message.
> 
> In case of a blind transfer, can I just modify chan_sip.c to make a new 
> sip call and replace the existing call with it? Anything I need to worry 
> about this approach?

My worry is that you do not understand the difference between Asterisk
and a SIP proxy ;-)

Every call in Asterisk goes through the dial plan. If we get a Refer-To,
it has to go through the dial plan, because you do not know where the
extension is - on an IAX trunk, a SIP peer or maybe a Zap phone line.

If we received it in chan_sip and sent it out again, without letting
the PBX handle the transfer, we would certainly break the Asterisk
architecture.

So my humble advice is: Fix your dialplan! If you are using SIP,
the dialplan should be able to handle any sip URI.

/Olle



More information about the asterisk-dev mailing list