[asterisk-dev] Is this a new bug in libpri?
Ricardo Monteiro
ricardo.monteiro at aveiro.nec.pt
Fri Feb 10 08:39:48 MST 2006
Hi,
I have found a behavior that I think it is originated by a
bug. I'm working with asterisk and libpri 1.2.0.
I noticed that, in the situation explained below, strange
user to user information is sent apparently with no reason. I searched
the code and added a log everyplace where the useruserinfo field is
written to see if I understand the reason of it to be added. The result
was that the field was never explicitly written, so I suspected of some
memory overwritten by other parameters.
In fact that appears to be the case, since the user-user info that is
sent consists of the last 5 digits of the caller number. I confirmed
this idea by adding a dummy buffer to type pri_event_hangup (in
libpri.h) just before the field "char useruserinfo[260];", and if the
buffer is 5 bytes, no useruserinfo is sent, if the buffer is less than 5
bytes then some digits of the caller number are sent.
I also noticed that if I called from other phones with different
Presentation information this memory overwritten does not occur. So it
seems a bug in the processing of presentation information.
Is this a new bug? Have anyone fixed it?
The situation is the following:
An incoming call from a PRI ISDN arrives.
If the call is cancelled by the caller, we receive a DISCONNECT that is
interpreted as a hangup request and asterisk sends a RELEASE with the
incorrect useruserinfo.
This situation has occurred from a caller with a presentation of type
"Presentation: Presentation allowed of network provided number (3)"
But does not occur if the caller has a presentation of type
"Presentation: Presentation permitted, user number passed network
screening (1)"
Regards,
Ricardo
START LOG ----------------------------------------
Feb 10 12:45:50 VERBOSE[30545] logger.c: Asterisk Event Logger restarted
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Protocol Discriminator: Q.931
(8) len=35
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Call Ref: len= 2 (reference
29480/0x7328) (Originator)
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Message type: SETUP (5)
Feb 10 12:45:59 VERBOSE[6542] logger.c: < [Feb 10 12:45:59 VERBOSE[6542]
logger.c: < [a1Feb 10 12:45:59 VERBOSE[6542] logger.c: < [a1]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Sending Complete (len= 1)
Feb 10 12:45:59 VERBOSE[6542] logger.c: < [04 03 80 90 a3]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Bearer Capability (len= 5) [
Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
Feb 10 12:45:59 VERBOSE[6542] logger.c: <
Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
Feb 10 12:45:59 VERBOSE[6542] logger.c: <
Ext: 1 User information layer 1: A-Law (35)
Feb 10 12:45:59 VERBOSE[6542] logger.c: < [18 03 a9 83 85]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Channel ID (len= 5) [ Ext: 1
IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
Feb 10 12:45:59 VERBOSE[6542] logger.c: <
ChanSel: Reserved
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Ext: 1
Coding: 0 Number Specified Channel Type: 3
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Ext: 1
Channel: 5 ]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < [6c 0b 00 83 39 31 39 37 38 34
30 39 38]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Calling Number (len=13) [ Ext:
0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
Feb 10 12:45:59 VERBOSE[6542] logger.c: <
Presentation: Presentation allowed of network provided number (3)
'919784098' ]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < [70 04 80 30 32 35]
Feb 10 12:45:59 VERBOSE[6542] logger.c: < Called Number (len= 6) [ Ext:
1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '025' ]
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Making new call for cr 29480
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Processing Q.931 Call Setup
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Processing IE 161 (cs0,
Sending Complete)
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Processing IE 4 (cs0, Bearer
Capability)
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Processing IE 24 (cs0,
Channel Identification)
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Processing IE 108 (cs0,
Calling Party Number)
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Processing IE 112 (cs0,
Called Party Number)
Feb 10 12:45:59 VERBOSE[6542] logger.c: > Protocol Discriminator: Q.931
(8) len=10
Feb 10 12:45:59 VERBOSE[6542] logger.c: > Call Ref: len= 2 (reference
29480/0x7328) (Terminator)
Feb 10 12:45:59 VERBOSE[6542] logger.c: > Message type: CALL PROCEEDING
(2)
Feb 10 12:45:59 VERBOSE[6542] logger.c: > [18 03 a9 83 85]
Feb 10 12:45:59 VERBOSE[6542] logger.c: > Channel ID (len= 5) [ Ext: 1
IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
Feb 10 12:45:59 VERBOSE[6542] logger.c: >
ChanSel: Reserved
Feb 10 12:45:59 VERBOSE[6542] logger.c: > Ext: 1
Coding: 0 Number Specified Channel Type: 3
Feb 10 12:45:59 VERBOSE[6542] logger.c: > Ext: 1
Channel: 5 ]
Feb 10 12:45:59 VERBOSE[6542] logger.c: -- Accepting call from
'919784098' to '025' on channel 0/5, span 1
Feb 10 12:45:59 VERBOSE[6757] logger.c: -- Executing Dial("Zap/5-1",
"SIP/monte1r|10") in new stack
Feb 10 12:45:59 VERBOSE[6757] logger.c: -- Called monte1r
Feb 10 12:45:59 VERBOSE[6757] logger.c: -- SIP/monte1r-dc68 is
ringing
Feb 10 12:45:59 VERBOSE[6757] logger.c: > Protocol Discriminator: Q.931
(8) len=9
Feb 10 12:45:59 VERBOSE[6757] logger.c: > Call Ref: len= 2 (reference
29480/0x7328) (Terminator)
Feb 10 12:45:59 VERBOSE[6757] logger.c: > Message type: ALERTING (1)
Feb 10 12:45:59 VERBOSE[6757] logger.c: > [1e 02 81 88]
Feb 10 12:45:59 VERBOSE[6757] logger.c: > Progress Indicator (len= 4) [
Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private
network serving the local user (1)
Feb 10 12:45:59 VERBOSE[6757] logger.c: >
Ext: 1 Progress Description: Inband information or appropriate pattern
now available. (8) ]
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Protocol Discriminator: Q.931
(8) len=28
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Call Ref: len= 2 (reference
29480/0x7328) (Originator)
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Message type: DISCONNECT (69)
Feb 10 12:46:01 VERBOSE[6542] logger.c: < [08 02 80 90]
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Cause (len= 4) [ Ext: 1
Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Ext: 1
Cause: Unknown (16), class = Normal Event (1) ]
Feb 10 12:46:01 VERBOSE[6542] logger.c: < [28 11 43 48 41 4d 41 44 41 20
44 45 53 4c 49 47 41 44 41]
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Display (len=17) [ CHAMADA
DESLIGADA ]
Feb 10 12:46:01 VERBOSE[6542] logger.c: -- Processing IE 8 (cs0, Cause)
Feb 10 12:46:01 VERBOSE[6542] logger.c: -- Processing IE 40 (cs0,
Display)
Feb 10 12:46:01 VERBOSE[6542] logger.c: -- Channel 0/5, span 1 got
hangup request
Feb 10 12:46:01 VERBOSE[6757] logger.c: == Spawn extension (Network,
025, 1) exited non-zero on 'Zap/5-1'
Feb 10 12:46:01 VERBOSE[6757] logger.c: NEW_HANGUP DEBUG: Calling
q931_hangup, ourstate Disconnect Indication, peerstate Disconnect
Request
Feb 10 12:46:01 VERBOSE[6757] logger.c: > Protocol Discriminator: Q.931
(8) len=17
Feb 10 12:46:01 VERBOSE[6757] logger.c: > Call Ref: len= 2 (reference
29480/0x7328) (Terminator)
Feb 10 12:46:01 VERBOSE[6757] logger.c: > Message type: RELEASE (77)
Feb 10 12:46:01 VERBOSE[6757] logger.c: > [08 02 81 90]
Feb 10 12:46:01 VERBOSE[6757] logger.c: > Cause (len= 4) [ Ext: 1
Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network
serving the local user (1)
Feb 10 12:46:01 VERBOSE[6757] logger.c: > Ext: 1
Cause: Unknown (16), class = Normal Event (1) ]
Feb 10 12:46:01 VERBOSE[6757] logger.c: > [7e 06 04 38 34 30 39 38]
Feb 10 12:46:01 VERBOSE[6757] logger.c: > User-User Information (len= 8)
[ 04 38 34 30 39 38 ]
Feb 10 12:46:01 VERBOSE[6757] logger.c: -- Hungup 'Zap/5-1'
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Protocol Discriminator: Q.931
(8) len=5
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Call Ref: len= 2 (reference
29480/0x7328) (Originator)
Feb 10 12:46:01 VERBOSE[6542] logger.c: < Message type: RELEASE COMPLETE
(90)
Feb 10 12:46:01 VERBOSE[6542] logger.c: NEW_HANGUP DEBUG: Calling
q931_hangup, ourstate Null, peerstate Null
Feb 10 12:46:01 VERBOSE[6542] logger.c: NEW_HANGUP DEBUG: Destroying the
call, ourstate Null, peerstate Null
END LOG -------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060210/71e405e1/attachment.htm
More information about the asterisk-dev
mailing list