Hi folks,
I have a strange issue. Let me explain and may be someone can suggest:
I have 2 sip phones. When sip1 dials to sip 2, i try to save a value in my cdr something like this:-
Set(CDR(callplan)=abc)
Dial(SIP/myext2,10,U(MyExtM^1))
so when the call is answered by myext2, the macro runs and in the Macro i do the following:-
[MyExtM]
exten => s,1,Set(CDR(callplan)=newansuser)
exten => s,n,Return()
when i check the cdr table, i see only abc in callplan field. i wanted to append whatever is already in the callplan.
I actually need callid of A side and on B side.
I can see ${SIP_HEADER(Call-ID)} on side A and Side B but the problem is i am not able to save them in the CDR(callplan). Only the A side is saved.
but A side is already saved no problem there. THe problem is with the B side. I can see B side Call-ID but the problem is, its not saved in the CDR(dialplan). I am not sure about the behaviour, is there anyway we can appendlike callidaxxx;callidbxxx ?
by the way the callid of B side shows correctly when i see on the screen.
You are saving it in the B side CDR, when you want it saved in the A side CDR. As already explained, you will probably need to use as shared or global variable, on the A side, which a hangup handler adds to the CDR.
Hi David,
Sorry let me try to understand, as you know currently i have only 1 cdr generated when i make a call from sipa to sipb. both are registered on the same asterisk box.
sipa calls to sipb, the call-id on sipa leg is xxxxa, and the sipb leg callid is xxxxxb. when i print logs i can see both callid’s without any issue. they both are different i can see on the asterisk console. The problem is only when i try to save them. If i run a hangup handler and try to save in the cdr how that will resolve my issue?
i tried the hangup handler on both channels but it does not seem to be working. can you please check for me ? thank you for your help David. here are the logs.
so when the call comes in i see the following
Set(“SIP/test1-00001c27”, “CHANNEL(hangup_handler_push)=hdlrSaveCh,s,1(1e4b8c607247aa0e)”)