<div dir="ltr">If the INVITE comes from A then on answering the call the response to A will be 200 OK, not another invite.<div><br></div><div>The To header in the 200 OK has to match the value in the INVITE, as they're part of the same dialog. The rules of the SIP protocol mean needs you to reply to A within the call using the values you were originally sent in the original INVITE.</div><div><br></div><div>If you need to provide information back to A I suggest you look at the sip_rh_ family of variables. They'll allow you to send extra headers (eg X- headers) in the 200 OK.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 December 2014 at 01:16, Ahmed Habiba <span dir="ltr"><<a href="mailto:ahabiba@gmail.com" target="_blank">ahabiba@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Thanks you really Michael.</div><div><br></div><div>My point is as below:</div><div>1-when FS get Invite from A number the TO is as below:</div><div>To: <<a>sip:2020@71.233.135.12</a>></div><div><br></div><div>2-and when I run answer application, FS send invite to A number with TO as below:</div><div>To: <<a>sip:2020@71.233.135.12</a>></div><div><br></div><div>3-I want when I run answer application to edit the TO header and to add some prefix like 505 as below:</div><div>To: <sip<u>:<font color="#371a94"><b>505</b></font></u><a href="mailto:2020@71.233.135.12" target="_blank">2020@71.233.135.12</a>></div><div><br></div><div>is this possible, by editing sip header, and if so how can I do so?</div><div><br></div><div>Your kind usual support will be appreciated.</div><div><br><blockquote type="cite"><div><br><div style="margin:0px"><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif;color:rgb(127,127,127)"><b>From: </b></span><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif">Michael Jerris <<a href="mailto:mike@jerris.com" style="color:purple" target="_blank">mike@jerris.com</a>><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif;color:rgb(127,127,127)"><b>To: </b></span><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif">FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" style="color:purple" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif;color:rgb(127,127,127)"><b>Date: </b></span><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif">December 13, 2014 at 12:37:42 AM GMT+3<br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif;color:rgb(127,127,127)"><b>Reply-To: </b></span><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif">FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" style="color:purple" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif;color:rgb(127,127,127)"><b>Subject: </b></span><span style="font-family:-webkit-system-font,'Helvetica Neue',Helvetica,sans-serif"><b>Re: [Freeswitch-users] SIP Header Modification / Manipulation</b><br></span></div><span><br><br><span style="float:none;display:inline!important">if you are looking to update the display of the number that is being called on the caller phone, you want to be looking at display udpates, and callee_id_name and callee_id_number params.</span><br><br><blockquote type="cite">On Dec 12, 2014, at 2:39 PM, Ahmed Habiba <<a href="mailto:ahabiba@gmail.com" style="color:purple" target="_blank">ahabiba@gmail.com</a>> wrote:<br><br>Dears,<br><br>Kindly help me on how can I modify the SIP header in the re-invite in the below scenario:<br><br><br>[A Number] <———>[FreeSWitch]<———>[B Number]<br><br><br>1-A Number Call B Number (Sip Invite sent from A number)<br>2-B number is not registered.<br>3-Call logic let FreeSwitch answer the call( Freeswitch send re-invite to A number)<br><br>in the part number 3 I like to do modification on the SIP headers, by for example changing the From or To.<br><br><br>Your help will be appreciated.</blockquote></span></div></blockquote></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div></div></div>