Elastix writes CDR before the call hangsup

senthilarasu

Joined
Jun 29, 2009
Messages
19
Likes
0
Points
0
#1
Hi,

Scenario:
I manually trigger call by placing .call file in var/spool/astersik/outgoing directory.
Sample .call file:

Channel:Local/0044XXXXXXXXX@from-internal
CallerID: "MyCLID"
MaxRetries: 0
RetryTime:60
WaitTime:60
Account:1234567
Context:sample
Extension:s
Priority: 1

Below show the sample context in extension_custom.conf
[sample]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Playback(custom/welcome) ; welcome.gsm is 60 seconds audio
exten => s,4,ResetCDR()
exten => s,5,hangup


(file attached, important debug lines are shown below)

[Sep 6 10:20:35] VERBOSE[9044] logger.c: -- Called MYSIPPROVIDER/0000044XXXXXXXXX
[Sep 6 10:20:35] VERBOSE[9044] logger.c: -- SIP/MYSIPPROVIDER-0999c7c8 is making progress passing it to Local/0044XXXXXXXXX@from-internal-ce92,2
[Sep 6 10:20:58] VERBOSE[9044] logger.c: -- SIP/MYSIPPROVIDER-0999c7c8 answered Local/0044XXXXXXXXX@from-internal-ce92,2
[Sep 6 10:20:58] VERBOSE[9043] logger.c: > Channel Local/0044XXXXXXXXX@from-internal-ce92,1 was answered.
[Sep 6 10:20:58] VERBOSE[9043] logger.c: -- Executing [1124@from-internal-custom:1] Goto("Local/0044XXXXXXXXX@from-internal-ce92,1", "sentel|s|1") in new stack
[Sep 6 10:20:58] VERBOSE[9043] logger.c: -- Goto (sentel,s,1)
[Sep 6 10:20:58] VERBOSE[9043] logger.c: -- Executing [s@sample:1] Answer("Local/0044XXXXXXXXX@from-internal-ce92,1", "") in new stack
[Sep 6 10:20:58] VERBOSE[9043] logger.c: -- Executing [s@sample:2] Wait("Local/0044XXXXXXXXX@from-internal-ce92,1", "1") in new stack
[Sep 6 10:20:59] VERBOSE[9043] logger.c: -- Executing [s@sample:3] Playback("Local/0044XXXXXXXXX@from-internal-ce92,1", "custom/welcome") in new stack
[Sep 6 10:20:59] VERBOSE[9043] logger.c: -- Playing 'custom/welcome' (language 'en')
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [h@macro-dialout-trunk:1] Macro("Local/0044XXXXXXXXX@from-internal-ce92,2", "hangupcall|") in new stack
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [s@macro-hangupcall:1] ResetCDR("Local/0044XXXXXXXXX@from-internal-ce92,2", "vw") in new stack
[Sep 6 10:20:59] DEBUG[9044] app_macro.c: Executed application: ResetCDR
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [s@macro-hangupcall:2] NoCDR("Local/0044XXXXXXXXX@from-internal-ce92,2", "") in new stack
[Sep 6 10:20:59] DEBUG[9044] app_macro.c: Executed application: NoCDR

[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [s@macro-hangupcall:3] GotoIf("Local/0044XXXXXXXXX@from-internal-ce92,2", "1?skiprg") in new stack
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Goto (macro-hangupcall,s,6)
[Sep 6 10:20:59] DEBUG[9044] app_macro.c: Executed application: GotoIf
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [s@macro-hangupcall:6] GotoIf("Local/0044XXXXXXXXX@from-internal-ce92,2", "1?skipblkvm") in new stack
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Goto (macro-hangupcall,s,9)
[Sep 6 10:20:59] DEBUG[9044] app_macro.c: Executed application: GotoIf
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [s@macro-hangupcall:9] GotoIf("Local/0044XXXXXXXXX@from-internal-ce92,2", "1?theend") in new stack
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Goto (macro-hangupcall,s,11)
[Sep 6 10:20:59] DEBUG[9044] app_macro.c: Executed application: GotoIf
[Sep 6 10:20:59] VERBOSE[9044] logger.c: -- Executing [s@macro-hangupcall:11] Hangup("Local/0044XXXXXXXXX@from-internal-ce92,2", "") in new stack
[Sep 6 10:20:59] VERBOSE[9044] logger.c: == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'Local/0044XXXXXXXXX@from-internal-ce92,2' in macro 'hangupcall'
[Sep 6 10:20:59] VERBOSE[9044] logger.c: == Spawn h extension (macro-dialout-trunk, h, 1) exited non-zero on 'Local/0044XXXXXXXXX@from-internal-ce92,2'
[Sep 6 10:20:59] VERBOSE[9044] logger.c: == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'Local/0044XXXXXXXXX@from-internal-ce92,2' in macro 'dialout-trunk'
[Sep 6 10:20:59] VERBOSE[9044] logger.c: == Spawn extension (from-internal, 0044XXXXXXXXX, 4) exited non-zero on 'Local/0044XXXXXXXXX@from-internal-ce92,2'
[Sep 6 10:21:30] VERBOSE[9043] logger.c: -- Executing [s@sample:4] Hangup("SIP/MYSIPPROVIDER-0999c7c8", "") in new stack
[Sep 6 10:21:30] VERBOSE[9043] logger.c: == Spawn extension (sample, s, 4) exited non-zero on 'SIP/MYSIPPROVIDER-0999c7c8'
[Sep 6 10:21:30] NOTICE[9043] pbx_spool.c: Call completed to Local/0044XXXXXXXXX@from-internal



As shown in the above debug, asterisk write CDR once the call connects and doesn't write or Reset the CDR once the call hangsup.

CDR shows the billsec as 1 second.

Can someone please help me to resolve this issue or please point me to right direction

YOUR HELP WILL BE MUCH APPRECIATED
Thanks
Senthil http://forum.elastix.org/old_files/Ealstixwritescdrbeforecallhangup.txt
 

haamed

Joined
Jul 23, 2007
Messages
251
Likes
0
Points
0
#2
Hi, in this example asterisk just write once !
but if you could please test it with a longer sound to play,
and check it on MySQL,
 

senthilarasu

Joined
Jun 29, 2009
Messages
19
Likes
0
Points
0
#3
I tried playing longer audio files, still same result both in CSV & in MYSql.

The bill sec is always 1 second.

Note: This happens ONLY if I trigger the call by placing .call file in /var/spool/asterisk/outgoing directory.

When I make a normal call from any of the extension, I get the correct billsecond.

ANY POINTER HERE WILL BE GREATLY APPRECIATED< AS I COULDN'T GET ANY CLUE TO FIX THIS>

THANKS IN ADVANCE
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top