|Summary:||ASTERISK-02686: Problem with multiple lines on Cisco phones.|
|Date Opened:||2004-10-27 03:21:43||Date Closed:||2011-06-07 14:05:00|
|Description:||I have a scenario where in channel SIP there are no users, only peers taken in realtime |
from a database. Also I am using multiple lines feature supported by Cisco phones 7960
and 7940. Multiple lines on a single phone mean that in my setup I can have 2 or more
peers sharing the same IP address.
When an INVITE arrives from one of IP sharing peers, chan_sip.c goes to function
"check_user_full", where the code finds out that the caller is not a user (I do not
have users) and gets down to call
peer = find_peer(NULL, &p->recv);
The second argument is the IP address where INVITE came from. Since there are 2 peers
sharing this IP address, "find_peer" in 50% of the cases returns peer that is not
the one that sent "INVITE". Eventually this means that is it impossible to place a
call from one of the 2 peers sharing the same IP address.
One possible way to get it fixed is replace the above line of code with
peer = find_peer( (p->cid_num=='\0') NULL ? p->cid_num, &p->recv);
p->cid_num is populated just a few lines above in function "check_user_pull".
Does anyone see that the suggested fix will create bug? If the suggested fix is
not right way to do it then what is the right way?
****** ADDITIONAL INFORMATION ******
I can make a patch if the above is the right way to fix it.
|Comments:||By: Brian West (bkw918) 2004-10-27 11:33:15|
if you don't put "username=" in your sip.conf entry it does this.
So make sure you have username=
By: Mark Spencer (markster) 2004-10-27 16:03:36
This is precisely what a user is supposed to be! Why aren't you using a user entry?
By: constfilin (constfilin) 2004-10-27 19:13:51
That worked, thanks. Please close the bug report.
By: Brian West (bkw918) 2004-10-27 19:19:21