Carlos Chavez wrote:> Avaya calls an Asterisk extension, I only get the name part of the CID,
> not the number. From Asterisk to the Avaya we can see both the name and
> the number displayed on the screen.
>
[bc-indianapolis]
exten => _41XX,1,Gosubif($["${CALLERID(number)}" = ""
]?get-cid,s,1:2)
exten => _41XX,n,Set(GROUP()=Ind_Max_Calls)
exten => _41XX,n,NoOP(Active Calls: ${GROUP_COUNT(Ind_Max_Calls)})
exten => _41XX,n,GotoIf($[ ${GROUP_COUNT(Ind_Max_Calls)} > 6 ]?9)
exten => _41XX,n,SetCallerPres(allowed)
exten => _41XX,n,Dial(IAX2/asterisk.bc:somepass at
192.168.103.15/${EXTEN},,t)
exten => _41XX,n,Congestion()
exten => _41XX,n,Hangup()
exten => _41XX,n,Playback(all-circuits-busy-now)
exten => _41XX,n,Congestion()
[get-cid]
; *******************************************
; Connect to our MySQL database to match
; against Dickman Caller-ID name. If a match
; set CallerID-Number
; *******************************************
exten => s,1,NoOP(${CALLERID(name)})
exten => s,n,NoOP(${CALLERID(number)})
exten => s,n,MYSQL(Connect connid 192.168.104.142 datauser 'somepass'
CID)
exten => s,n,MYSQL(Query resultid ${connid} SELECT exten FROM Dickman
WHERE name = \"${CALLERID(name)}\")
exten => s,n,MYSQL(Fetch fetchid ${resultid} caller.number)
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,NoOp(Setting CallerID Number to: ${caller.number})
exten => s,n,Set(CALLERID(number)=${caller.number})
exten => s,n,Return
--
Ben Franklin quote:
"Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety."