Hangup side A or B on CDR

hi community, i have a situation i need print on cdr who hangup the call, i mean i need to know if BYE came from leg A or leg B and print on CDR

Is out there some possibility to do that???

Hello!

A bit “dirty”, but works

https://blog.provoip.org/2016/11/quickndirty-answer-on-asterisk-who-hung.html

cleanup version that is slightly more pretty

exten => _X!,1,Set(CDR(userfield)=HANGUP_CALLER)
same => n,Dial(SIP/${EXTEN}@Trunk,,g)
same => n,Set(CDR(userfield)=${IF($["${DIALSTATUS}" = "ANSWER"]?HANGUP_CALLEE:HANGUP_ DIALSTATUS)}) ;if call fail set it to HANGUP_${DIALSTATUS} as cause
3 Likes

guys you are the best, thnak you so so much

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