[Home]

Summary:ASTERISK-12640: [patch] Outgoing notification hints not functioning for SIP type=friend
Reporter:minufi (minufi)Labels:
Date Opened:2008-08-25 05:20:26Date Closed:2011-06-07 14:02:56
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) extensions.ael
( 1) sip.conf
Description:When having a SIP device configured as type friend, outgoing calls are not notified via hints. Only incoming calls are notified correctly.
With type peer outgoing calls are notified.

I think in chan_sip.c line 3220-3229 the inUse state isn´t set correct.
With type peer, inuse is set in line 3225.
If you´re using type friend, inuse is set in line 3221.
Comments:By: minufi (minufi) 2008-08-26 03:35:37

In chan_sip.c (line 3205) the outgoing flag isn´t set for outgoing calls.
It is set later.
So then in line 3220 the usrlist is used.

By: Mark Michelson (mmichelson) 2008-08-26 12:18:48

If you set limitonpeers=yes in sip.conf in the general section, does the same problem occur?

By: minufi (minufi) 2008-08-27 01:14:07

Hello putnopvut,

with limitonpeers=yes in the general section it is still the same problem.
I have looked a little bit in the debugger and I inspect the value for 'outgoing' in function update_call_counter (line 3205).
There is a test for the flag SIP_PAGE2_OUTGOING_CALL.
This flag is set in sip_request_call (line 16081).
The problem is, that update_call_counter is called before sip_request_call and in this moment, the flag isn´t set.

By: Joshua C. Colp (jcolp) 2009-02-11 11:35:15.000-0600

I just spent some time trying numerous ways to reproduce this and failed horribly. I've tried combination configurations, incoming and outgoing calls, different versions. Does this happen with the latest version and if so can you please attach your configuration with a phone minus any passwords? Thanks.

By: minufi (minufi) 2009-02-21 12:51:07.000-0600

I have tested the issue with version 1.4.21.2, 1.4.22 and 1.4.23.1. The behaviour is still the same.

I have made a workaround for my comfiguration for version 1.4.23.1.
In line 3261 (chan_sip.c) I changed the following:
- if (global_limitonpeers == FALSE && !outgoing && (u = find_user(name, 1)))  {

+ p = find_peer(ast_strlen_zero(fup->peername) ? name : fup->peername, NULL, 1, 0);
+
+ if (global_limitonpeers == FALSE && !outgoing && (u = find_user(name, 1)) && p==NULL)  {

With this change the outgoing call is notified correctly.

I have append my minimal comfiguration files.
I hope now, you can reproduce the behaviour.

By: Joshua C. Colp (jcolp) 2009-02-24 08:41:27.000-0600

In the attached configuration file you do not have limitonpeers set to yes as I previously mentioned. If you do set it then the code above (which already exists, it just requires limitonpeers to be set) will execute.

By: minufi (minufi) 2009-02-26 14:01:51.000-0600

I changed my testconfiguration and set limitonpeers to yes.
With version 1.4.23.1 it´s working fine. I will test it after my holiday in the production area. I think it would be working in all versions but i´ll try it.
I dont know why its not working with my first tries. So I think it´s my fault. Sorry. I give my feedback later. Thank you very much.

By: Joshua C. Colp (jcolp) 2009-02-26 14:08:34.000-0600

Okay, if you have any more issues feel free to reopen and provide info.