[asterisk-dev] Is this a new bug in libpri?
Ricardo Monteiro
ricardo.monteiro at aveiro.nec.pt
Mon Feb 13 08:04:33 MST 2006
Ok, I understand you're going to review the user-user info handling, but in my case disabling it is not an option.
I just want to call your attention that I don't think the bug is in user-user info processing but on other part of the code.
In the problem I'm experiencing there is no user-user received from outside, it is asterisk that is self generating a user-user information and sending it with RELEASE message.
I get the felling that useruserinfo memory buffer is overwritten and this result in asterisk interpreting that it has some valid info to send.
In my opinion if it was a bug in sending user-user information, adding the dummy buffer to the structure below (in libpri.h) would not affect the behavior.
In the current case if I add the dummy buffer there is no abnormal behavior, everything works fine.
typedef struct pri_event_hangup {
int e;
int channel; /* Channel requested */
int cause;
int cref;
q931_call *call; /* Opaque call pointer */
long aoc_units; /* Advise of Charge number of charged units */
char dummy[6];
char useruserinfo[260]; /* User->User info */
} pri_event_hangup;
I think for now I will leave with the dummy buffer until somebody (or myself) figure it out...
Regards,
Ricardo
-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Matthew Fredrickson
Sent: sexta-feira, 10 de Fevereiro de 2006 17:49
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Is this a new bug in libpri?
Kevin found a few problems with how we generate user to user IEs and
how they are received, so we disabled them for now. The suggested work
around right now is to upgrade to 1.2.4, where they are disabled until
I get a chance to figure out what's wrong.
Matthew Fredrickson
On Feb 10, 2006, at 9:39 AM, Ricardo Monteiro wrote:
> 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)"
>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list