TON Always Unknown In RDNIS (outgoing Calls)

Home » Asterisk Users » TON Always Unknown In RDNIS (outgoing Calls)
Asterisk Users 2 Comments


first of all, this is my first time asking for advice on this mailing list, so I apologize and thank in advance for your help. Also, besides having access to rather advanced equipment, maybe some of the terms I will use will be incorrect or ambiguous. I hope to be able to clarify any doubt you should have about it.

I am currently in the process of upgrading a SIP/TDM gateway from Asterisk
1.4.23 to 1.8.17. The gateway is designed to terminate SIP calls via TDM
through a switching equipment. Among the features for this gateway there is handling for redirected calls, i.e. populating the outgoing RDNIS with information from custom SIP headers.

In the past, (Asterisk 1.4.23, DAHDI 2.6.1, libPRI 1.4.12) this was accomplished by setting CALLERID(RDNIS) and PRIREDIRECTREASON in the dialplan. Tracing on the switching equipment, I noticed that the REDIRECTING party had:
– TON as set in DAHDI’s prilocaldialplan
– Presentation indicator always “allowed”
– Reason as set in PRIREDIRECTREASON
– Redirecting Party Number as set in CALLERID(RDNIS)

In the new setup (Asterisk 1.8.17, DAHDI 2.6.1, libPRI 1.4.12) I am instead using:
– REDIRECTING(from-num) to set the redirecting party number
– REDIRECTING(from-num-plan) to set the NPI (to numeric value 1 – ISDN),
because by default it was set to 0 – unknown
– REDIRECTING(from-num-pres) to set the Presentation Indicator
– REDIRECTING(reason) to set the redirecting reason

Everything seems fine, and using the new REDIRECTING function I have also gained control on the Presentation Indicator (which was previously fixed), but the RDNIS seems always to have TON unknown (instead of what specified in prilocaldialplan – international). Is there a specific way to manually set the TON as I did with the NPI, or is there some known issue with this mechanism?

Thanks again in advance for your help.


2 thoughts on - TON Always Unknown In RDNIS (outgoing Calls)

  • The REDIRECTING(from-num-plan) has both type-of-number and numbering-plan fields. The value is the lower 7 bits of the Q.931
    type-of-number/numbering-plan-identification octet. So for international ton and ISDN numbering plan, you would set the value to 17.


  • 2012/10/24 Richard Mudgett :

    Thank you Richard, your advice worked perfectly and for sure saved me and my poor skills some “digging”. I truly appreciate it.

    Best regards