[asterisk-users] Two Leg CDR

Atis Lezdins atis at iq-labs.net
Thu Feb 7 09:35:05 CST 2008


On 2/7/08, Abdul <abdul_zu at yahoo.com> wrote:
>  Hi,
>
> I tired to use the following configuration but still in cdr table i can see
> only one record.
>
> sip.conf
>
> [444]
> type=friend
> username=444
> secret=444
> host=dynamic
> nat=yes
> context=vpstoteles
> disallow=all
> allow=all
>
> Extentions.conf
> [vpstoteles]
> exten => _X.,1,Set(CALLERID(accountcode)=212.XXX.XXX.240)
> exten => _X.,n,Dial(SIP/${EXTEN}@212.XXX.XXX.240)
> exten => s,2,Hangup
>
> In CDR table accountcode for this call is empty and also we can see only one
> record.

it should be:

Set(CDR(accountcode)=212.xxx.xxx.240)

>
> Plase advice us how i can get two record in CDR table one for Registrar
> (444) and second for carrier (212.XXX.XXX.240)?

There are several results you might want:

1) Two CDRs split the total duration. Add ResetCDR(w) directly before dial.
2) First CDR for whole call (including Dial to operator and anything
before) and second for just Dial to operator - use ForkCDR() before
Dial.

Regards,
Atis

-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835



More information about the asterisk-users mailing list