ENV variables passing trough IAX2


I have a small problem and I’m wondering if there is a other way to solve it or if that feature will be included sometime.

Ok may setup:

E1 -> Asterisk -> IAX2 -> Astbill(Asterisk) -> Asterisk(Freepbx).

When someone calls a Nr. on the E1 Line the DNID is set, and Transfered over IAX2 to the Astbill(Asterisk) but now it get reset and on the last Asterisk(Freepbx) it’s empty.

What I now did is to Set(CALLERID(name)=${EXTEN}) and use that. My question now is are there any custom Variables who I could use to pass the NDID over more then one IAX Trunk?

Does anyone else have any other ways of passing through the number to another server via IAX2?

I’m stuck in the same position, my dial plan is as follows:



This works, and allows us to use the same dialplan in Asterisk Realtime across our Asterisk back-end cluster (we use openser for front-end).

The CDR is ugly though, as the CALLERID gets munged so that the name is 9xxxxxxxxxx etc…

I would prefer a cleaner way to pass a variable using IAX2, that does not modify any existing call settings. I would of thought a user variable would of been included in IAX2 that could be used for this purpose, or am I missing something?