[asterisk-dev] cdr of sip channel
Di-Shi Sun
di-shi at transnexus.com
Wed Apr 4 23:39:43 MST 2007
Hi Clod,
The test bed and configuration is very simple. The call was completed but the CDR function did not work. I do not know what I missed.
test bed:
source (sipp at 127.0.0.1:5062) -> asterisk (127.0.0.1:5061) -> destination (sipp at 127.0.0.1:5060)
sip.conf
[general]
context=GeneralProxy
allowguest=yes
bindport=5061
extensions.conf
[GeneralProxy]
exten => _XXXX.,1,NoOp(GeneralProxy)
exten => _XXXX.,n,Dial(SIP/1234567890 at 127.0.0.1,14,oL(14400000]))
exten => _XXXX.,n,Hangup
exten => h,1,NoOp()
exten => h,n,Set(foo=${CDR(src)})
The CLI log
<--- SIP read from 127.0.0.1:5062 --->
INVITE sip:1234567890 at 127.0.0.1:5061 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-0
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>
Call-ID: 1-27105 at 127.0.0.1
CSeq: 1 INVITE
Contact: sip:sipp at 127.0.0.1:5062
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 129
v=0
o=user1 53655765 2353687637 IN IP4 127.0.0.1
s=-
c=IN IP4 127.0.0.1
t=0 0
m=audio 6001 RTP/AVP 0
a=rtpmap:0 PCMU/8000
<------------->
--- (11 headers 7 lines) ---
Sending to 127.0.0.1 : 5062 (NAT)
Using INVITE request as basis request - 1-27105 at 127.0.0.1
Found no matching peer or user for '127.0.0.1:5062'
Found RTP audio format 0
Peer audio RTP is at port 127.0.0.1:6001
Found description format PCMU for ID 0
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 127.0.0.1:6001
Looking for 1234567890 in GeneralProxy (domain 127.0.0.1)
list_route: hop: <sip:sipp at 127.0.0.1:5062>
<--- Transmitting (NAT) to 127.0.0.1:5062 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-0;received=127.0.0.1
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>
Call-ID: 1-27105 at 127.0.0.1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:1234567890 at 127.0.0.1:5061>
Content-Length: 0
<------------>
-- Executing [1234567890 at GeneralProxy:1] NoOp("SIP/5062-083d8d78", "GeneralProxy") in new stack
-- Executing [1234567890 at GeneralProxy:2] Dial("SIP/5062-083d8d78", "SIP/1234567890 at 127.0.0.1|14|oL(14400000])") in new stack
-- Setting call duration limit to 14400 seconds.
Audio is at 127.0.0.1 port 14012
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 127.0.0.1:5060:
INVITE sip:1234567890 at 127.0.0.1 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK7c6c880d;rport
From: "sipp" <sip:sipp at 127.0.0.1:5061>;tag=as31d2fe73
To: <sip:1234567890 at 127.0.0.1>
Contact: <sip:sipp at 127.0.0.1:5061>
Call-ID: 43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 05 Apr 2007 06:17:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 281
v=0
o=root 27084 27084 IN IP4 127.0.0.1
s=session
c=IN IP4 127.0.0.1
t=0 0
m=audio 14012 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/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
---
-- Called 1234567890 at 127.0.0.1
<--- SIP read from 127.0.0.1:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK7c6c880d;rport
From: "sipp" <sip:sipp at 127.0.0.1:5061>;tag=as31d2fe73
To: <sip:1234567890 at 127.0.0.1>;tag=11675SIPpTag018
Call-ID: 43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1
CSeq: 102 INVITE
Contact: <sip:127.0.0.1:5060;transport=UDP>
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
-- SIP/127.0.0.1-083ddd70 is ringing
<--- SIP read from 127.0.0.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK7c6c880d;rport
From: "sipp" <sip:sipp at 127.0.0.1:5061>;tag=as31d2fe73
To: <sip:1234567890 at 127.0.0.1>;tag=11675SIPpTag018
Call-ID: 43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1
CSeq: 102 INVITE
Contact: <sip:127.0.0.1:5060;transport=UDP>
Content-Type: application/sdp
Content-Length: 129
v=0
o=user1 53655765 2353687637 IN IP4 127.0.0.1
s=-
c=IN IP4 127.0.0.1
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
<------------->
--- (9 headers 7 lines) ---
Found RTP audio format 0
Peer audio RTP is at port 127.0.0.1:6000
Found description format PCMU for ID 0
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 127.0.0.1:6000
list_route: hop: <sip:127.0.0.1:5060;transport=UDP>
set_destination: Parsing <sip:127.0.0.1:5060;transport=UDP> for address/port to send to
set_destination: set destination to 127.0.0.1, port 5060
Transmitting (NAT) to 127.0.0.1:5060:
ACK sip:127.0.0.1:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK33206146;rport
From: "sipp" <sip:sipp at 127.0.0.1:5061>;tag=as31d2fe73
To: <sip:1234567890 at 127.0.0.1>;tag=11675SIPpTag018
Contact: <sip:sipp at 127.0.0.1:5061>
Call-ID: 43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0
---
<--- Transmitting (NAT) to 127.0.0.1:5062 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-0;received=127.0.0.1
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>;tag=as58fef656
Call-ID: 1-27105 at 127.0.0.1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:1234567890 at 127.0.0.1:5061>
Content-Length: 0
<------------>
-- Call on SIP/127.0.0.1-083ddd70 left from hold
-- SIP/127.0.0.1-083ddd70 answered SIP/5062-083d8d78
Audio is at 127.0.0.1 port 11154
Adding codec 0x4 (ulaw) to SDP
<--- Reliably Transmitting (NAT) to 127.0.0.1:5062 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-0;received=127.0.0.1
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>;tag=as58fef656
Call-ID: 1-27105 at 127.0.0.1
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:1234567890 at 127.0.0.1:5061>
Content-Type: application/sdp
Content-Length: 178
v=0
o=root 27084 27084 IN IP4 127.0.0.1
s=session
c=IN IP4 127.0.0.1
t=0 0
m=audio 11154 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------>
[Apr 5 14:17:52] WARNING[27109]: cdr.c:482 ast_cdr_merge: CDR start disagreement for SIP/5062-083d8d78
-- Packet2Packet bridging SIP/5062-083d8d78 and SIP/127.0.0.1-083ddd70
<--- SIP read from 127.0.0.1:5062 --->
ACK sip:1234567890 at 127.0.0.1:5061 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-4
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>;tag=as58fef656
Call-ID: 1-27105 at 127.0.0.1
CSeq: 1 ACK
Contact: sip:sipp at 127.0.0.1:5062
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
<--- SIP read from 127.0.0.1:5062 --->
BYE sip:1234567890 at 127.0.0.1:5061 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-6
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>;tag=as58fef656
Call-ID: 1-27105 at 127.0.0.1
CSeq: 2 BYE
Contact: sip:sipp at 127.0.0.1:5062
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
Sending to 127.0.0.1 : 5062 (NAT)
<--- Transmitting (NAT) to 127.0.0.1:5062 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK-27105-1-6;received=127.0.0.1
From: sipp <sip:sipp at 127.0.0.1:5062>;tag=27105SIPpTag001
To: sut <sip:1234567890 at 127.0.0.1:5061>;tag=as58fef656
Call-ID: 1-27105 at 127.0.0.1
CSeq: 2 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:1234567890 at 127.0.0.1:5061>
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1' in 32000 ms (Method: INVITE)
set_destination: Parsing <sip:127.0.0.1:5060;transport=UDP> for address/port to send to
set_destination: set destination to 127.0.0.1, port 5060
Reliably Transmitting (NAT) to 127.0.0.1:5060:
BYE sip:127.0.0.1:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK4e1dac73;rport
From: "sipp" <sip:sipp at 127.0.0.1:5061>;tag=as31d2fe73
To: <sip:1234567890 at 127.0.0.1>;tag=11675SIPpTag018
Call-ID: 43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0
---
== Spawn extension (GeneralProxy, 1234567890, 2) exited non-zero on 'SIP/5062-083d8d78'
-- Executing [h at GeneralProxy:1] NoOp("SIP/5062-083d8d78", "") in new stack
-- Executing [h at GeneralProxy:2] Set("SIP/5062-083d8d78", "foo=") in new stack
<--- SIP read from 127.0.0.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK4e1dac73;rport
From: "sipp" <sip:sipp at 127.0.0.1:5061>;tag=as31d2fe73
To: <sip:1234567890 at 127.0.0.1>;tag=11675SIPpTag018
Call-ID: 43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1
CSeq: 103 BYE
Contact: <sip:127.0.0.1:5060;transport=UDP>
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '43e1d73239f5d00f2abf2d111f732cb0 at 127.0.0.1' Method: INVITE
Really destroying SIP dialog '1-27105 at 127.0.0.1' Method: BYE
Thanks,
Di-Shi Sun.
----- Original Message -----
From: Clod Patry
To: Di-Shi Sun
Sent: Thursday, April 05, 2007 11:11 AM
Subject: Re: [asterisk-dev] cdr of sip channel
no, since i dont know what ur setup/dialplan looks like.
On 4/4/07, Di-Shi Sun <di-shi at transnexus.com> wrote:
Hi Clod,
Thank you for your reply. I had tried the CDR fucntion in my dialplan. But it retuened nothing.
Any idea?
Thanks,
Di-Shi Sun.
--
Clod Patry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070404/4eef2859/attachment-0001.htm
More information about the asterisk-dev
mailing list