# Length of the Call Reference value

How can I get the Length of the Call Reference value??

I have found this at the libpri-1.2.3 sources:

q931.c ine 2260

```pri_message(pri, "%c Protocol Discriminator: %s (%d) len=%d\n", c, disc2str(h->pd), h->pd, len); pri_message(pri, "%c Call Ref: len=%2d (reference %d/0x%X) (%s)\n", c, h->crlen, q931_cr(h) & 0x7FFF, ..............```

line 2040

```static inline int q931_cr(q931_h *h) { int cr = 0; int x; if (h->crlen > 3) { pri_error(NULL, "Call Reference Length Too long: %d\n", h->crlen); return -1; } switch (h->crlen) { case 2: for (x=0;x<h->crlen;x++) { cr <<= 8; cr |= h->crv[x]; } break; case 1: cr = h->crv[0]; if (cr & 0x80) { cr &= ~0x80; cr |= 0x8000; } break; default: pri_error(NULL, "Call Reference Length not supported: %d\n", h->crlen); } return cr; }```

My problem is, how can I get h->crlen in a variable so I can use it in the extensions.conf