[asterisk-users] Got Anonymous from DID incoming call and can't re-send to another asterisk with new callerid

Charles Wang lazy.charles at gmail.com
Thu Feb 25 14:51:14 CST 2010


Hi,

I have two asterisk servers with the same version of 1.4.29.1.
The first server named it as MYE1. MYE1 is an incoming server that can
accept incoming calls from PSTN(ZAP E1).
The second server is a pbx functions server and named it as MYPBX(SIP).

The sip.conf of MYE1 likes below:
[MYPBX]
type=peer
host=mypbx.abc.com
nat=no
disallow=all
allow=g729
canreinvite=yes
qualify=no
context=default
insecure=port,invite

The sip.conf of MYPBX likes below:
[MYE1]
type=peer
host=mye1.abc.com
nat=no
disallow=all
allow=g729
canreinvite=yes
qualify=no
context=did
insecure=port,invite

The call flow is
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.

2. MYE1 accept this call and dial it to MYPBX. In this moment, I can find
the fllowing message on the CLI of MYE1.
   In Another word, the Caller ID is correct here.

    -- Accepting call from '912345678' to '0922666666' on channel 0/22, span
4
    -- Executing [0922666666 at default:1] Set("DAHDI/94-1",
"CDR(userfield)=0922E1") in new stack
    -- Executing [0922666666 at default:2] Set("DAHDI/94-1",
"CALLERID(num)=912345678") in new stack
    -- Executing [0922666666 at default:3] Set("DAHDI/94-1",
"CALLERID(num)=912345678") in new stack
    -- Executing [0922666666 at default:4] NoOp("DAHDI/94-1", "CID num:
[986230883]") in new stack
    -- Executing [0922666666 at default:5] Dial("DAHDI/94-1", "SIP/
mypbx.abc.com/0922666666") in new stack
    -- Called mypbx.abc.com/0922666666
    -- SIP/mypbx.abc.com-00002551 is ringing

     ============   extensions.conf  ============
     exten => 0922666666,1,Set(CDR(userfield)=0922E1)
     exten => 0922666666,n,NoOp(CID num: [${CALLERID(num)}])
     exten => 0922666666,n,Set(CALLERID(num)=${CALLERID(num)})
     exten => 0922666666,n,NoOp(CID num: [${CALLERID(num)}])
     exten => 0922666666,n,Dial(SIP/mypbx.abc.com/${EXTEN})
     exten => 0922666666,n,Hangup


3. But the strange thing is MYPBX. I use the function "NoOp" to find the
callerid that call from MYE1.

     -- Executing [0922666666 at did:1] NoOp("SIP/MYE1-00000185", "CID Num:
Anonymous") in new stack
     -- Executing [0922666666 at did:2] Hangup

    ============   extensions.conf  ============
     exten => _X.,1,NoOp(CID Num: ${CALLERID(number)})
     exten => _X.,1,Hangup

4. I got the ngrep message from MYPBX.

     U 210.200.XXX.XX:5060 -> 61.65.XX.XX:5060
     SIP/2.0 100 Trying.
     Via: SIP/2.0/UDP
61.65.XX.XX:5060;branch=z9hG4bK276d72eb;received=61.65.XX.XX;rport=5060.
     From: "Anonymous" <sip:Anonymous at anonymous.invalid>;tag=as2b63fbb6.
     To: <sip:0922666666 at mypbx.abc.com <sip%3A0922666666 at mypbx.abc.com>>.
     Call-ID: 1a9bc32e05eeb8b27bfadfba35c091f2 at 61.65.XX.XX.
     CSeq: 102 INVITE.
     User-Agent: Asterisk PBX.
     Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO.
     Supported: replaces.
     Contact: <sip:0922666666 at 210.200.XXX.XX>.
     Content-Length: 0.
.

     U 210.200.XXX.XX:5060 -> 61.65.XX.XX:5060
     SIP/2.0 180 Ringing.
     Via: SIP/2.0/UDP
61.65.XX.XX:5060;branch=z9hG4bK276d72eb;received=61.65.XX.XX;rport=5060.
     From: "Anonymous" <sip:Anonymous at anonymous.invalid>;tag=as2b63fbb6.
     To: <sip:0922666666 at xm1.gvlink.net <sip%3A0922666666 at xm1.gvlink.net>
>;tag=as66351139.
     Call-ID: 1a9bc32e05eeb8b27bfadfba35c091f2 at 61.65.XX.XX.
     CSeq: 102 INVITE.
     User-Agent: Asterisk PBX.
     Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO.
     Supported: replaces.


5. My questions are:

   A. Why can't I receive the CALLERID from MYPBX(the secondary server)? I
am sure I use Set(CALLERID(num) for it.

   B. Why does the CALLERID that sends from MYE1 become as "Anonymous"? How
can I fix it with the correct orginal callerid(912345678)?

   C. Why does my FROM message become as "Anonymous"
<sip:Anonymous at anonymous.invalid> instead of  912345678 at mye1.abc.com ?


If you have any suggestions, please let me know. Thank you very much.

-- 
Best Regards
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100226/a15a0769/attachment.htm 


More information about the asterisk-users mailing list