I have come to a question when dealing with call forwarding:
A and B are using Mobile Phones with PSTN. C is another Phone Number but connected with FreeSWTICH Instance which pickups any calls C receives. A calls B, B forwards to C, then FreeSWITCH routes A to an extension, in this extension, I would like to extract the Information of B, like its phone number, etc.
I have checked the variables in the channel, but it doesn't contain information of B.
Can any one help? Thanks.
BTW, one related topic:
http://lists.freeswitch.org/pipermail/freeswitch-users/2013-May/096044.html
It looks like the only relevant info you would get is B's phone number, if by any chance it is passed as the caller ID number to the FreeSWITCH server that C is attached to, but it that case you would lose A's phone number.
What you can try here is to check the SIP INVITE FreeSWITCH receives. In the CLI, try (SIP profile can be named to something different than external
, but I'm assuming you configured your SIP provider to be attached to the external
profile):
sofia profile external siptrace on
If B automatically forwards the call to C, you might get a SIP Diversion
header that contains relevant information if C's carrier provides it.
Hope this helps!