Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-22 Thread Walker Haddock
   Subject: Re: [Asterisk-Users] Call Waiting on SIP phones
Paul, I applied the patch successfully last night on the CVS from last night.  I set 
the incominglimit=1 in sip.conf.  I am still getting the ring in the Grandstream 
phones.

I posted a bug report on the bugtracker.  If you would like more system information, 
please let me know.

thanks, Walker
-- 
   DataCrest, Inc. -- Technically Superior   **
Walker Haddock   http://www.datacrest.com
DataCrest, Inc.e-mail:  [EMAIL PROTECTED]
1634A Montgomery Hwy.phone:  1-888-941-3282, 1-205-335-8589
Birmingham, AL 35216  fax:  1-205-823-7838
***
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-22 Thread Paul Liew
- Original Message - 
From: Walker Haddock [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 11:10 PM
Subject: Re: [Asterisk-Users] Call Waiting on SIP phones


Subject: Re: [Asterisk-Users] Call Waiting on SIP phones
 Paul, I applied the patch successfully last night on the CVS from last
night.  I set the incominglimit=1 in sip.conf.  I am still getting the
ring in the Grandstream phones.

 I posted a bug report on the bugtracker.  If you would like more system
information, please let me know.

 thanks, Walker

Hi Walker,

I tried to duplicate your problem, but I couln't, could you please let me
know the exact calling situation, so I could try and duplicate it. Also
noted that you have a repeat SIP number in your Dial command for extension
203 (don't think that could impact it).

Paul

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-21 Thread Walker Haddock
On Tue, Oct 21, 2003 at 09:32:44AM +1000, Paul Liew wrote:
 Sorry, to repost - but I left a /* comment - here it is again
 
 Paul
 
 --- chan_sip.c.save 2003-10-20 21:51:52.0 +1000
 +++ chan_sip.c  2003-10-21 09:26:41.0 +1000
 @@ -959,7 +959,9 @@
 return 0;
 }
 switch(event) {
 +   /* Incoming and outging affects the inUse counter */
 case DEC_IN_USE:
 +   case DEC_OUT_USE:
 if ( u-inUse  0 ) {
 u-inUse--;
 } else {
 @@ -967,6 +969,7 @@
 }
 break;
 case INC_IN_USE:
 +   case INC_OUT_USE:
 if (u-incominglimit  0 ) {
 if (u-inUse = u-incominglimit) {
 ast_log(LOG_ERROR, Call from user '%s'
 rejected due to usage limit of %d\n, u-name, u-incominglimit);
 @@ -977,6 +980,8 @@
 u-inUse++;
 ast_log(LOG_DEBUG, Call from user '%s' is %d out of %d\
 n, u-name, u-inUse, u-incominglimit);
 break;
 +   /* Commented out - don't want to limit outgoing */
 +   /*
 case DEC_OUT_USE:
 if ( u-outUse  0 ) {
 u-outUse--;
 @@ -994,6 +999,7 @@
 }
 u-outUse++;
 break;
 +   */
 default:
 ast_log(LOG_ERROR, find_user(%s,%d) called with no even
 t!\n,u-name,event);
 }
 @@ -1086,6 +1092,12 @@
INVITE, but do set an autodestruct just in ca
 se. */
 needdestroy = 0;
 sip_scheddestroy(p, 15000);
 +   /* channel still up - reverse dec of inuse count
 er */
 +   if ( p-outgoing ) {
 +   find_user(p, INC_OUT_USE);
 +   } else {
 +   find_user(p, INC_IN_USE);
 +   }
 } else {
 char *res;
 if (ast-hangupcause  ((res = hangup_cause2sip
 (ast-hangupcause {
Paul, I'm getting a patch error when I diff to the chan_sip.c that I just got from CVS 
this morning.  It looks like this morning's version hasn't changed from the version I 
had from 9/24/03.  Here's the .rej file output:

***
*** 1071,1076 
   INVITE, but do set an autodestruct just in case. */
needdestroy = 0;
sip_scheddestroy(p, 15000);
} else {
char *res;
if (ast-hangupcause  ((res = 
hangup_cause2sip(ast-hangupcause {
--- 1080,1091 
   INVITE, but do set an autodestruct just in case. */
needdestroy = 0;
sip_scheddestroy(p, 15000);
+   /* channel still up - reverse dec of inuse counter */
+   if ( p-outgoing ) {
+   find_user(p, INC_OUT_USE);
+   } else {
+   find_user(p, INC_IN_USE);
+   }
} else {
char *res;
if (ast-hangupcause  ((res = 
hangup_cause2sip(ast-hangupcause {

Here's what I find in the source around those lines:

needdestroy = 1;
/* Start the process if it's not already started */
if (!p-alreadygone  strlen(p-initreq.data)) {
if (needcancel) {
if (p-outgoing) {
transmit_request_with_auth(p, CANCEL, p-ocseq, 1);
/* Actually don't destroy us yet, wait for the 487 on 
our original
   INVITE, but do set an autodestruct just in case. */
needdestroy = 0;
sip_scheddestroy(p, 15000);
} else
transmit_response_reliable(p, 403 Forbidden, 
p-initreq);
} else {
if (!p-pendinginvite) {
/* Send a hangup */
transmit_request_with_auth(p, BYE, 0, 1);
} else {
/* Note we will need a BYE when this all settles out
   but we can't send one while 

Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-21 Thread Paul Liew

- Original Message - 
From: Walker Haddock [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 5:50 AM
Subject: Re: [Asterisk-Users] Call Waiting on SIP phones


 Paul, I'm getting a patch error when I diff to the chan_sip.c that I just
got from CVS this morning.  It looks like this morning's version hasn't
changed from the version I had from 9/24/03.  Here's the .rej file output:

Walker, in case I did something wrong while posting the patch on to the
list - try the patch I've put up on bugtracker

http://bugs.digium.com/bug_view_page.php?bug_id=408

I've applied that patch on to the latest cvs and its ok.

Paul

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-21 Thread Walker Haddock
On Wed, Oct 22, 2003 at 09:46:52AM +1000, Paul Liew wrote:
 
 - Original Message - 
 From: Walker Haddock [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 22, 2003 5:50 AM
 Subject: Re: [Asterisk-Users] Call Waiting on SIP phones
 
 
  Paul, I'm getting a patch error when I diff to the chan_sip.c that I just
 got from CVS this morning.  It looks like this morning's version hasn't
 changed from the version I had from 9/24/03.  Here's the .rej file output:
 
 Walker, in case I did something wrong while posting the patch on to the
 list - try the patch I've put up on bugtracker
 
 http://bugs.digium.com/bug_view_page.php?bug_id=408
I'm sorry I didn't make it clear.  I did download the patch from the bug tracker.
 
 I've applied that patch on to the latest cvs and its ok.
I have edited your code into the chan_sip.c source and compiled.  I am testing.
 
 Paul
 
 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
   DataCrest, Inc. -- Technically Superior   **
Walker Haddock   http://www.datacrest.com
DataCrest, Inc.e-mail:  [EMAIL PROTECTED]
1634A Montgomery Hwy.phone:  1-888-941-3282, 1-205-335-8589
Birmingham, AL 35216  fax:  1-205-823-7838
***
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-20 Thread John Todd
Sorry, to repost - but I left a /* comment - here it is again

Paul
[code block removed]
Paul -
  A few questions and comments:
 1) So, does this also make incominglimit and outgoinglimit work 
as expected?  The current method doesn't do quite what the average 
user thinks it would do.

 2) Your patch may be relevant to: 
http://bugs.digium.com/bug_view_page.php?bug_id=329  - I didn't 
realize that outgoinglimit=1 would only work for the first call, 
but fail subsequently.  With type=peer, the incoming= and 
outgoing= modifiers really don't work at all for me, which makes 
them almost completely useless.  If you have some method to fix that: 
great!

 3) If there is an existing bugtracker item, the source code diff's 
are best appended to that particular bug.  If there isn't one open, 
go ahead and open one.  Sending diff's to the mailing list is getting 
less common (and less desirable) as time goes on, since we have the 
bugtracker now.

JT



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-20 Thread Tilghman Lesher
On Monday 20 October 2003 18:21, Paul Liew wrote:
 Hi All,

 This is the first time I'm submitting a patch, and I hope it fixes
 more than it breaks. I'm putting it  here, since John Todd mentioned
 a while ago about the heavy load Mark and crew have at Digium (doing
 such good work), so I thought all of us could test this first, and if
 ok submit for inclusion in CVS later if appropriate.

snip

You may want to do what everybody else does and open a bug
report with this patch uploaded as a separate file to bugs.digium.com.
Prefix the title of the patch with [patch] to denote it as more than
just a problem report.

-Tilghman

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Call Waiting on SIP phones

2003-10-20 Thread Paul Liew

- Original Message - 
From: John Todd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:29 AM
Subject: Re: [Asterisk-Users] Call Waiting on SIP phones



 Paul -
A few questions and comments:

   1) So, does this also make incominglimit and outgoinglimit work
 as expected?  The current method doesn't do quite what the average
 user thinks it would do.

Yes it does John - however, I've made incominglimit and outgoinglimit to
imply the same, so we only need incominglimit=1.


   2) Your patch may be relevant to:
 http://bugs.digium.com/bug_view_page.php?bug_id=329  - I didn't
 realize that outgoinglimit=1 would only work for the first call,
 but fail subsequently.  With type=peer, the incoming= and
 outgoing= modifiers really don't work at all for me, which makes
 them almost completely useless.  If you have some method to fix that:
 great!

The work once applies to incoming (never tested for outgoing) - Its now
fixed for both - so let me know how you go.


   3) If there is an existing bugtracker item, the source code diff's
 are best appended to that particular bug.  If there isn't one open,
 go ahead and open one.  Sending diff's to the mailing list is getting
 less common (and less desirable) as time goes on, since we have the
 bugtracker now.

I've added to the bugtracker -
http://bugs.digium.com/bug_view_page.php?bug_id=408

I've made it new report as it also fixes the incoming call waiting which
329 didn't refer to.

Also thanks for your comments and also from Tilghman.

Paul

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users