[asterisk-dev] Passing out-of-band data in PRI call setup?

Tony Mountifield tony at softins.clara.co.uk
Wed Mar 5 09:40:41 CST 2008


In article <fqlrbl$bsv$1 at softins.clara.co.uk>,
Tony Mountifield <tony at softins.clara.co.uk> wrote:
> I'm posting this to -dev because I would expect that if what I'm asking
> about is possible, it would require code changes to libpri and Asterisk
> to achieve it.
> 
> Given two Asterisk boxes connected to ISDN PRI trunks, assuming that the
> PSTN switches between them are compatible, is it theoretically possible
> for one box making a call to the other to pass out-of-band data related
> to the call as part of the call setup. Something like a sub-address,
> extension number or other token.
> 
> The scenario I am thinking of is where one of the boxes makes two
> simultaneous calls to the other box. The caller ID and called number
> would be the same for both calls. I am looking for some way for the
> called box to distinguish between the two calls, by having some kind
> of token with each call. Is there any kind of IE in Q.931 that could
> carry such a token and would be passed through intermediate switches
> along with the call setup?

Well, having dome some more digging, I have discovered that there is such
a facility, although it is disabled by default in Asterisk. There is a
User-User information element that can be used to carry an arbitrary
string of text from the caller to the called party. This is accessed
using the channel variable USERUSERINFO.

First it is necessary to edit chan_zap.c and change:

#undef SUPPORT_USERUSER

to:

#define SUPPORT_USERUSER

and then recompile Asterisk.

*** Why is SUPPORT_USERUSER not defined by default?
If USERUSERINFO is not set, then the User-User IE is not sent anyway,
so surely having it on by default doesn't hurt anything.

Then in the dialplan, set _USERUSERINFO before calling dial:

exten => _X.,n,Set(_USERUSERINFO=whatever is needed)
exten => _X.,n,Dial(Zap/g1/${EXTEN})

On the called system, the inbound channel will have USERUSERINFO set to
"whatever is needed":

exten => _X.,1,NoOp(USERUSERINFO=${USERUSERINFO})
exten => _X.,n,Answer
 etc...

I have tested this between two cross-connected PRI ports, but now need
to make sure it really gets passed through the public PSTN in the UK.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list