<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<BR>> which libss7 version are you looked into<BR>
<BR>
I am in fact looking in to your version checked out using the following:<BR>
<BR>
svn co <A href="https://observer.router.hu/repos_pub/libss7/trunk">https://observer.router.hu/repos_pub/libss7/trunk</A> libss7<BR>
<BR>
<BR>
> I'm using mine and have tons<BR>> of incomming calls with SAM.<BR>
<BR>
I know that you have tons of INCOMMING calls with SAM but I am reporting a bug in sending SAMs NOT receiving SAMs :-)<BR>
<BR>
libss7 is currently not programmed to initiate OUTGOING calls with SAM, but I think the code should be correct any way.<BR>
<BR>
<BR>> regards,<BR>> Attila<BR>
<BR>
Thank you Attila! You're so kind to share your code and provide help!<BR>
<BR>
regards, <BR>
Tian<BR>
<BR>> <BR>> On Tue, 2009-10-20 at 20:32 +0800, Tian wrote:<BR>> > Hi guys,<BR>> > <BR>> > I am reading libss7 source code and I think I've found a bug in it, <BR>> > following is my description of the bug and my tentative fix to the bug, as I <BR>> > don't have a running Asterisk box, I hope you will kindly help me check it, <BR>> > thanks!<BR>> > <BR>> > According to ITU-T Recommendation Q.763, section 1.6 'Mandatory variable <BR>> > part':<BR>> > <BR>> > "A pointer is also included to indicate the beginning of the optional part. <BR>> > If the message type indicates that no optional part is allowed, then this <BR>> > pointer will not be present. If the message type indicates that an optional <BR>> > part is possible, but there is no optional part included in this particular <BR>> > message, then a pointer field containing all zeros will be used."<BR>> > <BR>> > Thus, ISUP messages that don't carry any optionals fall into two categories: <BR>> > 1) those include a 'Pointer to start of optional part' containing all zeros <BR>> > (e.g., SAM falls into this category) and 2) those don't include a 'Pointer <BR>> > to start of optional part'.<BR>> > <BR>> > libss7 can only correctly construct ISUP messages carrying zero optional <BR>> > parameters that fall into category 2) if messages that fall into category 1) <BR>> > are to be constructed, libss7 will fail.<BR>> > <BR>> > The bug shows up in the file isup.c (Libss7 trunk revison 272, lines <BR>> > 2425-2432), my fix to this bug specifically for SAM is as follows (you may <BR>> > adopt the fix by replacing everyting between the fisrt and the last two <BR>> > comment lines):<BR>> > <BR>> > /* Make sure we grab our opional parameters */<BR>> > if (optparams || (messagetype == ISUP_SAM)) {<BR>> > if (optparams)<BR>> > opt_ptr = &mh->data[offset + varparams];<BR>> > /* a SAM message doesn't have any optionals,<BR>> > * but the 'Pointer to start of optional part' is still present<BR>> > */<BR>> > offset += varparams + 1; /* add one for the optionals */<BR>> > len -= varparams + 1;<BR>> > } else {<BR>> > offset += varparams;<BR>> > len -= varparams;<BR>> > }<BR>> > <BR>> > /* Whew, some complicated math for all of these offsets and different <BR>> > sections */<BR>> > <BR>> > <BR>> > <BR>> > _______________________________________________<BR>> > --Bandwidth and Colocation Provided by http://www.api-digital.com--<BR>> > <BR>> > asterisk-ss7 mailing list<BR>> > To UNSUBSCRIBE or update options visit:<BR>> > http://lists.digium.com/mailman/listinfo/asterisk-ss7<BR><BR>                                            <br /><hr />Windows Live: Keep your friends up to date <a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010' target='_new'>with what you do online.</a></body>
</html>