[asterisk-users] Can asterisk record the duration of users putting on hold?

Xue Liangliang xueliangliang at gmail.com
Thu Apr 26 07:01:51 MST 2007


Hi,

Recently we got a new  feature request from our customer, they want a
report to list the duration that agents putting customer on hold, they
want to base on this to measure the agents performance.  I cannot find
any events in cdr, message logs, or manager interface, only when I
enable sip debug, then I can see the ReInvite Event in the cli ,  some
thing like the attached logs, is there any available patch to note
down the "On Hold" and "Off Hold" event in log file or database?

CLI Screen Logs:

INVITE sip:2 at 192.168.0.20 SIP/2.0
Via: SIP/2.0/UDP
192.168.0.199:24608;branch=z9hG4bK-d87543-2e63d915643a940b-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:1015 at 192.168.0.199:24608>
To: "2"<sip:2 at 192.168.0.20>;tag=as2377f10b
From: "1015"<sip:1015 at 192.168.0.20>;tag=bf1d1102
Call-ID: MTBkODdlYjE4NWE1NTlkOTc3MzViZjY5MWU5MGZhNTA.
CSeq: 3 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
Content-Type: application/sdp
Proxy-Authorization: Digest
username="1015",realm="asterisk",nonce="6f0fbf9b",uri="sip:2 at 192.168.0.20",response="10e7de147cb8dc688049204479c26bd5",algorithm=MD5
User-Agent: X-Lite release 1006e stamp 34025
Content-Length: 183

v=0
o=- 2 3 IN IP4 192.168.0.199
s=CounterPath X-Lite 3.0
c=IN IP4 0.0.0.0
t=0 0
m=audio 64546 RTP/AVP 3 0 8 101
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendonly

<------------->
--- (13 headers 9 lines) ---
Sending to 192.168.0.199 : 24608 (NAT)
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Peer audio RTP is at port 0.0.0.0:64546
Found description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0xe
(gsm|ulaw|alaw)/video=0x0 (nothing), combined - 0xe (gsm|ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 0.0.0.0:64546
Audio is at 192.168.0.20 port 14254
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 192.168.0.199:24608 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.0.199:24608;branch=z9hG4bK-d87543-2e63d915643a940b-1--d87543-;received=192.168.0.199;rport=24608
From: "1015"<sip:1015 at 192.168.0.20>;tag=bf1d1102
To: "2"<sip:2 at 192.168.0.20>;tag=as2377f10b
Call-ID: MTBkODdlYjE4NWE1NTlkOTc3MzViZjY5MWU5MGZhNTA.
CSeq: 3 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:2 at 192.168.0.20>
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 2666 2667 IN IP4 192.168.0.20
s=session
c=IN IP4 192.168.0.20
t=0 0
m=audio 14254 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=recvonly

<------------>
caideqin*CLI>
<--- SIP read from 192.168.0.199:24608 --->
ACK sip:2 at 192.168.0.20 SIP/2.0
Via: SIP/2.0/UDP
192.168.0.199:24608;branch=z9hG4bK-d87543-da37e161d211bf1f-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:1015 at 192.168.0.199:24608>
To: "2"<sip:2 at 192.168.0.20>;tag=as2377f10b
From: "1015"<sip:1015 at 192.168.0.20>;tag=bf1d1102
Call-ID: MTBkODdlYjE4NWE1NTlkOTc3MzViZjY5MWU5MGZhNTA.
CSeq: 3 ACK
Proxy-Authorization: Digest
username="1015",realm="asterisk",nonce="6f0fbf9b",uri="sip:2 at 192.168.0.20",response="10e7de147cb8dc688049204479c26bd5",algorithm=MD5
User-Agent: X-Lite release 1006e stamp 34025
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
caideqin*CLI>
<--- SIP read from 192.168.0.199:24608 --->
INVITE sip:2 at 192.168.0.20 SIP/2.0
Via: SIP/2.0/UDP
192.168.0.199:24608;branch=z9hG4bK-d87543-27533b70d751cb62-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:1015 at 192.168.0.199:24608>
To: "2"<sip:2 at 192.168.0.20>;tag=as2377f10b
From: "1015"<sip:1015 at 192.168.0.20>;tag=bf1d1102
Call-ID: MTBkODdlYjE4NWE1NTlkOTc3MzViZjY5MWU5MGZhNTA.
CSeq: 4 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
Content-Type: application/sdp
Proxy-Authorization: Digest
username="1015",realm="asterisk",nonce="6f0fbf9b",uri="sip:2 at 192.168.0.20",response="10e7de147cb8dc688049204479c26bd5",algorithm=MD5
User-Agent: X-Lite release 1006e stamp 34025
Content-Length: 189

v=0
o=- 2 4 IN IP4 192.168.0.199
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.0.199
t=0 0
m=audio 64546 RTP/AVP 3 0 8 101
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv

<------------->
--- (13 headers 9 lines) ---
Sending to 192.168.0.199 : 24608 (NAT)
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Peer audio RTP is at port 192.168.0.199:64546
Found description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0xe
(gsm|ulaw|alaw)/video=0x0 (nothing), combined - 0xe (gsm|ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.0.199:64546
Audio is at 192.168.0.20 port 14254
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 192.168.0.199:24608 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.0.199:24608;branch=z9hG4bK-d87543-27533b70d751cb62-1--d87543-;received=192.168.0.199;rport=24608
From: "1015"<sip:1015 at 192.168.0.20>;tag=bf1d1102
To: "2"<sip:2 at 192.168.0.20>;tag=as2377f10b
Call-ID: MTBkODdlYjE4NWE1NTlkOTc3MzViZjY5MWU5MGZhNTA.
CSeq: 4 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:2 at 192.168.0.20>
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 2666 2668 IN IP4 192.168.0.20
s=session
c=IN IP4 192.168.0.20
t=0 0
m=audio 14254 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
caideqin*CLI>
<--- SIP read from 192.168.0.199:24608 --->
ACK sip:2 at 192.168.0.20 SIP/2.0
Via: SIP/2.0/UDP
192.168.0.199:24608;branch=z9hG4bK-d87543-e478af1bc206c805-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:1015 at 192.168.0.199:24608>
To: "2"<sip:2 at 192.168.0.20>;tag=as2377f10b
From: "1015"<sip:1015 at 192.168.0.20>;tag=bf1d1102
Call-ID: MTBkODdlYjE4NWE1NTlkOTc3MzViZjY5MWU5MGZhNTA.
CSeq: 4 ACK
Proxy-Authorization: Digest
username="1015",realm="asterisk",nonce="6f0fbf9b",uri="sip:2 at 192.168.0.20",response="10e7de147cb8dc688049204479c26bd5",algorithm=MD5
User-Agent: X-Lite release 1006e stamp 34025
Content-Length: 0


-- 
Regards!
Liangliang


More information about the asterisk-users mailing list