[Asterisk-Dev] report "connected number" ISDN information element upstream..

Andrea Venturi andrea.venturi at tin.it
Wed Mar 19 10:59:07 MST 2003


hi,

we are facing a little issue with regard an in-house developed 
"outbound" application running on asterisk with a E100P on a italian 
euroisdn PRI.

this is an outbound ivr, i.e. asterisk calls a remote user

the problem is that sometimes the outbound call is answered from the 
remote user voice-mail (maybe it's a mobile phone busy with 
"redir-on-busy" feature on..)

we can see on the "pri debug span 1" that we get from the isdn switch an 
Information Element (hence IE) 0x4c acknowledged as an "unknown IE" by 
asterisk. and this IE carries the phone number of the centralized 
voice-mail service...

in itu q931.pdf we can see 0x4c is "Connected number" IE

BTW in libpri/q931.h we can read "Connected address" defined as 0x0c but 
the q931.pdf tells this is a legacy from the past, so we added another 
entry with a simple "dump_ie_data()" entry to see the info this IE is 
carrying.

=== end of the analisys of the status quo ==

now, what we can/want to do..

we'd like to carry this info (the "Connected number") upstream to our 
application, so our app can leverage this knowledge and take some smart 
decision.. (like hangup and don't wait for any reply/DTMF)

we tried to rewrite call->callednum on receiving such an IE, but we were 
unable to observe, for example, the change in the Master.csv..

indeed, we thought  that we could change, with an ast_cdr_update(), the 
cdr->destination field.. no go

then, we were wondering if this was really a good choice, because it 
could change the semantic of the CDR..

let me explain the scenario. we are making outbound calls with asterisk 
for many enterprises and we want to bill each one for the calls done 
from its service.. so we need to "demux" the Master.csv:

- understand which service (app filed in the Master.csv) made the call

- make some pricing based on the "dialed" number (aka destination field 
read on the Master.csv), because in italy the pricing model is based on 
time of the call and prefix of the dialed number;

_but_ if the "connected number" is superimposed to the original 
destination number we'll be unable to make the right price..

maybe it's better to use the cdr->dnid field. what's the scope of this 
field in outbound calls?

otherwise,  it seems we need another field on the Master.csv  to carry 
the connected number, could it be useful?

what do you think about it?

bye

andrea venturi




More information about the asterisk-dev mailing list