For a new project, I have written a dialplan and it is pretty straight
forward: The [dialout] context dials out a number, and h extension in this
context writes the CDR. But what is happening is that if the callee hangs up
first, all values in the CDR are fine, but if the caller hangs up first, the
'dst' column is always 'h'. I put a NoOp right in the begining of this macro
to verify it.

Any idea why is this happening and how can I have correct 'dst' value if the
caller hangs up first.

[dialout]
        exten => _NXXNXXXXXX,s,1,Dial(SIP/XXXXXX/${EXTEN},30)
        exten => h,1,Macro(hangupcall,${EXTEN},${CDR(accountcode)})

[macro-hangupcall]
        NoOp(${CDR(dst)})
        Set(dialout_num=${ARG1})
        Set(user_id=${ARG2})
        ResetCDR(vw);
        NoCDR();
        Hangup();


-- 
Zeeshan A Zakaria
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to