Caller ID problem


I’m a new trixbox users and i wan’t a little modify for the default dial-plan.

I have two sip users (say 30 and 45) that are two ip phones.

I need to configure extension to check if one of devices are busy, and only if they are not busy the call if forwarded to either.

I modify the file in /etc/extensions_custom and I add this:

exten => 30,1,ChanIsAvail(SIP/30|sj)
exten => 30,2,ChanIsAvail(SIP/45|sj)
exten => 30,3,Dial(SIP/45&SIP/30|20|WwtTt)
exten => 30,102,hangup()
exten => 30,103,hangup()

in this way all work fine, but there is a problem: the caller id is not set and into device the call is from “device” and not from the real caller id.

So, I modify the rows abow in

exten => 30,1,Macro(exten-vm,novm,30)
exten => 30,2,ChanIsAvail(SIP/30|sj)
exten => 30,3,ChanIsAvail(SIP/45|sj)
exten => 30,4,Dial(SIP/45&SIP/30|20|WwtTt)
exten => 30,103,hangup()
exten => 30,104,hangup()

In this way the callerd id work fine, but only the device 30 ringing.

How I can resolve this problem?