I am also having a similar question, however with the additional requirement that my headers, need to go end-to-end between the two SIP clients as well. <br>If you just need to do only server-side processing of these new headers, then it should be fairly straightfoward.
<br>a. you need to extract the headers in channels/chan_sip.c in find_call() and handle_response(), assuming that you have headers in both requests and responses. <br>b. invoke appropriate <br>If you do NOT need to pass on the headers to the other end-point, it should not be difficult, since by default Asterisk acts like a b2bua and does not seem to pass on proprietary/extended headers from one end-point to the other. 
<br><br>However, (in my view) it gets difficult if you *need* to pass on these headers between the endpoints.<br>1. You&nbsp; need to parse them and store them in sip_pvt structure<br>2. In the appropriate application logic (mostly, it would be pbx), you need to copy these headers into incoming ast_channel
<br>3. You need to copy them from incoming ast_channel to the outgoing one.&nbsp; <br>4. finally, in the outgoing sip channel, you need to again copy them to sip_pvt and then encode them into the outgoing SIP message...<br><br>
And this is&nbsp; for the requests...I have still not been able to figure out how to do this for responses..<br>viz. how to find the corresponding ast_channel, to copy them back from the incoming to the outgoing response..<br>
<br>I just wish, there was an easier generic way to pass on these extended headers from one end to another. <br>Or maybe there is, which I am not aware of. ..<br><br>hope this helps.<br>Samir<br><br><br><br><div><span class="gmail_quote">
On 9/26/07, <b class="gmail_sendername">Hitesh Tewari</b> &lt;<a href="mailto:htewari@hotmail.com">htewari@hotmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hello,<br><br>We would like to carry some proprietary payment info in our initial INVITE message from the client to our SIP server.<br>To do the same we are considering using one of the unused SDP fields or creating one of our own and
<br>transporting the info within the same.<br><br>As we need to send the payment info periodically we are planning on making use of the UPDATE or re-INVITE<br>methods and sending an updated SDP to the proxy. At the SIP server end we intend to make use of
<br>an Asterisk server and be able to extract out the payment info field before forwarding the INVITE or UPDATE.<br><br>My question is that would this be a reasonable thing to do in Asterisk?<br>Any guidance from you would be greatly appreciated. Many thanks for your time.
<br><br><br>Hitesh<br>_________________________________________________________________<br>Connect and share instantly with the world&#39;s most popular IM network.<br><a href="http://get.live.com/en-ie/messenger/overview">
http://get.live.com/en-ie/messenger/overview</a><br>_______________________________________________<br><br>Sign up now for AstriCon 2007!&nbsp;&nbsp;September 25-28th.&nbsp;&nbsp;<a href="http://www.astricon.net/">http://www.astricon.net/</a>
<br><br>--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--">http://www.api-digital.com--</a><br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">
http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br>