Hello,
Sorry, I don't speak german even if I understand it a little. I'm going crazy about the following diaplan entry:
exten => s,n,Set(tmp_callerid=${CALLERID(number)})
exten => s,n,Set(CALLERID(number)=${IF($[ ${tmp_callerid} = +1234567890]?${IF($[ ${LEN(${OUTNUM})} = 3 ]?123:01234567)}:${tmp_callerid})
what I'd like to do (the call is originated by a mobile phone over a sip trunk and it sends the callerid(number) set to its sim number)
:
* check if the callerid(number) is my number (ie:+391234567890)
* if the OUTNUM is an internal one (length=3) -> change the callerid(number) to my internal phone number (ie:123)
* otherwise the dialed number is an external one so I set the callerid(number) to my isdn public number
What I get:
* CALLERID(name) is set to nothing no matter what number I dial
but I can't see what's wrong.
Can someone help me please ?
TIA
giuliano
Sorry, I don't speak german even if I understand it a little. I'm going crazy about the following diaplan entry:
exten => s,n,Set(tmp_callerid=${CALLERID(number)})
exten => s,n,Set(CALLERID(number)=${IF($[ ${tmp_callerid} = +1234567890]?${IF($[ ${LEN(${OUTNUM})} = 3 ]?123:01234567)}:${tmp_callerid})
what I'd like to do (the call is originated by a mobile phone over a sip trunk and it sends the callerid(number) set to its sim number)
:
* check if the callerid(number) is my number (ie:+391234567890)
* if the OUTNUM is an internal one (length=3) -> change the callerid(number) to my internal phone number (ie:123)
* otherwise the dialed number is an external one so I set the callerid(number) to my isdn public number
What I get:
* CALLERID(name) is set to nothing no matter what number I dial
but I can't see what's wrong.
Can someone help me please ?
TIA
giuliano