-1

I need to extract the Call-id info from the calls started by a Call-file (in Asterisk), and use this value as a parameter of another function in order to return the full-cdr from the SIP-Proxy. Either i need to extract the call-id from call file based calls, or i gotta insert a call-id value through the file and use it. However, could not figure out how to do that. Looking forward to your replies, thanks in advance.

p.s. I'm not asking for Caller-id which refers to, as far as i understand, the from-number.

Cœur
  • 37,241
  • 25
  • 195
  • 267
user2052015
  • 273
  • 4
  • 7
  • 15

1 Answers1

1

Call-id will be created by chan_sip AFTER you do call via call file.

So no, there are no way put it in file.

Maybe possible read by SIPHeader function AFTER call placed, but more likly you should do patch.

You can add special header like X-something if other part support search by it.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • Thank you for the quick reply. Adding an additional header did not work for the solution, coz the new header is not placed into the SIP-Proxy CDR. I have encountered this [${SIPCALLID}: The SIP dialog Call-ID: header] but could not figure out how to utilize it yet. In the worst case i will trace the sip messages and get the Call-ID header from there. – user2052015 Jul 13 '17 at 08:35
  • Sorry, that id created by channel. You can switch to pjsip, setup homer or other capture+ add header. Search in homer by header, get call-id.. – arheops Jul 13 '17 at 15:01