...
# account only INVITEs
if (is_method("INVITE")) {
setflag(1); # do accounting
setflag(4); #dialog aware
if(avp_db_load("$ru/username","$avp(s:fork)"))
{
avp_pushto("$ru/username","$avp(s:fork)/g");
};
}
....+----+------+----------+--------+-----------+------+-------+---------------------+
| id | uuid | username | domain | attribute | type | value | last_modified |
+----+------+----------+--------+-----------+------+-------+---------------------+
| 4 | | 1000 | | fork | 0 | 1001 | |
| 3 | | 1000 | | fork | 0 | 1005 | |
+----+------+----------+--------+-----------+------+-------+---------------------+
#
U +0.000328
10.1.20.103:5060 ->
10.1.3.18:5061INVITE
sip:1001@10.1.3.18:5061 SIP/2.0
Record-Route: <sip:10.1.20.103;lr=on;did=c34.3ed81d77>
Via: SIP/2.0/UDP 10.1.20.103;branch=z9hG4bKc40b.ec3572a3.0
Via: SIP/2.0/UDP 10.1.3.15:5061;branch=z9hG4bK-213aa77
From: "1002" <
sip:1002@10.1.20.103>;tag=280da520d15d62cfo1
To: "1000" <
sip:1000@10.1.20.103>
Call-ID:
8973c34-427096cb@10.1.3.15CSeq: 102 INVITE
Max-Forwards: 69
Contact: "1002" <
sip:1002@10.1.3.15:5061>
Expires: 240
User-Agent: Linksys/SPA941-5.1.5
Content-Length: 202
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
v=0
o=- 2003696 2003696 IN IP4 10.1.3.15
...
#
U +0.000052
10.1.20.103:5060 ->
10.1.20.103:5060
INVITE
sip:1005@10.1.20.103 SIP/2.0
Record-Route: <sip:10.1.20.103;lr=on;did=c34.3ed81d77>
Via: SIP/2.0/UDP 10.1.20.103;branch=z9hG4bKc40b.ec3572a3.1
Via: SIP/2.0/UDP 10.1.3.15:5061;branch=z9hG4bK-213aa77
From: "1002" <
sip:1002@10.1.20.103>;tag=280da520d15d62cfo1
To: "1000" <
sip:1000@10.1.20.103>
Call-ID:
8973c34-427096cb@10.1.3.15
CSeq: 102 INVITE
Max-Forwards: 69
Contact: "1002" <
sip:1002@10.1.3.15:5061>
Expires: 240
User-Agent: Linksys/SPA941-5.1.5
Content-Length: 202
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
v=0
o=- 2003696 2003696 IN IP4 10.1.3.15
...