Empty CallerId on cdr_manager event

How can I get caller name in cdr manager event ?

<Message AMAFlags='DOCUMENTATION' AccountCode='' AnswerTime='' BillableSeconds='0' CallerID='"" <1000>' Channel='PJSIP/1000-000001b4'

edit: the name is missing only on outbound calls

thanks

I managed to get the caller name on outbound call in the context of a cdr event message by storing it in UserField

exten => recordcheck,n,Set(CDR(UserField)=${CALLERID(name)})

It works great for outgoing calls and internal calls.

Does anyone know how can I get the name from the extension for inbound calls ?

What do you want to achieve? Emails can be sent by the CID Superfecta module. Although it does not work with internal calls.

a python script receives Cdr events via AMI. The Cdr event should contain the name stored in the extension configuration

I managed to get the name for the outbound call now I need to get it for the Inbound call

the goal is to have Userfield=<CallerName>:<CalleeName>

found it :smiley:

exten => recordcheck,n,ExecIf($["${LEN(${DB(AMPUSER/${ARG3}/cidname)})}" = "0"]?Set(calleename=${ARG3}):Set(calleename=${DB(AMPUSER/${ARG3}/cidname)}))
exten => recordcheck,n,ExecIf($["${LEN(${DB(AMPUSER/${CALLERID(num)}/cidname)})}" = "0"]?Set(callername=${CALLERID(num)}):Set(callername=${DB(AMPUSER/${CALLERID(num)}/cidname)}))
exten => recordcheck,n,Set(CDR(UserField)=${callername}:${calleename}:${MIXMONITOR_FILENAME})

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.