Hello Zahid,<div>Thank you!<br><div>I followed your example and I use &quot;anonymous calls&quot; example for both altering Caller ID and set Anonymous feature.</div><div><br></div><div>I did this for alter/modify caller ID and It works fine! </div>
<div>------</div><div><div><span class="Apple-tab-span" style="white-space:pre">                </span>if ($avp(s:did)) {</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if(is_present_hf(&quot;Remote-Party-ID&quot;))</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>remove_hf(&quot;Remote-Party-ID&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>if(is_present_hf(&quot;Privacy&quot;))</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>remove_hf(&quot;Privacy&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>uac_replace_from(&quot;$avp(s:did)&quot;,&quot;&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>avp_delete(&quot;$avp(s:did)&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>};</div><div>-------</div>Do you think this method is safe?</div><div><br><div class="gmail_quote">On Sun, Aug 29, 2010 at 10:56 AM, Zahid Mehmood <span dir="ltr">&lt;<a href="mailto:zm23@columbia.edu">zm23@columbia.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">HI Sujeev,<br>
   try this in place of your append_hf statement.<br>
<br>
                if(is_present_hf(&quot;Remote-Party-ID&quot;))<br>
                {<br>
                        remove_hf(&quot;Remote-Party-ID&quot;);<br>
                }<br>
                if(is_present_hf(&quot;Privacy&quot;))<br>
                {<br>
                        remove_hf(&quot;Privacy&quot;);<br>
                }<br>
                uac_replace_from(&quot;Anonymous&quot;,&quot;sip:anonymous@anonymous.invalid&quot;);<br>
<br>
Hope this helps with the anonymous calls.<br>
<br>
If your gateway supports Remote-Party-ID header then you can play with the append_rpid_hf functions (<a href="http://www.opensips.org/html/docs/modules/1.6.x/auth.html#append-rpid-hf-no-params" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/auth.html#append-rpid-hf-no-params</a>).  Alternately you may set p-asserted-id header based on the caller number.<br>

<br>
--<br>
Zahid<br>
<div><div></div><div class="h5"><br>
<br>
On Aug 28, 2010, at 10:58 PM, Sujeev wrote:<br>
<br>
&gt; Hello list,<br>
&gt; I&#39;ve a small problem. I have to set caller ID as &quot;anonymous&quot; before I send calls to one of my international termination provider. also we have 1500 SIP devices and those devices belongs to 10 departments in my office(each department has 150 ATAs). each department has dedicated DID number for inbound calls. lets say &quot;Account&quot; department own DID 45610299. When the Account staff make calls to PSTN network I want to set Caller ID as 45610299 for those calls. I just want to know how to set/alter caller ID before send to SIP gateway (I&#39;ve done other parts).<br>

&gt;<br>
&gt; I did this for &quot;Anonymous&quot;;<br>
&gt;<br>
&gt; --------<br>
&gt; if (method==&quot;INVITE&quot;) {<br>
&gt;       if ($avp(s:hidecli)) {<br>
&gt;               append_hf(&quot;&lt;anonymous&gt;;party=calling;id-type=subscriber;privacy=off;screen=no\r\n&quot;);<br>
&gt;               avp_delete(&quot;$avp(s:hidecli)&quot;);<br>
&gt;       };<br>
&gt; };<br>
&gt; --------<br>
&gt; but this doesn&#39;t work.<br>
&gt;<br>
&gt; Thank you!<br>
&gt;<br>
&gt; Sujeev<br>
</div></div>&gt; &lt;ATT00001..txt&gt;<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br></div></div>