Hi All,
Just thought I'd post that I have successfully setup my asterisk box to forward calls to my mobile and retain the original CallerID. (this means that my mobile shows the person calling home, not my home number) and I'm pretty sure it frees up the VoIP trunk channel as well
I'm using Asterisk 11 (from source) and I spent a while dissecting bits and pieces of information from google to find the solution was relatively simple, AND it still works if you answer, then blind transfer.
First I had to modify the function sip_sipredirect(...) which is in channels/chan_sip.c
" add_diversion(&p->initreq, p); " (see diff patch below)
this function appends the correct headers (which it doesn't do by default because its an "unofficial" standard)
------------------------------------------------------------------------------------------------------------
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 15a887f..0f7ab44 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -32770,6 +32770,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
domain = ast_strdupa(ldomain);
}
}
+ add_diversion(&p->initreq, p);
ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain);
transmit_response_reliable(p, "302 Moved Temporarily", &p->initreq);
------------------------------------------------------------------------------------------------------------------
Then I simply used the Transfer() command in my dialplan
[incoming]
exten => ${VFXNUMBER},1,Transfer(${MOBILENUM})
exten => ${VFXNUMBER},n,Hangup()
Also note: I found that if you Transfer() but don't Hangup() it doesn't work
You can also Answer(), Play(Please wait while I transfer you), Transfer(), Hangup() and it still works
Hopefully this helps someone else
Regards,
Blair


