# Dynamic dialplan - how to get peer definition as variable

Hello,

i’m trying to configure a dynamic dialplan for asterisk. Therefor i need access to the names of peer definitions in sip.conf of a calling sip peer.

example:

``````sip.conf

[alice]
context=from-internal
type=friend
.
.
.
and so on
``````

If peer alice is calling i can use some predefined variables from asterisk like \${CALLERID} in extensions.conf. But it seems that none of these (http://www.voip-info.org/wiki-Asterisk+variables) represents this peer definition name of the calling peer. Are there some more variables or asterisk applications/functions to get the name of the calling peer?