Transfer incomming call to cellular with caller id

Hi all,

I’m newbie and try to make my small pbx for home use.
I have Gentoo server with asterisk installed (Asterisk 1.2.27) and functional with my VOIP provider. I have two phones with internals 100 and 101. My server have two ethernet interfaces (eth0 directly to internet with public ip, and eth1 local net ip 192.168.1.254). For asterisk I use only local interface behind nat because net interface I use for other purphoses.

I need make simple funcionality:

  • if incomming call: ring first extension for 20 sec
  • after ring second extension for 20 sec
  • then call is redirect to my cell phone
    In this moment all works well, but on transfer I see Caller ID my house number, but I need to see original caller id (with some other initial number if is possible to identify than call is transfered and not original)

I use only registered VOIP number not any zap channels (have no pstn).
Bellow is my configuration:
SIP.CONF

[code][general]
context = sip-in
register = 0541179XXXX:mypass:0541179XXXX@voip.eutelia.it/0541179XXXX
port = 5060
nat=yes
type=peer
qualify=yes
insecure=very
auth=plaintext
bindaddr = 192.168.1.254
externip = 83.211.xxx.xxx
localnet = 192.168.1.254/255.255.255.0

[0541179XXXX]
type=friend
nat=yes
username=0541179XXXX
fromuser=0541179XXXX
fromdomain=voip.eutelia.it
secret=mypass
host=voip.eutelia.it
qualify=yes

[100]
context=default
type = friend
username = 100
secret = 100
host = dynamic
canreinvite=no
dtfmode=rfc2833
subscribecontext=default
mailbox=100
disallow = all
allow = ulaw

[101]
context=default
type = friend
username = 101
secret = 101
host = dynamic
canreinvite=no
dtfmode=rfc2833
subscribecontext=default
mailbox=101
disallow = all
allow = ulaw [/code]

EXTENSIONS.CONF

[code][general]
static = yes
writeprotect = no
autofallthrough = no

[global]
CONSOLE = Console/dsp
INTCASA = 100 ; PAP2
INTGARAGE = 101 ; C450IP
MYCELL = 338890XXXX

[default]
exten => 777,1,VoiceMailMain(${EXTEN@default})
exten => 400,1,Dial(${CONSOLE})
exten => 101,1,Macro(intcall,101)
exten => 100,1,Macro(intcall,100)

exten => _XXXX.,1,Dial(SIP/${EXTEN}@0541179XXXX)

[sip-in]
exten => 0541179XXXX,1,Macro(intcall,100)

[local]
include => default

[macro-intcall]
exten => s,1,Dial(SIP/${ARG1},15) ; dial for 15 sec
exten => s,2,Dial(SIP/101,15) ; then dial second phone
; this is my cell direct call (how I can put here original caller id ???)
exten => s,3,Dial(SIP/338890XXXX@0541179XXXX,30,r)
;exten => s,4,VoiceMail(u${ARG1})
exten => s,99,Hangup()[/code]

Thank for any replay. Alberto.