Hi! I have some problems understanding the concept of REFER in Asterisk 1.4.23. I have the following scenario: Incoming SIP call (incoming leg) from a SIP trunk into Asterisk (handled in context fromTrunk), forwarded to the SIP Client (outgoing leg). Now, the SIP Client sends a REFER request (unattended transfer) to another extension. This terminates the outgoing leg and the incoming leg continues dialplan processing in the context of the SIP client (fromSipClient). Processing in the client's context is IMO fine, but the problem is that the channel is the incoming channel from the trunk. So the fromSipClient is processed by the trunk channel. This in my case does not work as it expects to have certain variables set (setvar in sip.conf) - but these variables are not present as the new extension is executed by the trunk's channel. I it possible to execute the second call setup completely in the SIP clients settings (e.g. loading the clients setvar options)? regards klaus
19 feb 2009 kl. 00.08 skrev Klaus Darilion:> Hi! > > I have some problems understanding the concept of REFER in Asterisk > 1.4.23. > > I have the following scenario: > > Incoming SIP call (incoming leg) from a SIP trunk into Asterisk > (handled > in context fromTrunk), forwarded to the SIP Client (outgoing leg). > > Now, the SIP Client sends a REFER request (unattended transfer) to > another extension. This terminates the outgoing leg and the incoming > leg > continues dialplan processing in the context of the SIP client > (fromSipClient). > > Processing in the client's context is IMO fine, but the problem is > that > the channel is the incoming channel from the trunk. So the > fromSipClient > is processed by the trunk channel. This in my case does not work as it > expects to have certain variables set (setvar in sip.conf) - but these > variables are not present as the new extension is executed by the > trunk's channel. > > I it possible to execute the second call setup completely in the SIP > clients settings (e.g. loading the clients setvar options)?I would suggest you do some processing in the TRANSFER_CONTEXT and load the variables you need. The SIPPEER dialplan function might be useful. /O