Getting DNID Number

Hi All,

Actually I want to get the DNID (Dialed Number Identifier) through AMI (Asterisk Manager Interface) in Incoming Call. Anyone tell me How can get it ?

Is there any tricks to indetify it ?

The reason is I have 1 voip trunk line with 4 DIDs (Direct Inward Dial Number) and all calls routed to the specific operator extension like 100. Once the Call land on 100 extension I want to give the Popup with DNID number. User will greet the incomig call as per the Popup DNID number.

Is there have any idea, please let me know.

Thanks & Regards,

Ketan

Why AMI, maybe AGI

This is what’s being sent to example.php when 1000 is calling 0216546546

agi_request: example.php
agi_channel: SIP/XXX-0000006a
agi_language: en
agi_type: SIP
agi_uniqueid: 1336390054.204
agi_version: 1.8.11.0
agi_callerid: 1000
agi_calleridname: Asterisk
agi_callingpres: 0
agi_callingani2: 0
agi_callington: 0
agi_callingtns: 0
agi_dnid: 0216546546
agi_rdnis: unknown
agi_context: phones
agi_extension: 0216546546
agi_priority: 2
agi_enhanced: 0.0
agi_accountcode: KKK
agi_threadid: 140386115872512

Hope this helps.

You might be able to sort out your issue (not sure exactly what you’re after) from the dialplan (extensions.conf)

Hi,

Thanks for your reply.

I know through AGI I can get the DNID number. But, I need the DNID number through AMI Interface.

Thats why I am looking which event will provide this information.

Regards,

Ketan

Hi,

newchannel, newstate, dial are the events.

I think you can get your information only by listening to dial