<p>Hi,</p>
<p>I'm using Asterisk (1.2.4) as a voicemail system for our Softswitch.</p>
<p>When forwarding a call to Voicemail, here is somehow what the softswitch sends to Asterisk :<br>In INVITE : Vm Phone Number ( to route the call )<br>In To : Person who has been called !<br>In From : Person who was calling ! 
</p>
<p>Of course, I need to send the call into the &quot;Called User&quot; Mailbox (Thus To SIP header) !</p>
<p>So Basically, filed in INVITE is &quot;EXTEN&quot;, From field can be obtained from the function ${SIPCHANINFO(from)}<br>But how to get the &quot;To&quot; field ?</p>
<p>I have tried to add some code line into the chan_sip.c ...<br>It works partially ... meaning that, I can add this &quot;to&quot; in SIPCHANINFO funciton,<br>but the result is null.</p>
<p>Here is what I have added in chan_sip.c :<br>in structure sip_pvt ( &quot;to&quot; field same as &quot;from&quot; )<br>in sipchaninfo_function added &quot;to&quot; Line same as &quot;from&quot;<br>function_sipchaninfo_read added &quot;to&quot; line same as &quot;from&quot; 
</p>
<p>So I believe that I have enabled somehow Asterisk to read the value to from the channel ...<br>But how to get the value and put it inside the channel ??? I think this would be my real question !</p>
<p>Thanks in advance for anybody who could help me ...</p>
<p>Yours,</p>
<p>JM</p>