Hi, I'm using Asterisk (1.2.4) as a voicemail system for our Softswitch. When forwarding a call to Voicemail, here is somehow what the softswitch sends to Asterisk : In INVITE : Vm Phone Number ( to route the call ) In To : Person who has been called ! In From : Person who was calling ! Of course, I need to send the call into the "Called User" Mailbox (Thus To SIP header) ! So Basically, filed in INVITE is "EXTEN", From field can be obtained from the function ${SIPCHANINFO(from)} But how to get the "To" field ? I have tried to add some code line into the chan_sip.c ... It works partially ... meaning that, I can add this "to" in SIPCHANINFO funciton, but the result is null. Here is what I have added in chan_sip.c : in structure sip_pvt ( "to" field same as "from" ) in sipchaninfo_function added "to" Line same as "from" function_sipchaninfo_read added "to" line same as "from" So I believe that I have enabled somehow Asterisk to read the value to from the channel ... But how to get the value and put it inside the channel ??? I think this would be my real question ! Thanks in advance for anybody who could help me ... Yours, JM -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060213/49b5a9f1/attachment.htm
SIPGetHeader(var=headername) Olivier -----Message d'origine----- De : asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] De la part de Jean-Marc Salsa Envoy? : lundi 13 f?vrier 2006 11:40 ? : asterisk-users@lists.digium.com Objet : [Asterisk-Users] How to Get SIP Header : To Field ? Hi, I'm using Asterisk (1.2.4) as a voicemail system for our Softswitch. When forwarding a call to Voicemail, here is somehow what the softswitch sends to Asterisk : In INVITE : Vm Phone Number ( to route the call ) In To : Person who has been called ! In From : Person who was calling ! Of course, I need to send the call into the "Called User" Mailbox (Thus To SIP header) ! So Basically, filed in INVITE is "EXTEN", From field can be obtained from the function ${SIPCHANINFO(from)} But how to get the "To" field ? I have tried to add some code line into the chan_sip.c ... It works partially ... meaning that, I can add this "to" in SIPCHANINFO funciton, but the result is null. Here is what I have added in chan_sip.c : in structure sip_pvt ( "to" field same as "from" ) in sipchaninfo_function added "to" Line same as "from" function_sipchaninfo_read added "to" line same as "from" So I believe that I have enabled somehow Asterisk to read the value to from the channel ... But how to get the value and put it inside the channel ??? I think this would be my real question ! Thanks in advance for anybody who could help me ... Yours, JM -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060213/a459c849/attachment.htm