summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
AgeCommit message (Collapse)Author
2008-10-14Merged revisions 149207 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r149207 | mmichelson | 2008-10-14 18:10:26 -0500 (Tue, 14 Oct 2008) | 9 lines Call register_peer_exten even in the case that the peer's IP/port does not change. (closes issue #13309) Reported by: dimas Patches: v2-13309.patch uploaded by dimas (license 88) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14Add additional memory debugging to several core APIs, and fix several memoryTilghman Lesher
leaks found with these changes. (Closes issue #13505, closes issue #13543) Reported by: mav3rick, triccyx Patches: 20081001__bug13505.diff.txt uploaded by Corydon76 (license 14) Tested by: mav3rick, triccyx git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14Merged revisions 149130 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r149130 | mmichelson | 2008-10-14 15:49:02 -0500 (Tue, 14 Oct 2008) | 7 lines Don't allow reserved characters to be used in register lines in sip.conf. (closes issue #13570) Reported by: putnopvut ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14Fix reference count issue that Russell brought up in SIP MWI NOTIFY support. ↵Joshua Colp
Bump the reference count up before we add it to the scheduler, duh. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14fix some references to the owner of a private structure that may not be presentKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14this structure should be staticKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14ensure that *all* fields in the req structure are cleared out before reusing ↵Kevin P. Fleming
it; has_to_tag was not cleared, which caused the second incoming call over a TCP socket to fail if pedantic checking was enabled git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14Adding some clarificationsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-13- Doxygen formatting. (tss tss)Olle Johansson
- Fixing language git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-13Highlightning even more bugs in the current tcp/tls implementation.Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-13Sending a 403 after a 200 is considered very bad.Olle Johansson
(found at SIPit) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10The logic used when checking a peer got changed subtlyMark Michelson
in the "kill the user" commit and caused calls relying on the insecure setting to not work properly. I changed for finding a peer back to how it was prior to that commit. (closes issue #13644) Reported by: pj Patches: 13644_trunkv2.patch uploaded by putnopvut (license 60) Tested by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10Make sure that the inUse and inRinging fields for Mark Michelson
a sip peer cannot go below zero. This is a regression from 1.4 and so it will be applied to 1.6.0 as well. (closes issue #13668) Reported by: mjc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09Add support for subscribing to a voice mailbox on a remote SIP server and ↵Joshua Colp
making the new/old message count available to local devices. (issue #AST-77) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07A blind transfer to the parking thread would cause a segfault because ↵Terry Wilson
copy_request accesses dst->data w/o being able to tell whether it is proerly initialized git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06Merged revisions 146799 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines Dialplan functions should not actually return 0, unless they have modified the workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-05Recorded merge of revisions 146448 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r146448 | qwell | 2008-10-05 16:17:44 -0500 (Sun, 05 Oct 2008) | 1 line Fix silly formatting. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-30(closes issue #13337)Jeff Peeler
Reported by: pj Tested by: pj Set transport to SIP_TRANSPORT_UDP mode if not specified which fixes calls to get_transport returning UNKNOWN. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-30Add support for call pickup on Snom phones. Asterisk now includes a magicRussell Bryant
call-id in the dialog-info event package used with extension state subscriptions on Snom phones. Then, when the phone sends an INVITE with Replaces for the special callid, Asterisk will perform a pickup on the extension that was subscribed to. The original code on this issue was submitted by xylome. However, contributions have been made by (at least) mgernoth and pkempgen. The final patch was written by seanbright, and includes the necessary logic to allow this work in a technology independent way. (closes issue #5014) Reported by: xylome Patches: issue5014-trunk.diff uploaded by seanbright (license 71) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-23Fix a conflict in flag valuesMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-23When a promiscuous redirect contained both a user andMark Michelson
host portion in the Contact URI and specifies a transport, the parsing done in parse_moved_contact resulted in a malformed URI. This commit fixes the parsing so that a proper Dial string may be formed when the forwarded call is placed. (closes issue #13523) Reported by: mattdarnell Patches: 13523v2.patch uploaded by putnopvut (license 60) Tested by: mattdarnell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-18Merged revisions 143534 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r143534 | murf | 2008-09-18 16:11:51 -0600 (Thu, 18 Sep 2008) | 1 line A micro-fix, in sip_park_thread, where d is freed before the func is done using it. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingTilghman Lesher
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12Merged revisions 142865 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r142865 | tilghman | 2008-09-12 15:37:18 -0500 (Fri, 12 Sep 2008) | 11 lines Create rules for disallowing contacts at certain addresses, which may improve the security of various installations. As this does not change any default behavior, it is not classified as a direct security fix for anything within Asterisk, but may help PBX admins better secure their SIP servers. (closes issue #11776) Reported by: ibc Patches: 20080829__bug11776.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, blitzrage ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09Merged revisions 142218 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r142218 | mmichelson | 2008-09-09 14:15:28 -0500 (Tue, 09 Sep 2008) | 14 lines Make sure that the branch sent in CANCEL requests matches the branch of the INVITE it is cancelling. (closes issue #13381) Reported by: atca_pres Patches: 13381v2.patch uploaded by putnopvut (license 60) Tested by: atca_pres (closes issue #13198) Reported by: rickead2000 Tested by: rickead2000 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09Merged revisions 142079 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r142079 | mmichelson | 2008-09-09 11:19:17 -0500 (Tue, 09 Sep 2008) | 21 lines When determining if codecs used by SIP peers allow the media to be natively bridged, use the jointcapability instead of the peercapability. It seems that the intent of using the peercapability was to expand the choice of codecs for the call to increase the chances of being able to native bridge the channels. The problem is that if a codec were settled on for the native bridge and that wasn't a codec that was configured to be used by Asterisk for that peer, then Asterisk would send a REINVITE with no codecs in the SDP which is a bug no matter how you slice it. (closes issue #13076) Reported by: ramonpeek Patches: 13076.patch uploaded by putnopvut (license 60) Tested by: tbelder ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-08Um, apparently I didn't actually finish merging before committing.Mark Michelson
Bad bad bad git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-08Merged revisions 141809 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r141809 | mmichelson | 2008-09-08 16:10:10 -0500 (Mon, 08 Sep 2008) | 14 lines Fix pedantic mode of chan_sip to only check the remote tag of an endpoint once a dialog has been confirmed. Up until that point, it is possible and legal for the far-end to send provisional responses with a different To: tag each time. With this patch applied, these provisional messages will not cause a matching problem. (closes issue #11536) Reported by: ibc Patches: 11536v2.patch uploaded by putnopvut (license 60) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06Merged revisions 141565 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r141565 | murf | 2008-09-06 14:13:16 -0600 (Sat, 06 Sep 2008) | 1 line This fix comes from Joshua Colp The Brilliant, who, given the trace, came up with a solution. This will most likely will close 13235 and 13409. I'll wait till Monday to verify, and then close these bugs. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06Some fixes to autocompletion in some commands.Michiel van Baak
Changes applied by this patch: - Fix autocompletion in 'sip prune realtime', sip peers where never auto completed. Now we complete this command with: 'sip prune realtime peer' -> all | like | sip peers Also I have modified the syntax in the usage, was wrong... - Pass ast_cli_args->argv and ast_cli_args->argc while running autocompletion on CLI commands (CLI_GENERATE). With this we avoid comparisons on ast_cli_args->line like this: strcasestr(a->line, " description") strcasestr(a->line, "descriptions ") strcasestr(a->line, "realtime peer"), and so on.. Making the code more confusing (check the spaces in description!). The only thing we must be sure is to first check a->pos or a->argc. - Fix 'iax2 prune realtime' autocompletion, now we autocomplete this command with 'all' & 'iax2 peers', check a look that iax2 peers where all the peers, now only the ones in the cache.. (closes issue #13133) Reported by: eliel Patches: clichanges.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02When a call is rejected because of call-limit, the channel driver is behavingSean Bright
as expected, so we shouldn't report it as an error. Change to LOG_NOTICE instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29Merged revisions 140488 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines After working on the ao2_containers branch, I noticed something a bit strange. In all cases where we provide a callback function to ao2_container_alloc, the callback function would only return 0 or CMP_MATCH. After inspecting the ao2_callback() code carefully, I found that if you're only looking for one specific item, then you should return CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue traversing the current bucket until the end searching for more matches. In cases like chan_iax2 where in 1.4, all the peers are shoved into a single bucket, this makes for potentially terrible performance since the entire bucket will be traversed even if the peer is one of the first ones come across in the bucket. All the changes I have made were for cases where the callback function defined was passed to ao2_container_alloc so that calls to ao2_find could find a unique instance of whatever object was being stored in the container. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29Merged revisions 140417 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140417 | mmichelson | 2008-08-29 10:26:52 -0500 (Fri, 29 Aug 2008) | 10 lines Fix SIP's parsing so that if a port is specified in a string to Dial(), it is not ignored. (closes issue #13355) Reported by: acunningham Patches: 13355v2.patch uploaded by putnopvut (license 60) Tested by: acunningham ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-27Merged revisions 140299 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140299 | mmichelson | 2008-08-27 14:49:20 -0500 (Wed, 27 Aug 2008) | 11 lines Fix tag checking in get_sip_pvt_byid_locked when in pedantic mode. The problem was that the wrong tags would be compared depending on the direction of the call. (closes issue #13353) Reported by: flefoll Patches: chan_sip.c.br14.139015.patch-refer-pedantic uploaded by flefoll (license 244) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26Merged revisions 140060 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140060 | russell | 2008-08-26 11:07:58 -0500 (Tue, 26 Aug 2008) | 6 lines Fix some bogus scheduler usage in chan_sip. This code used the return value of a completely unrelated function to determine whether the scheduler should be run or not. This would have caused the scheduler to not run in cases where it should have. Also, leave a note about another scheduler issue that needs to be addressed at some point. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-25Merged revisions 139869 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r139869 | twilson | 2008-08-25 15:46:10 -0500 (Mon, 25 Aug 2008) | 2 lines Make SIPADDHEADER() propagate indefinitely ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22The -1 return value from incomplete or improperMark Michelson
headers for the SipNotify manager command was causing the current manager session to become disconnected. Change the return value to 0 for these cases. Also change a test for a NULL pointer to be ast_strlen_zero instead. (closes issue #13351) Reported by: Laureano Patches: sipnotify_action_fix.patch uploaded by Laureano (license 265) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20Fix output of sipshowpeer manager response.Jason Parker
(closes issue #13346) Reported by: srt Patches: 13346_malformed_sip_show_peer_response.diff uploaded by srt (license 378) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20Merged revisions 139015 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r139015 | mmichelson | 2008-08-20 10:37:56 -0500 (Wed, 20 Aug 2008) | 6 lines sip_read should properly handle a NULL return from sip_rtp_read. (closes issue #13257) Reported by: travishein ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-19Let it compile now, too (woops)Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-19And remove code we don't need anymore.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-19While we're at it, make this machine parseable too.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-18Change event header to RegistrationTime to be more consistent (and avoidSean Bright
breaking existing frameworks). Pointed out by Laureano on #asterisk-dev. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15Merged revisions 138258 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r138258 | tilghman | 2008-08-15 17:33:42 -0500 (Fri, 15 Aug 2008) | 8 lines More fixes for realtime peers. (closes issue #12921) Reported by: Nuitari Patches: 20080804__bug12921.diff.txt uploaded by Corydon76 (license 14) 20080815__bug12921.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15regseconds is actually stored as the epoch time, not registration lengthTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14Make sure we set the socket port, so we don't try to use <ip address>:0.Jason Parker
(closes issue #13255) Reported by: falves11 Patches: 13255-socketport.diff uploaded by qwell (license 4) Tested by: falves11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-13Correctly end locally ended calls.Jason Parker
(closes issue #12170) Reported by: pj Patches: 20080702__issue12170_clear_pendinginvite.diff uploaded by bbryant (license 36) Tested by: bbryant, pabelanger git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09More RSW merges. This should do it for the channels/ dir.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-01Picky, picky, buildbotTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-01SIP should use the transport type set in the Moved Temporarily for the nextTilghman Lesher
invite. (closes issue #11843) Reported by: pestermann Patches: 20080723__issue11843_302_ignores_transport_16branch.diff uploaded by bbryant (license 36) 20080723__issue11843_302_ignores_transport_trunk.diff uploaded by bbryant (license 36) Tested by: pabelanger git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135126 65c4cc65-6c06-0410-ace0-fbb531ad65f3