[gnud_inbound] exten => 4083760000,1,Wait(2) ; this is so callerid is passed exten => 4083760000,n,NoOp(${CALLERIDNUM}) ; we should have callerid by now, if not, we never will ; you need to write and agi to take that callerid number ; and attempt to find the leadid (or campaign and leadid) ; and use that to fill the below vars, if a record does not ; exist, create one, then fill in the leadid with the ; newly created record number. (this is so the agent will ; get a page that they can fill in and all the ; rest of the gnudialer/astcrm code can update something !!! exten => 4083760000,n,Answer() ; answer so asterisk knows to wake up exten => 4083760000,n,Set(__ISTRANSFER=) ; remember the __ so it is inherited on on variable names exten => 4083760000,n,Set(__LEADID=0) ; same here exten => 4083760000,n,Set(__CAMPAIGN=inbound) ; and here exten => 4083760000,n,Set(__PHONENUM=${CALLERIDNUM}) ; we fill phonenum var so we can track it throughout call exten => 4083760000,n,NoOp($PHONENUM) exten => 4083760000,n,Set(CALLERID(name)=~${CAMPAIGN}-${LEADID}-true~) ; this is a function, so not __ here ; the 'true' part is if you are using a ; closer or not, so it's true or false exten => 4083760000,n,Goto(gdincoming,talk,1) ; send the call into the dialplan area for the agents ; remember, that everything gnudialer/crm updates is based ; on parsing the calleridname