Call waiting script for asterisk

hi all,
i am new in asterisk i need help to configure my asterisk which can able to activate & deactivate call waiting with use of sip cahnnel . we only use normal phone not any ATA or else.
any body can tellmme how to configure in asterisk dial plan so i can use call waiting & call waiting with caller id in my sterisk pbx.
plz send me complete coniguration with all configuration files that need for this.
we are using asterisk 1.4 with SIP

thanks
Amit

hi Amit,

you can do it this way

*70 will activate call waiting for the extension

it is deactivated by default.

*71 will deactivate call waiting.

[app-callwaiting-cwoff]
include => app-callwaiting-cwoff-custom
exten => *71,1,Answer
exten => *71,n,Wait(1)
exten => *71,n,Macro(user-callerid,)
exten => *71,n,Set(old_val=${DB_DELETE(CW/${CALLERID(number)})})
exten => *71,n,Playback(call-waiting&de-activated)
exten => *71,n,Macro(hangupcall,)

; end of [app-callwaiting-cwoff]

[app-callwaiting-cwon]
include => app-callwaiting-cwon-custom
exten => *70,1,Answer
exten => *70,n,Wait(1)
exten => *70,n,Macro(user-callerid,)
exten => *70,n,Set(DB(CW/${CALLERID(number)})=ENABLED)
exten => *70,n,Playback(call-waiting&activated)
exten => *70,n,Macro(hangupcall,)

; end of [app-callwaiting-cwon]

include => app-callwaiting-cwoff
include => app-callwaiting-cwon

Hi
i already do this with all this logic but it not working
also where is the macro user-id that u not mention.
one more thing as per macro user id it will run that macro but how it come to set callwaiting at line next to macro user id
plz tell me that

regards
Amit