<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 '912345678' to '0922666666' on channel 0/22, span 4<br> -- Executing [0922666666@default:1] Set("DAHDI/94-1", "CDR(userfield)=0922E1") in new stack<br>
-- Executing [0922666666@default:2] Set("DAHDI/94-1", "CALLERID(num)=912345678") in new stack<br> -- Executing [0922666666@default:3] Set("DAHDI/94-1", "CALLERID(num)=912345678") in new stack<br>
-- Executing [0922666666@default:4] NoOp("DAHDI/94-1", "CID num: [986230883]") in new stack<br> -- Executing [0922666666@default:5] Dial("DAHDI/94-1", "SIP/<a href="http://mypbx.abc.com/0922666666">mypbx.abc.com/0922666666</a>") 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 => 0922666666,1,Set(CDR(userfield)=0922E1)<br> exten => 0922666666,n,NoOp(CID num: [${CALLERID(num)}])<br> exten => 0922666666,n,Set(CALLERID(num)=${CALLERID(num)})<br> exten => 0922666666,n,NoOp(CID num: [${CALLERID(num)}])<br>
exten => 0922666666,n,Dial(SIP/<a href="http://mypbx.abc.com/${EXTEN}">mypbx.abc.com/${EXTEN}</a>)<br> exten => 0922666666,n,Hangup</div></div>
<div> </div>
<div> </div>
<div>3. But the strange thing is MYPBX. I use the function "NoOp" to find the callerid that call from MYE1.</div>
<div> </div>
<div> -- Executing [0922666666@did:1] NoOp("SIP/MYE1-00000185", "CID Num: Anonymous") in new stack<br> -- Executing [0922666666@did:2] Hangup<br> </div>
<div> ============ extensions.conf ============</div>
<div> exten => _X.,1,NoOp(CID Num: ${CALLERID(number)})</div>
<div> exten => _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 -> 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: "Anonymous" <sip:Anonymous@anonymous.invalid>;tag=as2b63fbb6.<br>
To: <<a href="mailto:sip%3A0922666666@mypbx.abc.com">sip:0922666666@mypbx.abc.com</a>>.<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: <sip:0922666666@210.200.XXX.XX>.<br>
Content-Length: 0.<br>.</div>
<div><br> U 210.200.XXX.XX:5060 -> 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: "Anonymous" <sip:Anonymous@anonymous.invalid>;tag=as2b63fbb6.<br>
To: <<a href="mailto:sip%3A0922666666@xm1.gvlink.net">sip:0922666666@xm1.gvlink.net</a>>;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'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 "Anonymous"? How can I fix it with the correct orginal callerid(912345678)?</div>
<div> </div>
<div> C. Why does my FROM message become as "Anonymous" <sip:Anonymous@anonymous.invalid> 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>