Displaying Dialled Number

Hi,

I am trying to get the dialed number to display on our sip phones.

We are reciving calls over an IAX2 trunk.

I have tried

exten => _X.,n,SetCallerID(${CALLERIDNUM} <${DNID}>)

but that didn’t work :frowning:

I heard that
exten => s,1,NoOp(${SIP_HEADER(TO)})
works - but not on an IAX2 trunk!

Is this easy to do?

My client has two companies with 2 numbers VOIP trunks and he would like to have calls treated differently in the dial plan depending on number dialled.

I noticed that the info I want is displayed when the call hangs up.
== Spawn extension (from-gradwell-01753, 01753208000, 6) exited non-zero on ‘IAX2/gradwell-1’
– Hungup 'IAX2/gradwell-1’
localhost*CLI>

any help appreciated.

I turned on IAX2 debugging and the info I want is displayed - I just need to get it into a variable!

Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW
Timestamp: 00013ms SCall: 00004 DCall: 00000 [193.121.201.100:4569]
VERSION : 2
CALLED NUMBER : 01753208000
CODEC_PREFS : ()
CALLING NUMBER : 07962404466
CALLING PRESNTN : 0
CALLING TYPEOFN : 0
CALLING TRANSIT : 0
CALLING NAME :
LANGUAGE : en
USERNAME : abcuser
FORMAT : 8
CAPABILITY : 65407
ADSICPE : 2
DATE TIME : 2007-09-28 21:44:30

Hi,

For the record this was solved using… ${EXTEN}

So simple!

Thanks to Gordon at Drogon via usenet.