[asterisk-dev] Set and get Information Elements (IE)

Yves A. yves030 at gmx.de
Thu Aug 16 10:05:16 CDT 2012


[...snip...]

You have to edit channels/sig_pri.c and define SUPPORT_USERUSER for the 
code that handles the user-user information to be in the compiled code. 
To get/set the user-user information is via the channel variable 
USERUSERINFO. Since it is normally not compiled into the code it has 
very little testing.
Richard

Hello Richard,

unfortunately I can`t modify our productive 1.8 asterisk... I have two 
other machines running
asterisk 1.6.1.1 with dahdi.
I looked @ the source and found channels/chan_dahdi.c, in this file I 
changed the line

#undef SUPPORT_USERUSER

into

#define SUPPORT_USERUSER

and recompiled with make / make install.
After that both asterisks where running as before, nothing broken, but 
my changes in the dialplan
had no effect. The call is made, I hear the announcement (1-2-3), but I 
was not able to transfer data
between the two machines... when I trace the isdn-communication I also 
do not see, that my data
package gets send and therefore of cource not received.
Did I forget any prerequisites? Do I have to modify my dahdi-settings in 
any ways?

Thats what I do on "sender" side:

[uuitest]
exten => _X.,1,Set(CALLERID(name)=Yves)
exten => _X.,n,Set(CALLERID(num)=621123456)
exten => _X.,n,Set(USERUSERINFO=11111111110000000000222222222233)
exten => _X.,n,Dial(DAHDI/g0/${EXTEN})


and on "receiver" side:
[from-pstn]
exten => 832113403,1,Answer()
exten => 832113403,n,Verbose(CallerId all: ${CALLERID(all)});
exten => 832113403,n,Verbose(CallerId num: ${CALLERID(num)});
exten => 832113403,n,Verbose(CallerId name: ${CALLERID(name)});
exten => 832113403,n,Verbose(UUI: ${USERUSERINFO});
exten => 832113403,n,Verbose(DNID: ${DNID});
exten => 832113403,n,Saydigits(123);
exten => 832113403,n,Hangup();



the senders ISDN trace looks like this:

asterisk*CLI> pri intensive debug span 1
Enabled EXTENSIVE debugging on span 1
T203 counter expired, sending RR and scheduling T203 again
Sending Receiver Ready (0)

 > [ 00 01 01 01 ]

 > Supervisory frame:
 > SAPI: 00  C/R: 0 EA: 0
 >  TEI: 000        EA: 1
 > Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
 > N(R): 000 P/F: 1
 > 0 bytes of data
asterisk*CLI>
< [ 02 01 01 fb ]

< Supervisory frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
< N(R): 125 P/F: 1
< 0 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 124 to (but not including) 125
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
-- Unsolicited RR with P/F bit, responding
Sending Receiver Ready (0)

 > [ 02 01 01 01 ]

 > Supervisory frame:
 > SAPI: 00  C/R: 1 EA: 0
 >  TEI: 000        EA: 1
 > Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
 > N(R): 000 P/F: 1
 > 0 bytes of data
-- Restarting T203 timer
asterisk*CLI>
< [ 00 01 01 fb ]

< Supervisory frame:
< SAPI: 00  C/R: 0 EA: 0
<  TEI: 000        EA: 1
< Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
< N(R): 125 P/F: 1
< 0 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 124 to (but not including) 125
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
-- Got RR response to our frame
-- Restarting T203 timer
   == Using SIP RTP CoS mark 5
     -- Executing [030832113403 at uuitest:1] Set("SIP/777-0a16b4f0", 
"CALLERID(name)=Yves") in new stack
     -- Executing [030832113403 at uuitest:2] Set("SIP/777-0a16b4f0", 
"CALLERID(num)=621123456") in new stack
     -- Executing [030832113403 at uuitest:3] Set("SIP/777-0a16b4f0", 
"USERUSERINFO=11111111110000000000222222222233") in new stack
     -- Executing [030832113403 at uuitest:4] Dial("SIP/777-0a16b4f0", 
"DAHDI/g0/030832113403") in new stack
-- Making new call for cr 32791
     -- Requested transfer capability: 0x00 - SPEECH
-- Finally transmitting 125, since window opened up (0)

 > [ 00 01 fa 00 08 02 00 17 05 04 03 80 90 a3 18 03 a9 83 81 6c 0b 21 
80 36 32 31 31 32 33 34 35 36 70 0d 80 30 33 30 38 33 32 31 31 33 34 30 
33 a1 ]

 > Informational frame:
 > SAPI: 00  C/R: 0 EA: 0
 >  TEI: 000        EA: 1
 > N(S): 125   0: 0
 > N(R): 000   P: 0
 > 44 bytes of data
Stopping T_203 timer
Starting T_200 timer
-- Restarting T200 timer
 > Protocol Discriminator: Q.931 (8)  len=44
 > Call Ref: len= 2 (reference 23/0x17) (Originator)
 > Message type: SETUP (5)
 > [04 03 80 90 a3]
 > Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
capability: Speech (0)
 >                              Ext: 1  Trans mode/rate: 64kbps, 
circuit-mode (16)
 >                                User information layer 1: A-Law (35)
 > [18 03 a9 83 81]
 > Channel ID (len= 5) [ Ext: 1  IntID: Implicit  PRI  Spare: 0  
Exclusive  Dchan: 0
 >                        ChanSel: As indicated in following octets
 >                       Ext: 1  Coding: 0  Number Specified Channel Type: 3
 >                       Ext: 1  Channel: 1 ]
 > [6c 0b 21 80 36 32 31 31 32 33 34 35 36]
 > Calling Number (len=13) [ Ext: 0  TON: National Number (2) NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
 >                           Presentation: Presentation permitted, user 
number not screened (0)  '621123456' ]
 > [70 0d 80 30 33 30 38 33 32 31 31 33 34 30 33]
 > Called Number (len=15) [ Ext: 1  TON: Unknown Number Type (0)  NPI: 
Unknown Number Plan (0)  '030832113403' ]
 > [a1]
 > Sending Complete (len= 1)
q931.c:3134 q931_setup: call 32791 on channel 1 enters state 1 (Call 
Initiated)
     -- Called g0/030832113403
asterisk*CLI>
< [ 00 01 01 fc ]

< Supervisory frame:
< SAPI: 00  C/R: 0 EA: 0
<  TEI: 000        EA: 1
< Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
< N(R): 126 P/F: 0
< 0 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 124 to (but not including) 126
-- ACKing packet 125, new txqueue is -1 (-1 means empty)
-- Since there was nothing left, stopping T200 counter
-- Nothing left, starting T203 counter
-- Restarting T203 timer
asterisk*CLI>
< [ 02 01 00 fc 08 02 80 17 02 18 03 a9 83 81 ]

< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< N(S): 000   0: 0
< N(R): 126   P: 0
< 10 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 125 to (but not including) 126
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=10
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 03 a9 83 81]
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit  PRI  Spare: 0  
Exclusive  Dchan: 0
<                        ChanSel: As indicated in following octets
<                       Ext: 1  Coding: 0  Number Specified Channel Type: 3
<                       Ext: 1  Channel: 1 ]
-- Processing IE 24 (cs0, Channel Identification)
q931.c:3683 q931_receive: call 32791 on channel 1 enters state 3 
(Outgoing call  Proceeding)
Sending Receiver Ready (1)

 > [ 02 01 01 02 ]

 > Supervisory frame:
 > SAPI: 00  C/R: 1 EA: 0
 >  TEI: 000        EA: 1
 > Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
 > N(R): 001 P/F: 0
 > 0 bytes of data
-- Restarting T203 timer
     -- DAHDI/1-1 is proceeding passing it to SIP/777-0a16b4f0
asterisk*CLI>
< [ 02 01 02 fc 08 02 80 17 07 1e 02 81 82 29 05 0c 08 10 0e 12 ]

< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< N(S): 001   0: 0
< N(R): 126   P: 0
< 16 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 125 to (but not including) 126
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=16
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: CONNECT (7)
< [1e 02 81 82]
< Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard 
(0)  0: 0  Location: Private network serving the local user (1)
<                               Ext: 1  Progress Description: Called 
equipment is non-ISDN. (2) ]
< [29 05 0c 08 10 0e 12]
< Time Date (len= 7) [ 12-08-16 14:18 ]
-- Processing IE 30 (cs0, Progress Indicator)
-- Processing IE 41 (cs0, Date/Time)
q931.c:3626 q931_receive: call 32791 on channel 1 enters state 10 (Active)
-- Finally transmitting 126, since window opened up (0)

 > [ 00 01 fc 04 08 02 00 17 0f ]

 > Informational frame:
 > SAPI: 00  C/R: 0 EA: 0
 >  TEI: 000        EA: 1
 > N(S): 126   0: 0
 > N(R): 002   P: 0
 > 5 bytes of data
Stopping T_203 timer
Starting T_200 timer
-- Restarting T200 timer
 > Protocol Discriminator: Q.931 (8)  len=5
 > Call Ref: len= 2 (reference 23/0x17) (Originator)
 > Message type: CONNECT ACKNOWLEDGE (15)
-- Restarting T203 timer
     -- DAHDI/1-1 answered SIP/777-0a16b4f0

< [ 00 01 01 fe ]

< Supervisory frame:
< SAPI: 00  C/R: 0 EA: 0
<  TEI: 000        EA: 1
< Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
< N(R): 127 P/F: 0
< 0 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 125 to (but not including) 127
-- ACKing packet 126, new txqueue is -1 (-1 means empty)
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
-- Restarting T203 timer
asterisk*CLI>
< [ 02 01 04 fe 08 02 80 17 45 08 02 81 90 1c 15 91 a1 12 02 02 73 b0 02 
01 24 30 09 30 07 a1 05 30 03 02 01 01 1e 02 82 88 ]

< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< N(S): 002   0: 0
< N(R): 127   P: 0
< 36 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 126 to (but not including) 127
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=36
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: DISCONNECT (69)
< [08 02 81 90]
< Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) Spare: 0  
Location: Private network serving the local user (1)
<                  Ext: 1  Cause: Normal Clearing (16), class = Normal 
Event (1) ]
< [1c 15 91 a1 12 02 02 73 b0 02 01 24 30 09 30 07 a1 05 30 03 02 01 01]
< Facility (len=23, codeset=0) [ 0x91, 0xA1, 0x12, 0x02, 0x02, 's', 
0xB0, 0x02, 0x01, '$0', 0x09, '0', 0x07, 0xA1, 0x05, '0', 0x03, 0x02, 
0x01, 0x01
PROTOCOL 11
A1 0012 (CONTEXT SPECIFIC [1])
   02 0002 73 B0 (INTEGER: 29616)
   02 0001 24 (INTEGER: 36)
   30 0009 (SEQUENCE)
     30 0007 (SEQUENCE)
       A1 0005 (CONTEXT SPECIFIC [1])
         30 0003 (SEQUENCE)
           02 0001 01 (INTEGER: 1)
< [1e 02 82 88]
< Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard 
(0)  0: 0  Location: Public network serving the local user (2)
<                               Ext: 1  Progress Description: Inband 
information or appropriate pattern now available. (8) ]
-- Processing IE 8 (cs0, Cause)
-- Processing IE 28 (cs0, Facility)
Handle Q.932 ROSE Invoke component
   [ Handling operation 36 ]
-- Processing IE 30 (cs0, Progress Indicator)
q931.c:3826 q931_receive: call 32791 on channel 1 enters state 12 
(Disconnect Indication)
Sending Receiver Ready (3)

 > [ 02 01 01 06 ]

 > Supervisory frame:
 > SAPI: 00  C/R: 1 EA: 0
 >  TEI: 000        EA: 1
 > Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
 > N(R): 003 P/F: 0
 > 0 bytes of data
-- Restarting T203 timer
     -- Channel 0/1, span 1 got hangup request, cause 16
     -- Channel 0/1, span 1 received AOC-E charging 1 unit
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, 
peerstate Disconnect Request
q931.c:2967 q931_release: call 32791 on channel 1 enters state 19 
(Release Request)
-- Finally transmitting 127, since window opened up (0)
asterisk*CLI>
 > [ 00 01 fe 06 08 02 00 17 4d 08 02 81 90 ]
asterisk*CLI>
 > Informational frame:
 > SAPI: 00  C/R: 0 EA: 0
 >  TEI: 000        EA: 1
 > N(S): 127   0: 0
 > N(R): 003   P: 0
 > 9 bytes of data
Stopping T_203 timer
Starting T_200 timer
-- Restarting T200 timer
 > Protocol Discriminator: Q.931 (8)  len=9
 > Call Ref: len= 2 (reference 23/0x17) (Originator)
 > Message type: RELEASE (77)
 > [08 02 81 90]
 > Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) Spare: 0  
Location: Private network serving the local user (1)
 >                  Ext: 1  Cause: Normal Clearing (16), class = Normal 
Event (1) ]
     -- Hungup 'DAHDI/1-1'
   == Spawn extension (uuitest, 030832113403, 4) exited non-zero on 
'SIP/777-0a16b4f0'
asterisk*CLI>
< [ 00 01 01 00 ]

< Supervisory frame:
< SAPI: 00  C/R: 0 EA: 0
<  TEI: 000        EA: 1
< Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
< N(R): 000 P/F: 0
< 0 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 126 to (but not including) 0
-- ACKing packet 127, new txqueue is -1 (-1 means empty)
-- Since there was nothing left, stopping T200 counter
-- Nothing left, starting T203 counter
-- Restarting T203 timer
asterisk*CLI>
< [ 02 01 06 00 08 02 80 17 5a ]

< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000        EA: 1
< N(S): 003   0: 0
< N(R): 000   P: 0
< 5 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 127 to (but not including) 0
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=5
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: RELEASE COMPLETE (90)
q931.c:3766 q931_receive: call 32791 on channel 1 enters state 0 (Null)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
Sending Receiver Ready (4)

 > [ 02 01 01 08 ]

 > Supervisory frame:
 > SAPI: 00  C/R: 1 EA: 0
 >  TEI: 000        EA: 1
 > Zero: 0     S: 0 01: 1  [ RR (receive ready) ]
 > N(R): 004 P/F: 0
 > 0 bytes of data
-- Restarting T203 timer
asterisk*CLI> pri no debug span 1
Disabled debugging on span 1


and finally the dahdi configuration looks like this:

[channels]
usecallerid=yes
callwaiting=no
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=no
echocancelwhenbridged=no
rxgain=3.0
txgain=3.0
group=1
callgroup=1
pickupgroup=1

; Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" (MASTER) HDB3/CCS/CRC4 
ClockSource
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63

As always... any hints are highly appreciated and thanks very much for 
reading and helping!

Yves

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120816/05e2bb0c/attachment-0001.htm>


More information about the asterisk-dev mailing list