Call Rejection on Blank CallerID When Connection Two Server

So here is what I’m trying to set up. I have an Asterisk server and I have extra minutes that I want to sell to resller. The reseller will be sending traffics from many users through the reseller’s Asterisk server and then through MY asterisk server. Here is a schematics:

caller -----> reseller’s asterisk --------> my asterisk server ---------> PSTN

The problem I’m having is that whenever the caller’s callerid is blank (no number whatsoever), my asterisk server would reject the call:

caller (no callerid) -------> reseller’s asterisk ------XXX—> my asterisk server

Some configuration:

I have setup up an extension number 200 on my server to allow the reseller to connect to my server as a Trunk on his server.

Asterisk version: 1.4.24 on both server
FreePBX 2.5.1 on both server

Here’s is the SIP trace.

XX.XX.XX.XX = IP of reseller's asterisk server
YY.YY.YY.YY = IP of my asterisk server


=========================================================================
Connected to Asterisk 1.4.24.1 currently running on mywebcalling (pid = 21525)
Verbosity is at least 5

<--- SIP read from XX.XX.XX.XX:5060 --->
INVITE sip:18004444444@YY.YY.YY.YY SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK5664a9e0;rport
From: "David" <sip:200@XX.XX.XX.XX>;tag=as6466c5a8
To: <sip:18004444444@YY.YY.YY.YY>
Contact: <sip:200@XX.XX.XX.XX>
Call-ID: 4931f0b4184fd59a1b6c999c748ff96f@XX.XX.XX.XX
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 07 May 2009 22:01:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 266

v=0
o=root 1682 1682 IN IP4 XX.XX.XX.XX
s=session
c=IN IP4 XX.XX.XX.XX
t=0 0
m=audio 12946 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
--- (14 headers 13 lines) ---
Sending to XX.XX.XX.XX : 5060 (NAT)
Using INVITE request as basis request - 4931f0b4184fd59a1b6c999c748ff96f@XX.XX.XX.XX

<--- Reliably Transmitting (NAT) to XX.XX.XX.XX:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK5664a9e0;received=XX.XX.XX.XX;rport=5060
From: "David" <sip:200@XX.XX.XX.XX>;tag=as6466c5a8
To: <sip:18004444444@YY.YY.YY.YY>;tag=as64568aef
Call-ID: 4931f0b4184fd59a1b6c999c748ff96f@XX.XX.XX.XX
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Proxy-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="08687091"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '4931f0b4184fd59a1b6c999c748ff96f@XX.XX.XX.XX' in 32000 ms (Method: INVITE)
Found user '200'>

<--- SIP read from XX.XX.XX.XX:5060 --->
ACK sip:18004444444@YY.YY.YY.YY SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK5664a9e0;rport
From: "David" <sip:200@XX.XX.XX.XX>;tag=as6466c5a8
To: <sip:18004444444@YY.YY.YY.YY>;tag=as64568aef
Contact: <sip:200@XX.XX.XX.XX>
Call-ID: 4931f0b4184fd59a1b6c999c748ff96f@XX.XX.XX.XX
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---

From: "David" <sip:200@XX.XX.XX.XX>;tag=as68a1212a
To: <sip:18004444444@YY.YY.YY.YY>
Contact: <sip:200@XX.XX.XX.XX>
Call-ID: 4730d87320f41dbd130738a12086ed22@XX.XX.XX.XX
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 07 May 2009 22:02:11 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 266

v=0
o=root 1682 1682 IN IP4 XX.XX.XX.XX
s=session
c=IN IP4 XX.XX.XX.XX
t=0 0
m=audio 16378 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
--- (14 headers 13 lines) ---
Sending to XX.XX.XX.XX : 5060 (NAT)
Using INVITE request as basis request - 4730d87320f41dbd130738a12086ed22@XX.XX.XX.XX

<--- Reliably Transmitting (NAT) to XX.XX.XX.XX:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK3b303d7a;received=XX.XX.XX.XX;rport=5060
From: "David" <sip:200@XX.XX.XX.XX>;tag=as68a1212a
To: <sip:18004444444@YY.YY.YY.YY>;tag=as5a0c1ed8
Call-ID: 4730d87320f41dbd130738a12086ed22@XX.XX.XX.XX
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Proxy-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4b2373d8"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '4730d87320f41dbd130738a12086ed22@XX.XX.XX.XX' in 32000 ms (Method: INVITE)
Found user '200'>

<--- SIP read from XX.XX.XX.XX:5060 --->
ACK sip:18004444444@YY.YY.YY.YY SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK3b303d7a;rport
From: "David" <sip:200@XX.XX.XX.XX>;tag=as68a1212a
To: <sip:18004444444@YY.YY.YY.YY>;tag=as5a0c1ed8
Contact: <sip:200@XX.XX.XX.XX>
Call-ID: 4730d87320f41dbd130738a12086ed22@XX.XX.XX.XX
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '4931f0b4184fd59a1b6c999c748ff96f@XX.XX.XX.XX' Method: ACK

<--- SIP read from XX.XX.XX.XX:5060 --->
OPTIONS sip:YY.YY.YY.YY SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK5d15b4d1;rport
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as4632837d
To: <sip:YY.YY.YY.YY>
Contact: <sip:Unknown@XX.XX.XX.XX>
Call-ID: 7ddc32772f0e0c5604ee3376202b51c3@XX.XX.XX.XX
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 07 May 2009 22:02:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


