[asterisk-dev] REFER and NOTIFY behavior

Olle E. Johansson oej at edvina.net
Sun Sep 19 02:42:03 CDT 2010


16 sep 2010 kl. 11.10 skrev Klaus Darilion:

> 
> 
> Am 15.09.2010 22:00, schrieb Russell Bryant:
>> On Wed, 2010-09-15 at 11:51 +0200, Klaus Darilion wrote:
>>> Hi!
>>> 
>>> I just tested blind transfer notification with Asterisk (1.6.2.9) and it
>>> seems to be wrong:
>>> 
>>> Asterisk does:
>>> 
>>> U1(SIP)          Asterisk         U2(SIP)             U3(ISDN)
>>>    |                  |              |                    |
>>>    |----INVITE------->|              |                    |
>>>    |                  |---INVITE---->|                    |
>>>    |                  |<--200 OK-----|                    |
>>>    |                  |---ACK------->|                    |
>>>    |<------200 OK.----|              |                    |
>>>    |----ACK---------->|              |                    |
>>>    |                  |              |                    |
>>>    |---REFER--------->|              |                    |
>>>    |<--202 Accepted---|              |                    |
>>>    |                  |              |                    |
>>>    |                  |              |                    |
>>>    |<--NOTIFY---------|              |                    |
>>>    |  w/ 183 Ringing  |              |                    |
>>>    |                  |              |                    |
>>>    |<--NOTIFY---------|              |                    |
>>>    |  w/ 200 OK       |              |                    |
>>>    |                  |              |                    |
>>>    |                  |----------------SETUP------------->|
>>>    |                  |              |                    |
>>> 
>>> So Asterisk notifies the transferer that the blind transfer is ringing
>>> and was performed successfully although it does not even have tried to
>>> contact the target. I would expect that NOTIFY with sipfrag 183/200 is
>>> only sent when the PROGRESS/CONNECT is received from the transfer target.
>>> 
>>> Just as shown in  http://tools.ietf.org/html/rfc5359#section-2.4
>> 
>> I think this is expected behavior for Asterisk.  The reason is that the
>> transfer really is "complete" as far as Asterisk is concerned.  The
>> target of the transfer isn't U3, it's the Asterisk dialplan.  Asterisk
>> has successfully completed the transfer of U2 to a specified dialplan
>> location which will now executed (and may happen to make a new outbound
>> call, who knows).
> 
> OK, I see. So from chan_sip's point of view the transfer is successful. 
> But from transferer's point of view the transfer is only successful if 
> U3 is reached.
> 
> Currently implementation of transfer notification is useless - it only 
> indicates if the transfer targets number exists in the dialplan - 
> nothing more.
> 
> Are there any plans/wills to make the notifications more useful?

The reason that I implemented it this way was that in 1.4 there was no way for me to get updates on the new channel so that I could send "true" notifications. I haven't studied the new bridging API, but hopefully that APi will at some point make it possible for chan_sip to get progress updates as the channel moves along in the dialplan. But do remember that we hit the dialplan, and any thing may happen there. Might not be a new call at all...

Cheers,
/O


More information about the asterisk-dev mailing list