Commit graph

1669 commits

Author SHA1 Message Date
Kevin P. Fleming
02c6f507bb Merged revisions 47333 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47333 | kpfleming | 2006-11-08 12:07:16 -0600 (Wed, 08 Nov 2006) | 2 lines

add simple fix for SDP to report proper sample rate for G.722 media sessions

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 18:28:53 +00:00
Kevin P. Fleming
e108453e02 coding guidelines, coding guidelines, coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 15:28:39 +00:00
Luigi Rizzo
5e61077632 merge from team/rizzo/astobj2 rev.47271
avoid doing p > 0 when p is a pointer;
move a lock closer to the place where it is needed

Approved By: oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 13:59:32 +00:00
Luigi Rizzo
d5b101e974 merge from team/rizzo/astobj2 rev.47246
Same as for peers and users, replace ASTOBJ_UNREF(r, sip_registry_destroy)
with unref_registry(r);

Approved By: oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 13:53:01 +00:00
Luigi Rizzo
09012d5f20 merge from team/rizzo/astobj2, rev 47243, 47244, 47245:
Replace ASTOBJ_UNREF(peer, sip_destroy_peer) with unref_peer(peer);

This places the name of the destructor in one place only (where it
should be), eliminates the chance of errors in case you specify the wrong
destructor, and also lets the compiler do type checking on the argument,
again helping with keeping the code clean.

Same for users.
remove two duplicate definitions.

Approved By: oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 13:49:25 +00:00
Luigi Rizzo
24dfbe955e merge rev.47224 from team/rizzo/astobj2:
hide dialoglist lock/unlocking in wrapper functions.

