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

Richard Mudgett rmudgett at digium.com
Mon Jul 26 11:44:53 CDT 2010


> 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.

Richard



More information about the asterisk-dev mailing list