Philippe,
I found the problem, but dont know the root cause. All of my inbound routes were configured in freepbx, and they are dumped in extensions_additional.conf. I have a custom dialplan destination, and the result is as follows:
exten => _166[3-9],1,Set(__FROM_DID=${EXTEN})
exten => _166[3-9],n,Gosub(app-blacklist-check,s,1)
exten => _166[3-9],n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => _166[3-9],n,Set(CALLERID(name)=${CALLERID(num)})
exten => _166[3-9],n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => _166[0-9],n,Goto(dialout,s,1)
In extensions_custom.conf, I had
[dialout]
exten => s,1,Dial(IAX2/6010/814009${DNID})
This was working fine until asterisk and freepbx were upgraded. DNID turned out NULL. I started hacking extensions_additional.conf to see where ${EXTEN} was returning the DID and when it became null. Somehow, the call of the custom dialplan lost all variables. My solution was to remove my inbound routes from freepbx (to avoid my fixes from being overriden), and I added the Dial call directly in the dialplan, instead of calling it. It’s now working. If you see below, all I did was to call the Dial command directly instead of Goto the custom dialplan where the Dial is called. Only the last line was changed.
exten => _166[3-9],1,Set(__FROM_DID=${EXTEN})
exten => _166[3-9],n,Gosub(app-blacklist-check,s,1)
exten => _166[3-9],n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => _166[3-9],n,Set(CALLERID(name)=${CALLERID(num)})
exten => _166[3-9],n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => _166[0-9],n,Dial(IAX2/6010/814009${EXTEN})
Thanks
Clovis