Modify SIP Caller ID Uri from Extensions.conf

Hello,

I use the Dial function fron Extensions.conf (Dial(SIP/emailaddres@sip_domain.com)).

I can easily modify the Caller ID (ie. the SIP FROM header : name ) playing with SET() and Callerid(name/num…). My problem is that I would like to change the domain name dynamically in the parameter of the FROM header from the extensions.conf.

What I can do is set fromdomain in the sip.conf file, but then I can not modify it on the go in the extensions.conf (it is set once for all).

I have tried then to use SET() and callerid(num) - like Set(CALLERID(num)=${var}@my_dynamic_domain.com), but the domain name (or IP of the server if domain name is not set in sip.conf) is automatically added at the end of what I have set :
${var}@my_dynamic_domain.com@123.123.123.123

Is there a way to set dynamically this domain name of the SIP callerid(num) ?

Thanks and regards,
Mosi