### Escenario:
#
# - "CALLER" and "CALLEE" are users of the PROXY and exist as friend's in sip.conf with "host=PROXY".
# - Phone "SUBSCRIBER" is subscribed to dialog status of phone "CALLEE" in ASTERISK.
# - "CALLER" calls to "CALLEE" throught the PROXY.
# - PROXY routes the INVITE to ASTERISK.
# - Asterisk generates a NOTIFY for SUBSCRIBER with early <--- WRONG !
# - The PROXY receives the INVITE and returns 480 since CALLEE is not registered.
### PROXY -> ASTERISK
#
# Asterisk receives an INVITE from the proxy.
#
INVITE sip:CALLEE@ASTERISK SIP/2.0
Record-Route:
Via: SIP/2.0/UDP 222.111.19.45;branch=z9hG4bKaa8e.29137433.0
Via: SIP/2.0/UDP 10.134.16.124:6060;received=222.111.253.254;rport=9534;branch=z9hG4bKpbswqojn
Max-Forwards: 69
To:
From: ;tag=xdstn
Call-ID: bgkskcfinzyfnun@ibc-laptop
CSeq: 913 INVITE
Contact:
Content-Type: application/sdp
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
Supported: replaces,norefersub,100rel
User-Agent: Twinkle/1.4.2
Content-Length: 255
v=0
o=twinkle 1299965476 941753210 IN IP4 10.134.16.124
s=-
c=IN IP4 10.134.16.124
t=0 0
m=audio 8000 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
### ASTERISK -> PROXY
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 222.111.19.45;branch=z9hG4bKaa8e.29137433.0;received=222.111.19.45
Via: SIP/2.0/UDP 10.134.16.124:6060;received=222.111.253.254;rport=9534;branch=z9hG4bKpbswqojn
Record-Route:
From: ;tag=xdstn
To:
Call-ID: bgkskcfinzyfnun@ibc-laptop
CSeq: 913 INVITE
User-Agent: Asterisk Asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact:
Content-Length: 0
### ASTERISK -> PROXY
#
# Before the Asterisk sends a INVITE to the CALLEE, it generate a NOTIFY with
# early <-------- WRONG
#
NOTIFY sip:SUBSCRIBER@CLIENT_IP:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP ASTERISK;branch=z9hG4bK6237ad0b;rport
Route:
From: sip:CALLEE@my.domain.org;tag=as49f44541
To: 206 ;tag=b7c7631f1149dec
Contact:
Call-ID: 1c0dbc5deeec42995e64c14cb8611e0f@10.134.19.213
CSeq: 126 NOTIFY
User-Agent: Asterisk Asterisk
Max-Forwards: 70
Event: dialog
Content-Type: application/dialog-info+xml
Subscription-State: active
Content-Length: 249
### ASTERISK -> PROXY
#
# Asterisk now sends an INVITE to the CALLEE (it routes it to the proxy).
#
INVITE sip:CALLEE@my.domain.org SIP/2.0
Via: SIP/2.0/UDP ASTERISK;branch=z9hG4bK275aa0eb;rport
From: ;tag=as1ee61095
To:
Contact:
Call-ID: 4710827f454b151a690bc0106cf1b48d@my.domain.org
CSeq: 102 INVITE
User-Agent: Asterisk Asterisk
Max-Forwards: 70
Remote-Party-ID: ;privacy=off;screen=no
Date: Tue, 31 Mar 2009 15:15:11 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 467
v=0
o=root 3836 3836 IN IP4 222.111.19.45
s=session
c=IN IP4 222.111.19.45
b=CT:384
t=0 0
m=audio 18376 RTP/AVP 0 18 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
m=video 19388 RTP/AVP 34 103 99
a=rtpmap:34 H263/90000
a=rtpmap:103 h263-1998/90000
a=rtpmap:99 H264/90000
a=sendrecv
### PROXY -> ASTERISK
#
# The user is not registered in the proxy.
#
SIP/2.0 480 User Not Registered Now
Via: SIP/2.0/UDP ASTERISK;branch=z9hG4bK275aa0eb;rport=5070
From: ;tag=as1ee61095
To: ;tag=9c8820d6d218ad3b083970da1cfb73e0-f2ce
Call-ID: 4710827f454b151a690bc0106cf1b48d@my.domain.org
CSeq: 102 INVITE
Server: Kamailio (1.5.0-notls (x86_64/linux))
Content-Length: 0
### ASTERISK -> PROXY
ACK sip:CALLEE@my.domain.org SIP/2.0
Via: SIP/2.0/UDP ASTERISK;branch=z9hG4bK275aa0eb;rport
From: ;tag=as1ee61095
To: ;tag=9c8820d6d218ad3b083970da1cfb73e0-f2ce
Contact:
Call-ID: 4710827f454b151a690bc0106cf1b48d@my.domain.org
CSeq: 102 ACK
User-Agent: Asterisk Asterisk
Max-Forwards: 70
Remote-Party-ID: ;privacy=off;screen=no
Content-Length: 0
### ASTERISK -> PROXY
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 222.111.19.45;branch=z9hG4bKaa8e.29137433.0;received=222.111.19.45
Via: SIP/2.0/UDP 10.134.16.124:6060;received=222.111.253.254;rport=9534;branch=z9hG4bKpbswqojn
From: ;tag=xdstn
To: ;tag=as31cba225
Call-ID: bgkskcfinzyfnun@ibc-laptop
CSeq: 913 INVITE
User-Agent: Asterisk Asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0
### PROXY -> ASTERISK
ACK sip:CALLEE@ASTERISK SIP/2.0
Via: SIP/2.0/UDP 222.111.19.45;branch=z9hG4bKaa8e.29137433.0
From: ;tag=xdstn
Call-ID: bgkskcfinzyfnun@ibc-laptop
To: ;tag=as31cba225
CSeq: 913 ACK
Max-Forwards: 70
User-Agent: Kamailio (1.5.0-notls (x86_64/linux))
Content-Length: 0
### PROXY -> ASTERISK
SIP/2.0 200 OK
From: sip:CALLEE@my.domain.org;tag=as49f44541
To: 206 ;tag=b7c7631f1149dec
Call-ID: 1c0dbc5deeec42995e64c14cb8611e0f@10.134.19.213
CSeq: 126 NOTIFY
Via: SIP/2.0/UDP ASTERISK;received=222.111.19.45;branch=z9hG4bK6237ad0b;rport=5070
Content-Length: 0
Contact: 206
Supported: replaces
User-Agent: Aastra 55i/2.0.2.1040 Brcm-Callctrl/v1.7.2.2 M5T SIP-UA SAFE/v3.6.7.11
Server: M5T SIP-UA SAFE/v3.6.7.11
### ASTERISK -> PROXY
#
# Asterisk then sends a NOTIFY with terminated to the subscriber.
#
NOTIFY sip:SUBSCRIBER@CLIENT_IP:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP ASTERISK;branch=z9hG4bK7762e95d;rport
Route:
From: sip:CALLEE@my.domain.org;tag=as49f44541
To: 206 ;tag=b7c7631f1149dec
Contact:
Call-ID: 1c0dbc5deeec42995e64c14cb8611e0f@10.134.19.213
CSeq: 127 NOTIFY
User-Agent: Asterisk Asterisk
Max-Forwards: 70
Event: dialog
Content-Type: application/dialog-info+xml
Subscription-State: active
Content-Length: 232