次のダイアログがあるとします。
Agent A Agent B
| |
| F1 REFER |
|----------------------->|
| F2 202 Accepted |
|<-----------------------|
| F3 NOTIFY |
|<-----------------------|
| F4 200 OK |
|----------------------->|
| |
| |
| |------->
| | (whatever)
| |<------
| |
| F5 NOTIFY |
|<-----------------------|
| F6 200 OK |
|----------------------->|
| |
| |
| |
| F7 REFER |
|----------------------->|
| F8 202 Accepted |
|<-----------------------|
| F9 NOTIFY |
|<-----------------------|
| F10 200 OK |
|----------------------->|
| |------->
| | (something different)
| |<------
| |
| F11 NOTIFY |
|<-----------------------|
| F12 200 OK |
|----------------------->|
| |
| |
2 つの REFER を使用 ( RFC 3515から取得)
次のように、REFER ごとに NOTIFY リクエストを受け取ります。
NOTIFY sip:192.168.1.39:5062;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.249;rport=5060;branch=z9hG4bKyZ09F8gtB6rtQ;received=192.168.1.249
Max-Forwards: 70
From: "Extension 1200" <sip:1200@192.168.1.249>;tag=7ytSSBvaBeN5H
To: <sip:1201@192.168.1.39:5062>;tag=25b9a9ba-f249-4e21-a25a-c2ed578c5101
Call-ID: f94d6be3-edfc-122f-ebb0-000c29da7e39
CSeq: 25832274 NOTIFY
Contact: <sip:mod_sofia@192.168.1.249:5060>
User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-5e4a514 2012-03-10 22-56-29 -0500
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,UPDATE,INFO,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE
Supported: timer,precondition,path,replaces
Event: refer;id=1
Allow-Events: talk,hold,presence,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer
Subscription-State: terminated;reason=noresource
Content-Type: message/sipfrag;version=2.0
Content-Length: 16
SIP/2.0 200 OK
REFER が成功したことを通知します。
問題は、NOTIFY で、どの REFER が対象であるかをどのように知ることができるかということです。