${EXTEN} variable limit

For security purposes, phone number is encrypted before send to asterisk servers. An encrypted key has about 250 characters. This is then encrypted in the dialplan via SHELL application. However ${EXTEN} only lists up to around 80 characters. So the decrypted process fails. Any way around this?

I am using Asterisk 16.5.0. Appreciate any help :slight_smile:

Use SIP encryption instead of encrypting just the number.

I can’t see how an encrypted number is of any use in a dialplan unless you pass it through in full, in which case you probably nee a proxy, not a back to back user agent. In any case the initialisation vector doesn’t need to be longer tha n the key and current keys are around 8 bytes (unless you are directly using public key encryption (and even then the IV doesn’t have to be that long). Encodiing within the valid alphabet isn’t going to more than double hte length.

There is a fixed maximum extension length defined[1].

[1] https://github.com/asterisk/asterisk/blob/master/include/asterisk/channel.h#L135

2 Likes

@jcolp Is there any way to change this? Even just for local use

The link is where it is defined, you could try altering it and recompiling Asterisk. It may work.

Confirming this works. I revised

then uninstall > installed asterisk again

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.