How to find the callerID and CalledId?


I am workin with Avaya(S8700) and Asterisk Integration for voicemail.
I have done with [color=red]h323 (and QSIG enabled)[/color] trunk and voice is working fine on both ends. In h323 trunking i am using QSIG.

Now I have the following scenario:
[color=red]Scenario: [/color]

  1. 3301 calls 3302 (both on Avaya)
  2. 3302 doesn’t pick the call.
  3. Route the call to an Asterisk (voicemail) number 1111 using a coverage path(Avaya internally uses QSIG for sending the signals).

[color=red]Problem is: [/color]

  1. how to send 3301, 3302 (source and destination on Avaya) to asterisk?

  2. how to read 3301 (as source) and 3302 (as destination) from Asterisk?

[color=red]Is there any special settings to be done on the trunk or the signaling group to get both caller and called number ? And is there any setting to be done on asterisk for QSIG ?[/color]

Is there any other way of finding the caller ID(3301) and called ID(3302) on the asterisk end?

I am getting the folling output on the asterisk side:

variable used: value received:
${CALLERID(all)} “” <>
${CALLERID(dnid)} 1111

Any helping pointer will be appreciated.

Thanks in advance.