How to set Original Called number in asterisk

can any one suggest on how to set Original Called number in asteirsk?

Else please suggest how to set the Redirecting number in asterisk dialplan.

I tried to set with SS7_ORIG_CALLED_NUM, but no number was captured on the ISUP Parameters.

Can you explain in detail what you want to do and also paste your dialplan. If you want to get the called number of the incoming call then you can get it as below.

exten => 1234,1,Set(CALLED_NUM=${CALLERID(dnid)})
exten => 1234,2,Noop(Called Number … ${CALLED_NUM})

Hi Daniel,

Thanks for the info.

In my case, I am dialing to a customer if he answers the call and press * then i will divert him to another short code.

This flow is working.

On the operator side, After diverting the call they need Three parameters like my orginating CLI, Customer number and short code i dialled to. On the Operator side, they are able to get the originating CLI and short code but not the Customer number.

Please suggest how to send the Customer number as well to the Operator.

Below is the dialplan to do the same.

exten => 11,1,Answer()
exten => 11,2,Background(Airtel_Radio_Main)
exten => 11,3,WaitExten(4)
exten => 11,4,Background(Airtel_Radio_Main)
exten => 11,5,WaitExten(6)
exten => *,1,Set(CALLERID(num)=1234567890)
exten => *,n,Set(SS7_ORIG_CALLED_NUM=0${ID})
exten => *,n,NoOp(${SS7_ORIG_CALLED_NUM})
exten => *,n,MixMonitor(/var/spool/asterisk/${ID}.wav)
exten => *,n,Set(CALLERPRES()=allowed)
exten => *,n,Dial(Dahdi/g1/55555)
exten => *,n,Hangup()

Have we eliminated the obvious choice of saving the information in channel variables?

Else suggest me a solution with how to redirect a call to external number with redirection counter and redirecting number on isup using libss7 with asterisk dialplan.

Thanks for all the support.

Atlast we got the solution for this.

This can be done by adding the below trunk patches

observer.router.hu/repos_pub/libss7/trunk
observer.router.hu/repos_pub/chan_dahdi/trunk

In Dialplan, Set the following Variables
exten => *,1,Set(_SS7_LSPI_IDENT=ON)
exten => *,2,Set(_SS7_SEND_FAR=1)
exten => *,3,Set(_SS7_RLT_ON=YES)
exten => *,4,Set(_SS7_REDIRECTING_NUMBER=9876543210)
exten => *,5,set(_SS7_ORIG_CALLED_NUM=9876543210)
exten => *,6,set(_SS7_REDIRECT_COUNTER=1)
exten => *,7,set(_SS7_REDIRECT_INFO_INDICATOR=1)
exten => *,8,set(CALLERID(num)=1234567890)
exten => *,9,Set(CALLERPRES()=allowed)
exten => *,10,Dial(Dahdi/300/12345)