[Asterisk-Dev] chan->priority = 0 ?

Brian West brian at bkw.org
Thu Dec 9 10:50:27 MST 2004


Have you rebuilt your app since the channel.h changes.  You'll also need to
make sure you have the latest everything in CVS-HEAD it is not broken.  If
channel.h changes you really need to make clean and rebuild EVERY SINGLE app
you have otherwise you'll have strange issues such as this.

Also:

	memset(cd.cardid,0,sizeof(cd.cardid));
	memset(cd.credit,0,sizeof(cd.credit));
	memset(cd.destination,0,sizeof(cd.destination));
	memset(cd.tariffid,0,sizeof(cd.tariffid));
	memset(cd.active,0,sizeof(cd.active));
	memset(cd.rate,0,sizeof(cd.rate));
	memset(cd.dialstr,0,sizeof(cd.dialstr));
	memset(cd.prefixid,0,sizeof(cd.prefixid));
	memset(cd.providerid,0,sizeof(cd.providerid));
	memset(cd.newdestination,0,sizeof(cd.newdestination));
	memset(cd.ccprefix,0,sizeof(cd.ccprefix));


All those lines can be reduced to exactly one:

memset(cd,0,sizeof(struct calldata));

Thanks,
Brian

> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-
> bounces at lists.digium.com] On Behalf Of Wolfgang Pichler
> Sent: Thursday, December 09, 2004 5:41 AM
> To: asterisk-dev at lists.digium.com
> Subject: [Asterisk-Dev] chan->priority = 0 ?
> 
> hi all,
> 
> i do have a problem with the chan->priority variable - my application
> (app_prepaid_auth_cid) gets called from an extension at priority 3 - so
> the variable chan->priority should contain the value 3. But it always
> contains 0 as priority.
> 
> Here is the part from extension.conf
> ------------------
> exten => _.,3,PrepaidAuthCID(${CALLERID})
> ------------------
> 
> and attached is the c source file - the error happens on line 342
> 
> can someone help me with this strange error ?
> 
> regards,
> Wolfgang





More information about the asterisk-dev mailing list