<div>Hi,</div>
<div> </div>
<div>I have two asterisk servers with the same version of 1.4.29.1.</div>
<div>The first server named it as MYE1. MYE1 is an incoming server that can accept incoming calls from PSTN(ZAP E1).</div>
<div>The second server is a pbx functions server and named it as MYPBX(SIP).</div>
<div> </div>
<div>The sip.conf of MYE1 likes below:</div>
<div>[MYPBX]<br>type=peer<br>host=<a href="http://mypbx.abc.com">mypbx.abc.com</a><br>nat=no<br>disallow=all<br>allow=g729<br>canreinvite=yes<br>qualify=no<br>context=default<br>insecure=port,invite</div>
<div> </div>
<div>The sip.conf of MYPBX likes below:</div>
<div>[MYE1]<br>type=peer<br>host=<a href="http://mye1.abc.com">mye1.abc.com</a><br>nat=no<br>disallow=all<br>allow=g729<br>canreinvite=yes<br>qualify=no<br>context=did<br>insecure=port,invite</div>
<div><br clear="all">The call flow is </div>
<div>1. Mobile with disable callerid(+886-912-345678) make a call to DIDs on the E1 (for example: +886-922-666666 and enters MYE1 system. But my telecomm provider helps me to solve the callerid and make it enable. So that, I can find callerid of Mobile from MYE1.</div>

<div> </div>
<div>2. MYE1 accept this call and dial it to MYPBX. In this moment, I can find the fllowing message on the CLI of MYE1.</div>
<div>   In Another word, the Caller ID is correct here.</div>
<div> </div>
<div>    -- Accepting call from &#39;912345678&#39; to &#39;0922666666&#39; on channel 0/22, span 4<br>    -- Executing [0922666666@default:1] Set(&quot;DAHDI/94-1&quot;, &quot;CDR(userfield)=0922E1&quot;) in new stack<br>
    -- Executing [0922666666@default:2] Set(&quot;DAHDI/94-1&quot;, &quot;CALLERID(num)=912345678&quot;) in new stack<br>    -- Executing [0922666666@default:3] Set(&quot;DAHDI/94-1&quot;, &quot;CALLERID(num)=912345678&quot;) in new stack<br>
    -- Executing [0922666666@default:4] NoOp(&quot;DAHDI/94-1&quot;, &quot;CID num: [986230883]&quot;) in new stack<br>    -- Executing [0922666666@default:5] Dial(&quot;DAHDI/94-1&quot;, &quot;SIP/<a href="http://mypbx.abc.com/0922666666">mypbx.abc.com/0922666666</a>&quot;) in new stack<br>
    -- Called <a href="http://mypbx.abc.com/0922666666">mypbx.abc.com/0922666666</a><br>    -- SIP/mypbx.abc.com-00002551 is ringing</div>
<div> </div>
<div>
<div>    ============   extensions.conf  ============</div>
<div>     exten =&gt; 0922666666,1,Set(CDR(userfield)=0922E1)<br>     exten =&gt; 0922666666,n,NoOp(CID num: [${CALLERID(num)}])<br>     exten =&gt; 0922666666,n,Set(CALLERID(num)=${CALLERID(num)})<br>     exten =&gt; 0922666666,n,NoOp(CID num: [${CALLERID(num)}])<br>
     exten =&gt; 0922666666,n,Dial(SIP/<a href="http://mypbx.abc.com/${EXTEN}">mypbx.abc.com/${EXTEN}</a>)<br>     exten =&gt; 0922666666,n,Hangup</div></div>
<div> </div>
<div> </div>
<div>3. But the strange thing is MYPBX. I use the function &quot;NoOp&quot; to find the callerid that call from MYE1.</div>
<div> </div>
<div>     -- Executing [0922666666@did:1] NoOp(&quot;SIP/MYE1-00000185&quot;, &quot;CID Num: Anonymous&quot;) in new stack<br>     -- Executing [0922666666@did:2] Hangup<br> </div>
<div>    ============   extensions.conf  ============</div>
<div>     exten =&gt; _X.,1,NoOp(CID Num: ${CALLERID(number)})</div>
<div>     exten =&gt; _X.,1,Hangup</div>
<div> </div>
<div>4. I got the ngrep message from MYPBX.</div>
<div> </div>
<div>     U 210.200.XXX.XX:5060 -&gt; 61.65.XX.XX:5060<br>     SIP/2.0 100 Trying.     <br>     Via: SIP/2.0/UDP 61.65.XX.XX:5060;branch=z9hG4bK276d72eb;received=61.65.XX.XX;rport=5060.<br>     From: &quot;Anonymous&quot; &lt;sip:Anonymous@anonymous.invalid&gt;;tag=as2b63fbb6.<br>
     To: &lt;<a href="mailto:sip%3A0922666666@mypbx.abc.com">sip:0922666666@mypbx.abc.com</a>&gt;.<br>     Call-ID: <a href="mailto:1a9bc32e05eeb8b27bfadfba35c091f2@61.65.XX.XX">1a9bc32e05eeb8b27bfadfba35c091f2@61.65.XX.XX</a>.<br>
     CSeq: 102 INVITE.<br>     User-Agent: Asterisk PBX.<br>     Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.<br>     Supported: replaces.<br>     Contact: &lt;sip:0922666666@210.200.XXX.XX&gt;.<br>
     Content-Length: 0.<br>.</div>
<div><br>     U 210.200.XXX.XX:5060 -&gt; 61.65.XX.XX:5060<br>     SIP/2.0 180 Ringing.<br>     Via: SIP/2.0/UDP 61.65.XX.XX:5060;branch=z9hG4bK276d72eb;received=61.65.XX.XX;rport=5060.<br>     From: &quot;Anonymous&quot; &lt;sip:Anonymous@anonymous.invalid&gt;;tag=as2b63fbb6.<br>
     To: &lt;<a href="mailto:sip%3A0922666666@xm1.gvlink.net">sip:0922666666@xm1.gvlink.net</a>&gt;;tag=as66351139.<br>     Call-ID: <a href="mailto:1a9bc32e05eeb8b27bfadfba35c091f2@61.65.XX.XX">1a9bc32e05eeb8b27bfadfba35c091f2@61.65.XX.XX</a>.<br>
     CSeq: 102 INVITE.<br>     User-Agent: Asterisk PBX.<br>     Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.<br>     Supported: replaces.</div>
<div> </div>
<div> </div>
<div>5. My questions are:</div>
<div> </div>
<div>   A. Why can&#39;t I receive the CALLERID from MYPBX(the secondary server)? I am sure I use Set(CALLERID(num) for it.</div>
<div> </div>
<div>   B. Why does the CALLERID that sends from MYE1 become as &quot;Anonymous&quot;? How can I fix it with the correct orginal callerid(912345678)?</div>
<div> </div>
<div>   C. Why does my FROM message become as &quot;Anonymous&quot; &lt;sip:Anonymous@anonymous.invalid&gt; instead of  <a href="mailto:912345678@mye1.abc.com">912345678@mye1.abc.com</a> ? </div>
<div> </div>
<div> </div>
<div>If you have any suggestions, please let me know. Thank you very much.</div>
<div><br>-- <br>Best Regards<br>Charles<br><br></div>