[asterisk-dev] Libpri - Wrong answer on Status Enquiry with global call reference

Ing. Stefano Blasco stefano.blasco at opentlc.it
Tue Jul 27 04:31:25 CDT 2010



Richard Mudgett ha scritto:
>> The problem is:
>> When asterisk receive a STATUS ENQUIRY with global call reference it
>> answers with a RELEASE COMPLETE, and this is wrong because we have to
>> answer with a STATUS message with invalid call reference: in this case
>> i
>> wanted to show a possible solution in file q931.c at line 7169 instead
>> of
>> case Q931_STATUS_ENQUIRY:
>> if (c->newcall) {
>> q931_release_complete(ctrl,
>> c,PRI_CAUSE_INVALID_CALL_REFERENCE);
>> } else
>>
>> q931_status(ctrl,c,PRI_CAUSE_RESPONSE_TO_STATUS_ENQUIRY);
>> break;
>> we could use:
>> case Q931_STATUS_ENQUIRY:
>> if (c->newcall) {
>> if(c->cr == Q931_DUMMY_CALL_REFERENCE){
>>
>> q931_status(ctrl,c,PRI_CAUSE_INVALID_CALL_REFERENCE);
>> }
>> else{
>> q931_release_complete(ctrl,
>> c,PRI_CAUSE_INVALID_CALL_REFERENCE);
>> }
>>
>> } else
>>
>> q931_status(ctrl,c,PRI_CAUSE_RESPONSE_TO_STATUS_ENQUIRY);
>> break;
>>
>>
>> what do you think about it?
>>
>>     
> There are three kinds of call references:  dummy, global, and normal.  This change will not do what you have stated.  It is checking for the wrong type of call reference.
>   
I supposed to use Q931_DUMMY_CALL_REFERENCE because i found only this
defined in pri_internal.h.
Anyway have you some idea to change it?

Stefano
> Richard
>
>   



More information about the asterisk-dev mailing list