How to get the line id in the dialplan

Hey,

How can I retieve the calling users SIP line ID in the dialplan? I’ve tried using the CALLERID mehotd but it only gives me the users preferred caller ID. Say I have 2 SIP lines in sip.conf:

[code]310
callerid=“Kevin” <310>

9310
callerid=“Kevin” <310>
[/code]
(these are both the same user but the one preset with 9 is for connecting in from home)

When I’m adding these to a queue I meed to be able to retrieve “9310” but can’t find a way to do this. CALLERID(num) only gives me “310” all the time.

Thanks in advance,
Kev

Parse it out of the channel name, or use the CHANNEL function. I think the option is something like sippeer.

You can also set channel variables, in sip.conf.

Note best practice is that device names bear no resemblance to the directory (extension) number.