Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Variable NameDescriptionScope
nj.TargetMatch

When a call is initially routed or Gosub is called the value in nj.DialTarget is used to pattern match against possible Target Matches in the context.  When a specific Target Match is selected 'nj.TargetMatch' is set to the value of the Target Match that matched the DialTarget.

e.g. nj.DialTarget might be: 03 8320 8100 but nj.TargetMatch might be 03 XXXX XXXX.

Gosub
nj.DialedNo

The number that was dialed to cause the current call. For an inbound call this will be the DID for an outbound call this will be the no. dialed from the staff members handset.

The dialed no. will not change over the life of a call.

Call
nj.SourceRealm

Set by the Trunk through which the call entered the system. Even calls from internal extensions (handsets) enter Routes via a Trunk.

The Realm is used to determine the direction of the call. The system uses the Source realm and the Delivered To realm to determine the direction of the call. The systems ability to determine a calls direction is important when determining whether a call should be recorded for an Account as well as for general reporting purposes.

It should be noted that superficially it would appear to be quite easy to determine a calls direction however in practices it can be quite complicated as a call can actually changed direction mid way through the call.

Realms are INTERNAL,EXTERNAL

Call
nj.Direction

Reflects the direction of the call.

The direction of a call is not as simple as it might look as a call can changed directions as the call progresses.

e.g. an inbound call is re-routed to an external call. It then becomes a 'PASS_THRU' call.


  • INTERNAL - call between two handsets
  • OUTBOUND - call to an outside number
  • PASS_THRU - a call that has passed into then out of the system.
  • INBOUND - a call from an external party into the system.

nj.SourceNo

Set by the core routing each time a call is originated. For inbound calls this is the caller id, for calls dialed from a handset this is the handset extension no.

This does not change during the life of the call.


Call

nj.DialTarget

The DialTarget typically starts out with the same value as the 'nj.DialedNo' but unlike nj.DialedNo the variable nj.DialTarget is updated each time the Gosub command is called. nj.DialTarget is updated to match the second argument of the Gosub command (context, dialTarget).

When a Gosub returns it will reset the nj.DialTarget variable to the value it was before Gosub was called.

Gosub
nj.CompanyName

Contains the value of the system variable which contains the Company Name of the organisation that the PBX runs for.


nj.SupportEmailContains the value of the system variable SupportEmail - the email address that support emails are sent to.
nj.AdministratorEmailContains the value of the system variable AdministratorEmail - the email address that admin emails are sent to.

Target

A Target can be a phone no., a pattern or an alphabetical literal.
A Target pattern is a used to match Targets consisting of digits only.

...