Hello Zahid,<div>Thank you!<br><div>I followed your example and I use "anonymous calls" 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("Remote-Party-ID"))</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("Remote-Party-ID");</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("Privacy"))</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("Privacy");</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("$avp(s:did)","");</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>avp_delete("$avp(s:did)");</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"><<a href="mailto:zm23@columbia.edu">zm23@columbia.edu</a>></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("Remote-Party-ID"))<br>
{<br>
remove_hf("Remote-Party-ID");<br>
}<br>
if(is_present_hf("Privacy"))<br>
{<br>
remove_hf("Privacy");<br>
}<br>
uac_replace_from("Anonymous","sip:anonymous@anonymous.invalid");<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>
> Hello list,<br>
> I've a small problem. I have to set caller ID as "anonymous" 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 "Account" 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've done other parts).<br>
><br>
> I did this for "Anonymous";<br>
><br>
> --------<br>
> if (method=="INVITE") {<br>
> if ($avp(s:hidecli)) {<br>
> append_hf("<anonymous>;party=calling;id-type=subscriber;privacy=off;screen=no\r\n");<br>
> avp_delete("$avp(s:hidecli)");<br>
> };<br>
> };<br>
> --------<br>
> but this doesn't work.<br>
><br>
> Thank you!<br>
><br>
> Sujeev<br>
</div></div>> <ATT00001..txt><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>