DIALEDPEERNUMBER

This variable should contain the number of the called party. Unfortunately it is broken for now and only contains the second part of the internal/temporary channel information (the part after the technology ie gs1-8b21 if the DIALEDPEERNAME was 'SIP/gs1-8b21).
See bug 0002590 on http://bugs.digium.com

Workaround for SIP:

exten => s,1,Answer
exten => s,2,Set(FOO1=${CHANNEL:4})
exten => s,3,Set(FOO1=${CUT(FOO1,-,1})

; FOO1 will now contain the dialed peernumber of the current SIP channel. peernumber must not have a "-" in it though.
; Let's say peernumber is 555, you'd then jump to the extension like this:

exten => s,4,Goto(${FOO1},1)

exten => 555,1,DoWhatever

This variable should contain the number of the called party. Unfortunately it is broken for now and only contains the second part of the internal/temporary channel information (the part after the technology ie gs1-8b21 if the DIALEDPEERNAME was 'SIP/gs1-8b21).
See bug 0002590 on http://bugs.digium.com

Workaround for SIP:

exten => s,1,Answer
exten => s,2,Set(FOO1=${CHANNEL:4})
exten => s,3,Set(FOO1=${CUT(FOO1,-,1})

; FOO1 will now contain the dialed peernumber of the current SIP channel. peernumber must not have a "-" in it though.
; Let's say peernumber is 555, you'd then jump to the extension like this:

exten => s,4,Goto(${FOO1},1)

exten => 555,1,DoWhatever

Created by: fredo, Last modification: Thu 04 of Nov, 2010 (05:31 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+