How to get asterisk unique id into sipml5 client

Hi Team,

i am new to asterisk and sipml5,

i am stuck into getting the asterisk’s unique into sipml5 client.
i tried it by setting SIPAddHeader into context but unable to set the header.

please help to get the asterisk unique id into sipml5 client.

Thanks in advance

The Asterisk uniqueid is not locked to the SIP session. There can be more than one unique ID associated with that session.

Hi David thanks for the reply
my current system is working with 3cx, and here is unique id working fine as call id, but in sipml5 i want to get it on client side for calling few apis.

and is there is any way to get unique id to sipml5 client during call

How do I get asterisk call Id (uniqueid in cdr table) (for instance, 1487150355.465) in sipml5 client.

That field is not a call ID. What an end user considers a call may have more than one. At the very least there will be different ones for the A and B side, but more complex calls can create multiple ones.

Also note that it is not uncommon to have multiple CDRs with the same unique ID, in more complex calls.

You can probably get the A side unique ID (at the time you issue the Add Header, in the B side INVITE. I’m not sure that you can set headers on responses, and I don’t think there is any point between when the B side’s initial unique ID is allocated and the sending of the INVITE, in which you could set the B side unique ID on the B side INVITE.