# Caller Id

**URL:** <https://community.asterisk.org/t/caller-id/25138>\
**Category:** Asterisk Support\
**Created:** [January 23, 2009, 1:20pm UTC](https://community.asterisk.org/t/caller-id/25138 "2009-01-23T13:20:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeevsg](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rajeevsg](https://community.asterisk.org/u/rajeevsg)\
**Post date:** [January 23, 2009, 1:20pm UTC](https://community.asterisk.org/t/caller-id/25138/1 "2009-01-23T13:20:39Z")

</div>

Sir,

I am using sip fxo for incoming call all is wroking fine but now i want to display callerid on extension but it will display userno of sip channel instead of caller no.

There is any way to display caller no. instead of sip user no.

Rajeev.

---

<div class="post-metadata">

**Author:** ![sander4000](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sander4000](https://community.asterisk.org/u/sander4000)\
**Post date:** [January 23, 2009, 10:57pm UTC](https://community.asterisk.org/t/caller-id/25138/2 "2009-01-23T22:57:00Z")

</div>

you can check if it is in the variable ${CALLERID(DNID)}

put this in you incomming dialscript

exten=s,1,NoOp(CallerID = ${CALLERID(DNID)})  
NoOp does nothing it ony shows you the information in the CLI when an incomming call comes in you should watch the cli for CallerID = then you should see the number. if yo do you need to change the value CALLERID(num)  
but it also could be some configuration in your FXO gateway

---

<div class="post-metadata">

**Author:** ![rajeevsg](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rajeevsg](https://community.asterisk.org/u/rajeevsg)\
**Post date:** [November 3, 2009, 12:03pm UTC](https://community.asterisk.org/t/caller-id/25138/3 "2009-11-03T12:03:04Z")

</div>

Sir,

It will return the audiocode fxo port number. i want to receive caller number please help.

Rajeev.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [November 3, 2009, 12:06pm UTC](https://community.asterisk.org/t/caller-id/25138/4 "2009-11-03T12:06:35Z")

</div>

Please post a copy of the SIP INVITE you are receiving. It may be that your upstream is not sending the information.

---

<div class="post-metadata">

**Author:** ![rajeevsg](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rajeevsg](https://community.asterisk.org/u/rajeevsg)\
**Post date:** [November 3, 2009, 12:27pm UTC](https://community.asterisk.org/t/caller-id/25138/5 "2009-11-03T12:27:36Z")

</div>

Sir,

I not expert in asterisk will you please tell me how i have to give you SIP INVITE information.

Rajeev.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [November 3, 2009, 12:30pm UTC](https://community.asterisk.org/t/caller-id/25138/6 "2009-11-03T12:30:29Z")

</div>

CLI sip set debug on (you may need to do core set verbose, as well);  
wireshark; or  
tcpdump

tcpdump can be better than wireshark, as you don’t want to end up using a screen shot, here.

---

<div class="post-metadata">

**Author:** ![rajeevsg](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rajeevsg](https://community.asterisk.org/u/rajeevsg)\
**Post date:** [November 3, 2009, 12:58pm UTC](https://community.asterisk.org/t/caller-id/25138/7 "2009-11-03T12:58:28Z")

</div>

Sir,

Here is the screen shot.

\<— SIP read from 192.168.0.173:5060 —\>  
INVITE sip:453@myproxy SIP/2.0  
Via: SIP/2.0/UDP 192.168.0.173;branch=z9hG4bKac891662743  
Max-Forwards: 70  
From: “Anonymous” sip:900@192.168.0.246;tag=1c891659115  
To: sip:453@myproxy  
Call-ID: [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)  
CSeq: 1 INVITE  
Contact: sip:900@192.168.0.173  
Supported: em,100rel,timer,replaces,path,early-session,resource-priority  
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE  
User-Agent: Audiocodes-Sip-Gateway-MP-118 FXO/v.5.40A.015.004  
Content-Type: application/sdp  
Content-Disposition: session  
Content-Length: 267

v=0  
o=AudiocodesGW 891653273 891653157 IN IP4 192.168.0.173  
s=Phone-Call  
c=IN IP4 192.168.0.173  
t=0 0  
m=audio 6000 RTP/AVP 8 101  
a=rtpmap:8 PCMA/8000  
a=rtpmap:101 telephone-event/8000  
a=fmtp:101 0-15  
a=ptime:20  
a=sendrecv  
a=rtcp:6001 IN IP4 192.168.0.173

\<-------------\>  
— (14 headers 12 lines) —  
Sending to 192.168.0.173 : 5060 (no NAT)  
Using INVITE request as basis request - [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)

\<— Reliably Transmitting (no NAT) to 192.168.0.173:5060 —\>  
SIP/2.0 407 Proxy Authentication Required  
Via: SIP/2.0/UDP 192.168.0.173;branch=z9hG4bKac891662743;received=192.168.0.173  
From: “Anonymous” sip:900@192.168.0.246;tag=1c891659115  
To: sip:453@myproxy;tag=as4d351114  
Call-ID: [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)  
CSeq: 1 INVITE  
User-Agent: Asterisk PBX  
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO  
Supported: replaces  
Proxy-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="0e3283b7"  
Content-Length: 0

\<------------\>  
Scheduling destruction of SIP dialog ‘89165870311200003410@192.168.0.173’ in 32000 ms (Method: INVITE)  
Found user ‘900’

\<— SIP read from 192.168.0.173:5060 —\>  
ACK sip:453@myproxy SIP/2.0  
Via: SIP/2.0/UDP 192.168.0.173;branch=z9hG4bKac891662743  
Max-Forwards: 70  
From: “Anonymous” sip:900@192.168.0.246;tag=1c891659115  
To: sip:453@myproxy;tag=as4d351114  
Call-ID: [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)  
CSeq: 1 ACK  
Contact: sip:900@192.168.0.173  
Supported: em,timer,replaces,path,early-session,resource-priority  
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE  
User-Agent: Audiocodes-Sip-Gateway-MP-118 FXO/v.5.40A.015.004  
Content-Length: 0

\<-------------\>  
— (12 headers 0 lines) —

\<— SIP read from 192.168.0.173:5060 —\>  
INVITE sip:453@myproxy SIP/2.0  
Via: SIP/2.0/UDP 192.168.0.173;branch=z9hG4bKac891694777  
Max-Forwards: 70  
From: “Anonymous” sip:900@192.168.0.246;tag=1c891659115  
To: sip:453@myproxy  
Call-ID: [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)  
CSeq: 2 INVITE  
Proxy-Authorization: Digest username=“900”,realm=“asterisk”,nonce=“0e3283b7”,uri=“sip:453@myproxy”,algorithm=MD5,response="6f10e0be58685576b997b63de538aa53"  
Contact: sip:900@192.168.0.173  
Supported: em,100rel,timer,replaces,path,early-session,resource-priority  
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE  
User-Agent: Audiocodes-Sip-Gateway-MP-118 FXO/v.5.40A.015.004  
Content-Type: application/sdp  
Content-Disposition: session  
Content-Length: 267

v=0  
o=AudiocodesGW 891653273 891653157 IN IP4 192.168.0.173  
s=Phone-Call  
c=IN IP4 192.168.0.173  
t=0 0  
m=audio 6000 RTP/AVP 8 101  
a=rtpmap:8 PCMA/8000  
a=rtpmap:101 telephone-event/8000  
a=fmtp:101 0-15  
a=ptime:20  
a=sendrecv  
a=rtcp:6001 IN IP4 192.168.0.173

\<-------------\>  
— (15 headers 12 lines) —  
Sending to 192.168.0.173 : 5060 (no NAT)  
Using INVITE request as basis request - [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)  
Found user '900’  
Found RTP audio format 8  
Found RTP audio format 101  
Peer audio RTP is at port 192.168.0.173:6000  
Found audio description format PCMA for ID 8  
Found audio description format telephone-event for ID 101  
Capabilities: us - 0x40e (gsm|ulaw|alaw|ilbc), peer - audio=0x8 (alaw)/video=0x0 (nothing), combined - 0x8 (alaw)  
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)  
Peer audio RTP is at port 192.168.0.173:6000  
Looking for 453 in from-sip (domain myproxy)  
list\_route: hop: sip:900@192.168.0.173

\<— Transmitting (no NAT) to 192.168.0.173:5060 —\>  
SIP/2.0 100 Trying  
Via: SIP/2.0/UDP 192.168.0.173;branch=z9hG4bKac891694777;received=192.168.0.173  
From: “Anonymous” sip:900@192.168.0.246;tag=1c891659115  
To: sip:453@myproxy  
Call-ID: [89165870311200003410@192.168.0.173](mailto:89165870311200003410@192.168.0.173)  
CSeq: 2 INVITE  
User-Agent: Asterisk PBX  
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO  
Supported: replaces  
Contact: sip:453@192.168.0.246  
Content-Length: 0

Rajeev.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [November 3, 2009, 1:13pm UTC](https://community.asterisk.org/t/caller-id/25138/8 "2009-11-03T13:13:54Z")

</div>

They are not sending you the caller ID. The only numbers they have are:

453@myproxy which is presumably your DNID value; and  
[900@192.168.0.246](mailto:900@192.168.0.246) which is presumably the account number to which you referred.

If you had the upstream caller ID it would be in this line:

```auto

```

They definitely need to change their end. It is possible that you will need to use insecure=invite, at your end.

Incidentally, you didn’t say that this was Asterisk 1.6.x

---

<div class="post-metadata">

**Author:** ![rajeevsg](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rajeevsg](https://community.asterisk.org/u/rajeevsg)\
**Post date:** [November 3, 2009, 1:30pm UTC](https://community.asterisk.org/t/caller-id/25138/9 "2009-11-03T13:30:04Z")

</div>

Sir,

I am using asterisk 1.4

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [November 3, 2009, 1:45pm UTC](https://community.asterisk.org/t/caller-id/25138/10 "2009-11-03T13:45:00Z")

</div>

I thought the change to using proxy-authenticate was between 1.4 and 1.6. I must have been wrong. It doesn’t matter that much though as you have to get your supplier to change their system first.

It would help to be more precise about which version you are using.

---

<div class="post-metadata">

**Author:** ![rajeevsg](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rajeevsg](https://community.asterisk.org/u/rajeevsg)\
**Post date:** [November 3, 2009, 1:58pm UTC](https://community.asterisk.org/t/caller-id/25138/11 "2009-11-03T13:58:13Z")

</div>

Sir,

900 is the port number on which call receive and 453 is extension on which call is forward.

Rajeev.
