Asterisk 1.8 - call file with caller id and custom CDR data

acbhaskar1
Joined: Fri 08 of Apr, 2011

Re: Asterisk 1.8 - call file with caller id and custom CDR data

Posted:Fri 08 of Apr, 2011 (11:55 UTC)
u can set callerid in sip.conf it will work for both incoming and outgoing.



thank u
Bhaskar
gamercameo
Joined: Sat 26 of Feb, 2011

Re: Asterisk 1.8 - call file with caller id and custom CDR data

Posted:Sat 26 of Feb, 2011 (04:16 UTC)
Is it work fine?
peiper12
Joined: Tue 08 of Feb, 2011

Re: Asterisk 1.8 - call file with caller id and custom CDR data

Posted:Tue 08 of Feb, 2011 (17:20 UTC)
asterix?
viper
Joined: Mon 07 of Feb, 2011

Asterisk 1.8 - call file with caller id and custom CDR data

Posted:Mon 07 of Feb, 2011 (15:11 UTC)
Hi,

First of all, I'm using Asterisk 1.8 with FreePBX 2.8

I'm trying to establish the following:
- want to use call files to connect two (outside) extensions
- want to use the outbound routes set in FreePBX
- want to set the outgoing callerid for both calls
- want to set a custom CDR field in MySQL ( field name 'azonosito' )

What I've tried is to create two custom context and place the call through them.

The call file:
; First CID
SetVar: callid1=0036111188887777
SetVar: azon1=elso hivas azonosito { Viperke }
; Frist phone num
Channel: Local/0036701234567@CustomCallOut-1
WaitTime: 45
MaxRetries: 0
RetryTime: 0
; 2nd CID
SetVar: callid2=0036204313763
SetVar: azon2=masodik hivas azonosito { V1pr: ehehhe }
Context: CustomCallOut-2
; 2nd phone num
Extension: 003617654321


The contexts:
[CustomCallOut-1]
; set custom CDR
exten => _0X.,1,Set(CDR(azonosito)=${azon1})
exten => _0X.,n,Set(CALLERPRES()=allowed)
exten => _0X.,n,Set(CALLERID(number)=<${callid1}>)
exten => _0X.,n,Set(KEEPCID=TRUE)
; pass the call to internal routing
include => from-internal

[CustomCallOut-2]
exten => _0X.,1,Wait(1)
; set custom CDR
exten => _0X.,2,Set(CDR(azonosito)=${azon2})
exten => _0X.,3,Playtones(ring)
exten => _0X.,n,Set(CALLERPRES()=allowed)
exten => _0X.,n,Set(CALLERID(number)=<${callid2}>)
exten => _0X.,n,Set(KEEPCID=TRUE)
; pass the call to internal routing
include => from-internal


However the two calls are placed, the CDRs and the callerids are set correctly, we can't hear each other. As I saw in the logs, the problem is that the calls are placed in the same context, and not being connected ( like one call, but with the variable EXTEN changed ).

I'm really confused about doing this, so can you please advise?