<------------->
--- (13 headers 0 lines) ---
Looking for s in a2billing (domain YY.YY.YY.YY)

<--- Transmitting (no NAT) to XX.XX.XX.XX:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK5d15b4d1;received=XX.XX.XX.XX;rport=5060
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as4632837d
To: <sip:YY.YY.YY.YY>;tag=as66c4993b
Call-ID: 7ddc32772f0e0c5604ee3376202b51c3@XX.XX.XX.XX
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '7ddc32772f0e0c5604ee3376202b51c3@XX.XX.XX.XX' in 32000 ms (Method: OPTIONS)
Reliably Transmitting (no NAT) to 204.8.45.222:5060:
OPTIONS sip:sip.tollfreegateway.com SIP/2.0
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK75912d5e;rport
From: "Unknown" <sip:Unknown@YY.YY.YY.YY>;tag=as3c0bbbf0
To: <sip:sip.tollfreegateway.com>
Contact: <sip:Unknown@YY.YY.YY.YY>
Call-ID: 1afe289c07f224c1525a6bea3f6b2745@YY.YY.YY.YY
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 07 May 2009 22:02:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


---

<--- SIP read from 204.8.45.222:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK75912d5e;rport=5060
From: "Unknown" <sip:Unknown@YY.YY.YY.YY>;tag=as3c0bbbf0
To: <sip:sip.tollfreegateway.com>;tag=3pZQ01Fmj9e7N
Call-ID: 1afe289c07f224c1525a6bea3f6b2745@YY.YY.YY.YY
CSeq: 102 OPTIONS
Contact: <sip:204.8.45.222>
User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-12020MS
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO
Supported: timer, precondition, path, replaces
Allow-Events: talk, refer
Content-Length: 0


<------------->
--- (13 headers 0 lines) ---
Really destroying SIP dialog '1afe289c07f224c1525a6bea3f6b2745@YY.YY.YY.YY' Method: OPTIONS
Reliably Transmitting (no NAT) to 65.111.186.2:5060:
OPTIONS sip:tollfree.future-nine.com SIP/2.0
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK1529976d;rport
From: "Unknown" <sip:Unknown@YY.YY.YY.YY>;tag=as3d3b3550
To: <sip:tollfree.future-nine.com>
Contact: <sip:Unknown@YY.YY.YY.YY>
Call-ID: 40c84f2c1ec7e0ca3f02a640496b101e@YY.YY.YY.YY
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 07 May 2009 22:02:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


---

<--- SIP read from 65.111.186.2:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK1529976d;received=YY.YY.YY.YY;rport=5060
From: "Unknown" <sip:Unknown@YY.YY.YY.YY>;tag=as3d3b3550
To: <sip:tollfree.future-nine.com>;tag=as2d017904
Call-ID: 40c84f2c1ec7e0ca3f02a640496b101e@YY.YY.YY.YY
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Accept: application/sdp
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog '40c84f2c1ec7e0ca3f02a640496b101e@YY.YY.YY.YY' Method: OPTIONS
Reliably Transmitting (NAT) to XX.XX.XX.XX:5060:
OPTIONS sip:XX.XX.XX.XX SIP/2.0
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK4626cd79;rport
From: "Unknown" <sip:Unknown@YY.YY.YY.YY>;tag=as7f127247
To: <sip:XX.XX.XX.XX>
Contact: <sip:Unknown@YY.YY.YY.YY>
Call-ID: 09d4468876ffac7040a4640f7d7ffef1@YY.YY.YY.YY
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 07 May 2009 22:02:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


---

<--- SIP read from XX.XX.XX.XX:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK4626cd79;received=YY.YY.YY.YY;rport=5060
From: "Unknown" <sip:Unknown@YY.YY.YY.YY>;tag=as7f127247
To: <sip:XX.XX.XX.XX>;tag=as52c2226e
Call-ID: 09d4468876ffac7040a4640f7d7ffef1@YY.YY.YY.YY
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:XX.XX.XX.XX>
Accept: application/sdp
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
Really destroying SIP dialog '09d4468876ffac7040a4640f7d7ffef1@YY.YY.YY.YY' Method: OPTIONS

Anybody have a clue?

Your caller ID isn’t empty (which would be a protocol violation); it is “200”.

Trunk’s don’t have a single extension number.

It appears to me that you have no registration data for 200@XX.XX.XX.XX, as the service provider is challenging you for authentication, but you are not responding.

The callerid is set at “200” first but it then becomes “Unknown”. Asterisk then treat is as a anonymous callerid call.

Your trace doesn’t show “unknown” being used as part of an INVITE dialogue. I only see it used with OPTIONS, which is used to support the “qualify” option.

The dialogue does show the service provider requesting authentication, and none being provided.

[quote=“david55”]Your trace doesn’t show “unknown” being used as part of an INVITE dialogue. I only see it used with OPTIONS, which is used to support the “qualify” option.

The dialogue does show the service provider requesting authentication, and none being provided.[/quote]

So you think the problem isn’t my server receiving the call, but that the call isn’t going out correctly?