Approved By: oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 13:44:27 +00:00
Luigi Rizzo
f58302fc9c silence compiler about uninitialized variables.
The compiler is wrong, but it has the last word.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 13:43:06 +00:00
Olle Johansson
e644ba34c5 Destroy dialog properly at unload (rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 08:01:44 +00:00
Steve Murphy
908f176cf3 A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 21:47:49 +00:00
Olle Johansson
b557aeda38 Break -> continue to make stuff work... Thanks, Luigi!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 17:33:24 +00:00
Olle Johansson
20af2870d9 issue #8265 - don't reply to ACK. Imported from 1.2, 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 13:26:31 +00:00
Olle Johansson
7d368caa98 Don't lock dialoglist if monitor runs __sip_destroy.
Hmmm. I did not change pbx_dundi and yet it doesn't compile ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 22:16:57 +00:00
Olle Johansson
80293c2ed8 Move IP address selection for media out of add_sdp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 21:48:02 +00:00
Olle Johansson
18b694d318 Make srvlookup global_srvlookup to follow the rest of the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 21:17:40 +00:00
Olle Johansson
fe5440b7c8 Simplify previous patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 19:20:30 +00:00
Olle Johansson
d900b47ccf Adding new config option "limitpeersonly" to only apply call limits
to the peer side of a type=friend. 

This is for trying to support BJ in his quest to solve some issues
with the queue system and type=friend objects.

BJ: Please test!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 19:13:30 +00:00
Olle Johansson
338c18486c Importing patch for Invite/replaces from 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 18:40:51 +00:00
Olle Johansson
37e39111c5 Reverting rev 47093 until we have an agreement on how to
implement this, if at all.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04 17:45:47 +00:00
Steve Murphy
65beb9dc10 This fix introduced via bug 8233
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-03 23:27:58 +00:00
Luigi Rizzo
b98a7bdaea Save the 'From' header received in a REGISTER message so we can show it
e.g. in the Manager interface. This information is available as
a callerid (or something like that) during a call, but not when a
device is registered but silent.
It may be useful to have it available e.g. when developing a user
interface/operator panel, to map numbers to names.

experimental, so not committed to 1.4



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-03 16:59:52 +00:00
Tilghman Lesher
10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
Olle Johansson
9dffcc2e75 Move check for codec translators to an earlier place in the call, so we can fail gracefully (imported from 1.4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 20:24:10 +00:00
Olle Johansson
0df2c7a774 Disable code for not implemented functionality (T38 over RTP/TCP)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 19:01:02 +00:00
Kevin P. Fleming
30b47fb8a0 Merged revisions 46937 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46937 | kpfleming | 2006-11-02 10:45:32 -0600 (Thu, 02 Nov 2006) | 2 lines

don't send INVITE when we have determined that we can't offer any audio formats due to lack of trancoding support (or incorrect configuration)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 16:45:50 +00:00
Joshua Colp
946eebf16f Merged revisions 46930 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r46930 | file | 2006-11-02 11:06:39 -0500 (Thu, 02 Nov 2006) | 10 lines

Merged revisions 46920 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r46920 | file | 2006-11-02 11:02:27 -0500 (Thu, 02 Nov 2006) | 2 lines

Repeat after me oej: I will at least make sure my code compiles before I commit it.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 16:14:03 +00:00
Olle Johansson
5a87a3bbb2 Don't overwrite pkt->flags (imported from 1.2/1.4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 15:31:53 +00:00
Luigi Rizzo
e72c0db882 remove old/useless usecount stuff.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 18:04:19 +00:00
Olle Johansson
602cab138b Set #define for TIMER T1 value
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 13:56:33 +00:00
Olle Johansson
9572ee68c2 Cleaning up code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 13:51:30 +00:00
Olle Johansson
b136baaff4 Fix rport handling.
...where did the 1.2 properties come from, really? they're back.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 10:29:24 +00:00
Olle Johansson
97be2ac76f - If peer that register fails ACL, fail him
- Remove the 1.2 props I've set by mistake earlier 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 09:24:55 +00:00
Olle Johansson
ab414260c4 Update sip list to eventlist format.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 21:22:41 +00:00
Olle Johansson
f98f457727 Change name of "contact" setting to "callback" which better reflects what it
is to the person that configures asterisk. That we use it internally in the
contact header is a totally different story.

Still not convinced this is a good option.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 19:56:14 +00:00
Olle Johansson
753a03161d Globals need the "global_" prefix in chan_sip, and need to be reset to default value at reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 18:34:51 +00:00
Olle Johansson
aadccc10b8 Small conversion to ast_channel_unlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 18:02:37 +00:00
Olle Johansson
8a2e564df5 Issue 8246 Doxygen updates (kshumard)
THANK YOU!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 16:33:02 +00:00
Olle Johansson
53ef33ccc3 Issue #7869 - Stop retransmission of 302 redirects.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 19:35:04 +00:00
Olle Johansson
ef7d20f9c9 Issue #7608 - Notifications sent with wrong content-type (imported from 1.2, 1.4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 19:16:36 +00:00
Olle Johansson
1086f1dfb5 Issues related to issue #7828 - segfault with MWI subscriptions and realtime.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 17:07:47 +00:00
Olle Johansson
430ca5b59c - Fix the OUTGOING stuff (merge from 1.4)
- Make sure we UNREF authpeer when not needed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 16:58:07 +00:00
Olle Johansson
ee31dc4d52 Documentation update again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 08:27:31 +00:00
Olle Johansson
34f5c15427 Documentation update (I guess)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 08:26:05 +00:00
Olle Johansson
4ec9329d8b Documentation correction
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 08:22:22 +00:00
Olle Johansson
a4366cc194 maxtime is not needed any more now that we actually set the T1 timer
based on the qualify result.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 08:15:26 +00:00
Olle Johansson
baf9547d50 Only accept message once
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-28 20:27:21 +00:00
Olle Johansson
ca433620a7 Adding documentation inspired by a virtual drink with an anonymous man in New Jersey
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-28 20:05:19 +00:00
Olle Johansson
336a4602ba Don't duplicate function if not needed...
- removing transmit_reinvite_with_t38_sdp in favour of adding an argument to 
  transmit_reinvite_with_sdp


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-28 19:30:31 +00:00
Olle Johansson
29e489e000 Merge from 1.4 : Don't send 183 reliably...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-28 19:16:23 +00:00
Olle Johansson
0f9a1b19f1 - Don't lock the dialoglist during the whole destruction of a single SIP dialog. Only
lock when needed - when we remove the dialog from the dialog list
  If this doesn't lead to severe problems, it might help with some locking issues
  in 1.4/1.2.
- Remove the term "interface" as a synonym for a SIP dialog. Sorry, Mark, but no
  one understands it... ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-28 17:25:23 +00:00
Olle Johansson
12a966cb0e Put this patch on hold pending further testing...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 17:45:43 +00:00
Olle Johansson
7ca6b79569 Show if the channel is ready for video or T.38 udptl
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 20:22:14 +00:00
Olle Johansson
1b3411f2ff Old todo: Don't add Contact headers on BYE and CANCEL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 20:21:05 +00:00
Olle Johansson
d448620715 First stab at transaction direction fix, this for trunk for testing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 20:12:06 +00:00
Olle Johansson
cef98c1e87 Ugly code to try to remove issue discovered by Luigi as well as attack bug #7608
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 19:30:04 +00:00
Olle Johansson
26a00dfaf0 Merge from 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 16:01:22 +00:00
Kevin P. Fleming
5f5faa310a Merged revisions 46082-46083,46152-46153 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46082 | kpfleming | 2006-10-23 22:45:42 -0500 (Mon, 23 Oct 2006) | 2 lines

add an API call to allow channel drivers to determine which media formats are compatible (passthrough or transcode) with the format an existing channel is already using

........
r46083 | kpfleming | 2006-10-23 22:53:32 -0500 (Mon, 23 Oct 2006) | 2 lines

ensure that the translation matrix is properly lock-protected every place it is used

........
r46152 | kpfleming | 2006-10-24 18:45:19 -0500 (Tue, 24 Oct 2006) | 2 lines

if multiple translators are registered for the same source/dest combination, ensure that the lowest-cost one is always inserted earlier in the list

........
r46153 | kpfleming | 2006-10-24 19:10:54 -0500 (Tue, 24 Oct 2006) | 2 lines

code zone experiment: don't offer formats in the outbound INVITE that aren't either passthrough or translatable

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:55:11 +00:00
Kevin P. Fleming
749029de38 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:44:50 +00:00
Olle Johansson
0fed2f78b9 Adding comments in the source is more persistent than just adding them
to the commit message :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 11:41:49 +00:00
Olle Johansson
2560ff9c33 Always add doxygen comments to new functions, more lines than one are
appreciated really. (Read the coding guidelines).

I've worked hard to make chan_sip a better place to code in, let's
keep it that way and don't add more stuff without comments.

Thank you.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 11:39:40 +00:00
Luigi Rizzo
0d59b76dd2 correct fix for the bug i previously introduced - the strings
are meant to be always initialized, independently from their content.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-24 06:52:15 +00:00
Russell Bryant
6e65bea242 Fix a seg fault on a registration. Line 7706, in parse_register_contact,
explicitly passes NULL as the "pass" argument to this function.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-24 00:52:06 +00:00
Luigi Rizzo
a989f7cd47 Unlike ast_strdup(), ast_strdupa() does not take a NULL pointer as argument,
so fix the places where this might happen.

This is also a fix that ought to go into 1.4

[The difference between the two functions is a bit confusing,
and in asterisk i believe all string handling functions
should be able to handl a NULL string as argument,
but changing the API in trunk and not in 1.4 would make
backporting harder.]



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 21:46:15 +00:00
Luigi Rizzo
6345c91eb3 remove a useless check for ocseq = 0.
As discussed on the mailing lists, 0 is a legal value
for Cseq, so there is no point to treat it specially.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 20:01:14 +00:00
Luigi Rizzo
a31aa6f320 get_header() always returns a non-NULL value, so checking
for NULL is certainly wrong and usually disables the
checks that we want to make instead.

This commit fixes a number of the above bugs where the result
of get_header() is immediately checked for NULL.

This is certainly a candidate for merging into 1.4




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 19:52:43 +00:00
Luigi Rizzo
f1c2342c96 put another duplicated block of code in a function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 19:28:23 +00:00
Luigi Rizzo
eb44903b08 reformat a statement and comment a potentially wrong
assignement (altering state on an unvalidated message).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 18:38:42 +00:00
Luigi Rizzo
85fe7cac03 Remove unnecessary casts from const char * to char *,
if necessary by slightly rearranging the code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 17:49:09 +00:00
Luigi Rizzo
8a7ba881e2 another use for parse_uri().
On passing, remove a wrong comment (that probably I wrote
myself!) and introduce a temporary variable to avoid a     
misleading cast.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 17:41:03 +00:00
Luigi Rizzo
0cb5e93383 + make sure parse_uri never returns NULL pointers - this
simplifies its usage.

+ add another client for parse_uri, in handling Contact: strings
  (on passing, document the content of the "fullcontact" field);

+ in register_verify(), mark with XXX what i believe is another
  misinterpretation on the URI format when '@' is missing.
  No code changed here, so no fixes applied.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 15:45:36 +00:00
Luigi Rizzo
7dd92fd181 After reading better the SIP RFC on sip URI (19.1.1)
fix parse_uri() to interpret a missing userinfo
section as a domain-only URI, and comment a wrong
interpretation of the above in check_user_full().

The function has been patched to preserve the existing
behaviour (in what admittedly is a corner case, but
could be received under attacks).
Hopefully the From: based matching will go away soon!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 15:08:40 +00:00
Luigi Rizzo
ee60094592 in function get_also_info(), move argument stripping
before splitting around the @, otherwise the refer_to_domain
might contain arguments as well, causing failures.
 
I think this is a true bug that ought to be fixed in 1.4 as well.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 14:35:37 +00:00
Luigi Rizzo
00b88f30b4 start putting the URI parsing code in one place,
introducing the function parse_uri() that splits
a URI in its components.

Right now use it only in one place, because the custom
parsing that is done here and there sometimes has
bugs that i want to figure out first.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 14:30:33 +00:00
Luigi Rizzo
32f82c2ca1 put common code in function terminate_uri() so we need to
fix it only in one place.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 13:19:13 +00:00
Luigi Rizzo
c761bea8e2 More cleanup of check_user_full with no functional change
apart from a small (but disabled by default) new option.
In detail:

+ introduce a new value for enum check_auth_result, AUTH_DONT_KNOW,
  used (read below) when a function does not have a conclusive response.
  Possibly this is the same as AUTH_NOT_FOUND, but need to check further.

+ move the large blocks (checking in the users list and in the peers
  list, respectively) from check_user_full() to separate functions.
  They return AUTH_DONT_KNOW in case they don't find a match, so
  the caller know that it has to try the next method.
     There is still some duplication of code here, but i
  have not tried yet to remove it.

+ [new option] a new option in sip.conf, match_auth_username,
  has been introduced, and disabled by default.
  If set, and the incoming request carries authentication info,
  the username to match in the users list is taken from there
  rather than from the From: field.
        This change is easy to identify, being made of
  - one line to declare the variable match_auth_username
  - a block of 15 lines in check_user_full()
  - one line in sip list settings
  - two lines for parsing the config file.

check_user_full() is now a lot cleaner - basically a sequence of
checks that are applied to the request. This will help future
work with new matching schemes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 11:08:47 +00:00
Luigi Rizzo
dc83868813 more streamlining of check_user_full
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 21:08:07 +00:00
Luigi Rizzo
e7c0a0524a simplify the flow of function check_user_full()
A large block needs reindentation now, but we don't do that because
it can be moved to a separate function.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 20:59:38 +00:00
Luigi Rizzo
36d7b8f488 put duplicated code in functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 20:51:05 +00:00
Luigi Rizzo
70ee76d64b introduce sip_pvt_lock() and sip_pvt_unlock() wrappers to
lock these data structures.

This improve readability, and also hides the underlying
locking mechanism so it is a lot easier to add diagnostic
code, or move the object locks somewhere else, etc.

On passing, rename the lock field in sip_pvt to pvt_lock,
also for ease of readability.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-20 20:59:06 +00:00
Russell Bryant
02ec7acf6a put the constants for whether methods can create a dialog or not in an enum
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-20 15:54:14 +00:00
Olle Johansson
d6602b1b5e Let's repair the SIP attack shield :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-20 08:14:14 +00:00
Joshua Colp
ceb2c7bc48 Merged revisions 45678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45678 | file | 2006-10-19 12:03:09 -0400 (Thu, 19 Oct 2006) | 2 lines

If the jitterbuffer is forced on then we can't partially bridge (reported by wangster on #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 16:06:14 +00:00
Luigi Rizzo
293330e7a9 move a large block out of do_monitor() and into a function,
to improve readability.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 10:05:02 +00:00
Luigi Rizzo
d553659017 + move the definition of netlock as it was not related to the
comment just above;

+ decouple the struct definition and variable declaration (iflist);



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 09:54:51 +00:00
Olle Johansson
f2d11e403c Cleaning up... Removing duplicate (again)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 07:17:13 +00:00
Kevin P. Fleming
4b8e41c529 restore freeing of threadstorage objects without custom cleanup functions
allow custom threadstorage init functions to return failure
use a custom init function for chan_sip's temp_pvt, to improve performance a bit


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 02:16:34 +00:00
Russell Bryant
777d03bd17 Merge fix to not leak the stringfields of a thread speicif sip_pvt. This also
includes the fix not to leak the actual sip_pvt.


Merged revisions 45622 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45622 | russell | 2006-10-18 20:59:51 -0400 (Wed, 18 Oct 2006) | 2 lines

Don't leak the actual thread-specific sip_pvt struct

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 01:04:18 +00:00
Russell Bryant
bd53e7ee4c Extend the thread storage API such that a custom initialization function can
be called for each thread specific object after they are allocated.  Note that
there was already the ability to define a custom cleanup function.  Also, if
the custom cleanup function is used, it *MUST* call free on the thread
specific object at the end.  There is no way to have this magically done that
I can think of because the cleanup function registered with the pthread
implementation will only call the function back with a pointer to the
thread specific object, not the parent ast_threadstorage object.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 01:00:57 +00:00
Olle Johansson
7db2dfaf4e Remove duplicate declarations...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 12:15:23 +00:00
Kevin P. Fleming
696f9ed677 Merged revisions 45408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45408 | kpfleming | 2006-10-17 17:24:10 -0500 (Tue, 17 Oct 2006) | 3 lines

optimize the 'quick response' code a bit more... no more malloc() or memset() for each response
expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 22:24:45 +00:00
Joshua Colp
15c473908b Merged revisions 45378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45378 | file | 2006-10-17 16:30:34 -0400 (Tue, 17 Oct 2006) | 2 lines

Don't create a "real" pvt structure for requests that shouldn't be able to create one. Instead use a temporary pvt and fill it with enough information so we can send a reply.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 20:34:22 +00:00
Olle Johansson
0b0d72579e Issue #5484 (branch sipdiversion) - Support for Diversion header in redirects of calls
with 302 redirection. (tinning)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 19:57:35 +00:00
Olle Johansson
3376c8e976 Issue #7254 - Add support of "423 Interval too brief" to outbound SIP registrations.
Thanks, tardieu!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:54:59 +00:00
Olle Johansson
748de51a84 - Remove unneeded code that won't be reached now that we kill responses
to unkonwn dialogs earlier in the process. 
- move debug message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:47:09 +00:00
Olle Johansson
9f837a0baa Get rid of the ignore variable that was only partially replaced
by the flag.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 06:47:02 +00:00
Joshua Colp
c62784c10d In the course of a data this has been turned into an option to ignore replies, then ignore responses and finally I'm just getting rid of the option altogether and making it the default no matter what. C'est la vie!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 20:26:56 +00:00
Joshua Colp
da330feb60 Merged revisions 45280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45280 | file | 2006-10-16 16:06:18 -0400 (Mon, 16 Oct 2006) | 10 lines

Merged revisions 45265 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r45265 | file | 2006-10-16 15:59:54 -0400 (Mon, 16 Oct 2006) | 2 lines

Use responses rather then replies even though they mean the same thing.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 20:08:23 +00:00
Joshua Colp
b58cc9e1bd Merged revisions 45262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45262 | file | 2006-10-16 15:37:34 -0400 (Mon, 16 Oct 2006) | 10 lines

Merged revisions 45260 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r45260 | file | 2006-10-16 15:28:18 -0400 (Mon, 16 Oct 2006) | 2 lines

Add 'ignoreoodreplies' option which will not create a pvt structure on a SIP response but instead basically drop it.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 19:43:33 +00:00
Olle Johansson
5b52f69201 When adding new functions, please add a forward declaration.
I *know* it is not required, but it makes navigation easier and will help
when splitting up this large source code file. 

Thank you!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 13:20:21 +00:00
Olle Johansson
43505df9f4 Importing rev 45196 from 1.4 - don't kill dialog for a bad response
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 13:03:02 +00:00
Olle Johansson
09b8583937 A B2BUA should *not* issue proxy auth.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 12:28:18 +00:00
Joshua Colp
e1bb0dab37 Merged revisions 45040 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45040 | file | 2006-10-13 12:01:17 -0400 (Fri, 13 Oct 2006) | 2 lines

Complete merging in RPID screen changes (issue #8101 reported by hristo, patch by oej in revision 44757)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 16:02:27 +00:00
Luigi Rizzo
e1378c470f Try to avoid the use of 'z' modifier in cases where it is not
necessary - rather, cast the argument to int.

In this case, the string is in a UDP packet and as such
limited to 64k so its length can be safely represented in an int
without truncation (besides, this is just a debugging message!)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 11:18:01 +00:00
Luigi Rizzo
1fe21371a3 arguments to auth_headers() needed to be swapped here.
To avoid the same mistake in the future (due to slightly
confusing variable names), add a comment.

On passing, remove a redundant initialization.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 11:11:19 +00:00
Kevin P. Fleming
49b0cc8c94 eliminate compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 19:16:16 +00:00
Kevin P. Fleming
0ecfae3dbd Merged revisions 44971 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44971 | kpfleming | 2006-10-12 14:14:24 -0500 (Thu, 12 Oct 2006) | 2 lines

we can only send one 'a=ptime' attribute per media session, not one for each format

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 19:15:25 +00:00
Kevin P. Fleming
035aeb82e4 Merged revisions 44956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44956 | kpfleming | 2006-10-12 13:38:51 -0500 (Thu, 12 Oct 2006) | 10 lines

Merged revisions 44955 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r44955 | kpfleming | 2006-10-12 13:31:26 -0500 (Thu, 12 Oct 2006) | 2 lines

ensure that IAX2 and SIP sockets allow UDP fragmentation when running on Linux (thanks to Brian Candler on the asterisk-dev list for the tip)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 18:43:52 +00:00
Luigi Rizzo
97ac6793c7 + move [almost] all instances of WWW-Authenticate/Proxy-Authenticate
and friends in a function, auth_headers(), which is used to
  simplify the interface of do_{proxy|register}_auth().
 
+ use PROXY_AUTH = 407, WWW_AUTH = 401 as values for enum sip_auth_type;

No functional change, only code cleanup.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 15:12:54 +00:00
Luigi Rizzo
59e61ae4a0 reduce indentation of two large blocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 23:36:25 +00:00
Luigi Rizzo
6d6e60be79 operator != also works between booleans...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 23:26:44 +00:00
Russell Bryant
9e2abab8fa Revert Luigi's accidental commit of his local changes when debugging some SIP
authentication issues.  This was committed in revision 44844, where the commit
message was just "small formatting cleanup", so I am pretty sure he didn't mean
to commit this part.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 13:38:37 +00:00
Luigi Rizzo
328e1c9d1c remove duplicate prototypes. Have not checked if there are more.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 13:21:33 +00:00
Luigi Rizzo
ed683ccc2a simplify and comment handle_response_peerpoke()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 13:12:31 +00:00
Luigi Rizzo
312fd57758 fix indentation of a function after previous commit
(whitespace-only change)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 12:24:57 +00:00
Luigi Rizzo
2eeaeaa7a7 handle_response_peerpoke() does not need to return anything.
(Reindentation in the next commit.)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 09:17:05 +00:00
Luigi Rizzo
510b9f04c0 small formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-11 08:56:09 +00:00
Joshua Colp
832014a91b Merged revisions 44819 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44819 | file | 2006-10-10 13:21:44 -0400 (Tue, 10 Oct 2006) | 2 lines

Move some stuff around so that a NOTIFY dialog won't hang around until the end of the world under certain circumstances

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 17:23:14 +00:00
Joshua Colp
1eedc8af43 Merged revisions 44806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44806 | file | 2006-10-10 12:30:00 -0400 (Tue, 10 Oct 2006) | 2 lines

Bail out if we have no refer structure and we get a refer response

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 16:31:05 +00:00
Joshua Colp
fadc6c4ed7 Merged revisions 44788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44788 | file | 2006-10-10 11:23:14 -0400 (Tue, 10 Oct 2006) | 2 lines

Only set DTMF information if an RTP structure exists

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 15:25:05 +00:00
Luigi Rizzo
06fab1382b clarify the use of the standard SIP port number, 5060,
and rename the old DEFAULT_SIP_PORT as STANDARD_SIP_PORT
to make it clear that this is not something we can change,
unlike other defaults.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 08:08:35 +00:00
Luigi Rizzo
15fcc45c4e improve formatting of SIP packets when dumped to the verbose
output stream, so it is easier to find them in the log.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 07:40:27 +00:00
Olle Johansson
d766095219 Being pedantic... "media" is easier to understand than "data" in the function name... :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 11:20:02 +00:00
Luigi Rizzo
853f7ed660 slightly restructure sipsock_read() removing a "goto"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 09:04:30 +00:00
Luigi Rizzo
69af2cea2f use S_OR in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 08:33:52 +00:00
Luigi Rizzo
ad63b4c7c1 update_call_counter(): indentation fixes and small simplifications
at the top of the function.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 23:26:10 +00:00
Luigi Rizzo
06ef2c1907 localize some variables and reduce nesting depth
(indentation will be fixed by a separate commit).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 23:04:12 +00:00
Luigi Rizzo
dd2121b075 small simplification to initreqprep()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 22:45:01 +00:00
Luigi Rizzo
36e4f62e7c Simplify function parse_request() using a single loop instead
of two very similar ones.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 22:20:35 +00:00
Luigi Rizzo
b90f91c3b4 do not dereference p if we know it is NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-08 14:10:26 +00:00
Olle Johansson
1b64c41369 Fix some debug output for setsockopt for TOS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 20:42:27 +00:00
Olle Johansson
259f0d76b6 - move definition of global_autoframing to the same place as other globals
- set initial value at load/reload
- Add questionmarks for someone to fill in for doxygen 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 18:57:11 +00:00
Olle Johansson
12ef70f0c0 Add/change doxygen and comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 16:32:31 +00:00
Olle Johansson
9cc9c38250 Explain usage of DEFAULT_SIP_PORT
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 16:03:36 +00:00
Olle Johansson
64aae4a887 Do *NOT* use DEFAULT_SIP_PORT in these comparisions, since users may change
that, but the protocol clearly states that if we DO NOT mention a port it
is 5060. DEFAULT_SIP_PORT is whatever we default to listen to.

I believe it's the third time I revert a patch like this.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 15:38:18 +00:00
Luigi Rizzo
901a66c401 slightly restructure the code that computes the channel's name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 12:50:42 +00:00
Luigi Rizzo
a1a5824869 put repeated code to set nat mode in a function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 12:20:16 +00:00
Luigi Rizzo
bc1e5f77af put common code in a function to avoid repetitions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 11:28:38 +00:00
Luigi Rizzo
b37dc86c74 remove hardwired usage of 5060, use DEFAULT_SIP_PORT instead
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 11:11:39 +00:00
Luigi Rizzo
e691246b6e improve and document function get_in_brackets(), introducing
a helper function find_closing_quote() of more general use.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 09:36:09 +00:00
Luigi Rizzo
6466c2ebf9 when possible, use ast_set2_flags instead of ast_set/ast_clr .
Also mark XXX some dubious places.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-07 08:56:59 +00:00
Luigi Rizzo
ccca5843fd Two things:
1. slightly rearrange/simplify the parsing of the argument in sip_register.
   This brings in a patch that has been in Mantis (5834)  for ages,
   and is the larger part of the commit;

2. implement the "contact" option for peers, similar to the one in users.conf:

   If you put a "contact" option with a non-empty argument (e.g. contact=123)
   in a peer section, asterisk will register with the provider as if you had a     

        register= username:secret@host/contact 

   line in the general section.

The latter is a very small is a new feature so i am not putting it
in the 1.4 branch, although the "contact" option in user.conf is
already in the 1.4 branch and so it wouldn't be too strange to
merge it.

Note that the implementation of "contact" is much simpler than
the one in 5834, and limited to a few lines in build_peer().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-06 15:41:12 +00:00
Olle Johansson
cb127f4baa Remove deprecated "incominglimit" config option
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-06 09:01:09 +00:00
Joshua Colp
0b26b56316 Merged revisions 44486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44486 | file | 2006-10-05 14:01:51 -0400 (Thu, 05 Oct 2006) | 2 lines

One more T.38 fix! Don't leave a reinvite hanging by a thread if the other side is already setup with T.38

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 18:03:34 +00:00
Joshua Colp
9924c3e2e9 Merged revisions 44450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44450 | file | 2006-10-04 22:40:40 -0400 (Wed, 04 Oct 2006) | 2 lines

Don't totally bail out if T.38 was negotiated

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 02:43:07 +00:00
Kevin P. Fleming
975ef9de9d Merged revisions 44433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44433 | kpfleming | 2006-10-04 20:30:05 -0500 (Wed, 04 Oct 2006) | 10 lines

Merged revisions 44432 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r44432 | kpfleming | 2006-10-04 20:27:57 -0500 (Wed, 04 Oct 2006) | 2 lines

fix Polycom presence notification again

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 01:30:44 +00:00
Kevin P. Fleming
50bcacbdbd Merged revisions 44393 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44393 | kpfleming | 2006-10-04 16:17:30 -0500 (Wed, 04 Oct 2006) | 11 lines

Merged revisions 44392 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r44392 | kpfleming | 2006-10-04 16:15:29 -0500 (Wed, 04 Oct 2006) | 3 lines

remove workaround for old Polycom firmware SUBSCRIBE requests
add workaround for new Polycom firmware SUBSCRIBE requests (bug is known to exist in 2.0.1 firmware)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 21:20:55 +00:00
Kevin P. Fleming
3c876af5cf Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines

update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:51:38 +00:00
Joshua Colp
6727e8f599 Merged revisions 44284 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44284 | file | 2006-10-03 14:35:55 -0400 (Tue, 03 Oct 2006) | 2 lines

Use VideoSupport instead so it is considered a valid XML attribute name. (issue #8075 reported by renemendoza)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 18:37:06 +00:00
Matt O'Gorman
ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Joshua Colp
fadd9e7831 Merged revisions 44215 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44215 | file | 2006-10-02 16:11:02 -0400 (Mon, 02 Oct 2006) | 10 lines

Merged revisions 44213 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r44213 | file | 2006-10-02 16:07:59 -0400 (Mon, 02 Oct 2006) | 2 lines

Change the fd on the I/O context in case it changed during the reload, which is indeed possible. (issue #7943 reported by eclubb)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:13:26 +00:00
Mark Spencer
847fe77eb9 Don't use channel when you don't mean a channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 02:38:52 +00:00