aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-08Rework of the commit I made yesterday to use the already built-inmmichelson1-27/+14
ast_uri_decode function as opposed to my home-rolled one. Also added comments. Thanks to oej for pointing me in the right direction git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89119 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Do not add a sip: to the beginning of the To URI unless needed.file1-1/+1
(closes issue #10756) Reported by: goestelecom git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89101 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Improve the devicestate logic for multiple devices. If any are available ↵file1-6/+15
then the extension is considered available. (closes issue #10164) Reported by: nic_bellamy Patches: sip-hinting-svn-branch-1.4.patch uploaded by nic (license 299) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89099 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Add support for allowing one outgoing transaction. This means if a response ↵file1-2/+5
comes back out of order chan_sip will still handle it. I dream of a chan_sip with real transaction support. (closes issue #10946) Reported by: flefoll (closes issue #10915) Reported by: ramonpeek (closes issue #9567) Reported by: atca_pres git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89097 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07If callerid is configured in sip.conf use that for checking the presence of ↵file1-2/+2
an extension in the dialplan. (closes issue #11185) Reported by: spditner git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89095 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07This patch makes it possible for SIP phones to dial extensions defined with ↵mmichelson1-2/+24
'#' characters in extensions.conf AND maintain their escaped characters when forming URI's (closes issue #10681, reported by cahen, patched by me, code review by file) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89090 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06Make it so that if a peer is determined to be unreachable using qualify ↵file1-1/+1
their devicestate will report back unavailable. (closes issue #11006) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89032 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05When traversing the list of channel variables here in transmit_invite(), the russell1-2/+8
asterisk channel must be locked, as this data may change at any time. (I have seen numerous reports of crashes related to the handling of channel variables. There are a couple of issues on the bug tracker related to it, but it has also been noted on IRC and mailing lists. So, I am finding and fixing some places where channel variables are handled improperly.) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88768 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Fix up some indentation.russell1-26/+26
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88765 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05If a SIP channel is put on hold multiple times do not keep incrementing the ↵file1-1/+1
onHold value. (closes issue #11085) Reported by: francesco_r Tested by: blitzrage (closes issue #10474) Reported by: acennami git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88671 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Make sure we destroy the config structure on configuration failure.qwell1-0/+2
Issue 11163, patch by eliel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88585 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-04Rename ast_string_field_free_pool to ast_string_field_free_memory,rizzo1-4/+4
and ast_string_field_free_all to ast_string_field_reset_all to avoid misuse (due to too similar names and an error in documentation). Fix two related memory leaks in app_meetme. No need to merge to trunk, different fix already applied there. Not applicable to 1.2 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88471 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02Make subscribecontext behave as advertised. It will now look for the ↵file1-18/+18
presence of a hint in the given context (be it subscribecontext or context). (closes issue #10702) Reported by: slavon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88366 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02If an INFO request within a dialog is received with a content length of 0 ↵file1-0/+5
simply send back a 200 OK. It is valid to do this and the remote side is probably using it to make sure the signalling is still alive. (closes issue #5747) Reported by: chandi Patches: infofix-81430-1.patch uploaded by IgorG (license 20) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88328 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29Fix issue where if both sides of the dialog cancelled the dialog at the same ↵file1-1/+12
time chan_sip could kepe retransmitting a response for no reason. (closes issue #9566) Reported by: atca_pres Patches: bug9566.patch uploaded by oej git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87342 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22After reading online I have confirmed that Record-Route headers should be ↵file1-1/+1
copied to 1xx responses as well. (closes issue #10113) Reported by: makoto git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86756 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Fix two issues with domains and transfers. If a port was given in the ↵file1-8/+12
hostname it was treated as part of the hostname. If domains were configured but external domains were not enabled all transfers would be considered remote. (closes issue #11027) Reported by: ramonpeek Patches: 11027-1.diff uploaded by ramonpeek (license 266) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86471 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Set port number in received as information for registrations as well.file1-2/+3
(closes issue #11028) Reported by: brad-x git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86469 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-17If Asterisk is in the middle of shutting down, respond to OPTIONSrussell1-1/+7
with 503 Unavailable. (closes issue #10994) Reported by: eserra Patches: sip-options-503.patch uploaded by eserra (license 45) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86149 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-17Whoops, forgot to remove the original sip_scheddestroy.file1-1/+0
(closes issue #11010) Reported by: vadim git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86117 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-17Don't schedule dialog destruction if a MESSAGE is received using an existing ↵file1-2/+5
dialog. (closes issue #11010) Reported by: vadim git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86063 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Make the default for the srvlookup option to be yes. It doesn't really makerussell1-2/+2
sense for it to default to off. The default configuration file has it on, and proper RFC behavior, as indicated by a comment in the code, is for it to be on. So, let's have it on by default to make lives easier. (closes issue #10954, suggested by jtodd) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85604 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11When creating a new packet don't try to stop retransmission of it. It was ↵file1-2/+0
just allocated/created so it's impossible for it to have already been scheduled. (closes issue #10945) Reported by: flefoll Patches: chan_sip.c.br14.85280.xmit_reliable-patch uploaded by flefoll (license 244) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-10If devicestate is passed a port number strip it out.file1-0/+3
(closes issue #10930) Reported by: ibc git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85280 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-10Add support for handling a 182 Queued response.file1-2/+7
(closes issue #10924) Reported by: ramonpeek Patches: queued-182.diff uploaded by ramonpeek (license 266) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85277 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-09Don't perform a reinvite if a transfer is in progress.file1-1/+1
(issue #10915) Reported by: ramonpeek git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85093 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-02Use snprintf instead of sprintf in one place. There is no vulnerability hererussell1-1/+1
due to various buffer sizes around the code, but I still didn't like seeing a non length-limited copy of data coming off of the wire into a stack buffer, as this would be a problem in the future if buffer sizes elsewhere got changed or size limitations removed ... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84370 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-26I changed my mind ... I think this should be a LOG_NOTICE.russell1-5/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83943 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-26Add a log message that was requested by the masses in the developer tutorialrussell1-1/+7
session at Astricon. chan_sip did not output any message when a call was rejected because the extension was not found. This adds a verbose message (at verbose level 3) to note when this happens. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83941 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set ofrussell1-23/+23
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21Fix video under certain circumstances. It would have been possible for the ↵file1-5/+9
formats on the channel to not contain the video format. (closes issue #10782) Reported by: cwhuang git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83400 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20Make sure the minimum T1 timer value is obeyed in all cases.file1-1/+1
(closes issue #10768) Reported by: flefoll Patches: chan_sip.c.trunk.83071.retrans-patch uploaded by flefoll (license 244) chan_sip.c.br14.83070.retrans-patch uploaded by flefoll (license 244) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83232 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20Fix a minor spelling error.file1-1/+1
(closes issue #10769) Reported by: flefoll Patches: chan_sip.c.trunk.83071.inita-patch uploaded by flefoll (license 244) chan_sip.c.br14.83070.inita-patch uploaded by flefoll (license 244) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83230 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19(closes issue #10760)file1-0/+2
Reported by: dimas Patches: chan_sip.patch uploaded by dimas (license 88) Read in subscribecontext option in general to be the default. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83070 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06(closes issue #9724, closes issue #10374)russell1-1/+10
Reported by: kenw Patches: 9724.txt uploaded by russell (license 2) Tested by: kenw, russell Resolve a deadlock that occurs when doing a SIP transfer to parking. I come across this type of deadlock fairly often it seems. It is very important to mind the boundary between the channel driver and the core in respect to the channel lock and the channel-pvt lock. Channel drivers lock to lock the pvt and then the channel once it calls into the core, while the core will do it in the opposite order. The way this is avoided is by having channel drivers either release their pvt lock while calling into the core, or such as in this case, unlocking the pvt just long enough to acquire the channel lock. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81832 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-04there is no point in sending 401 Unauthorized to a UAS that sent us a ↵kpfleming1-4/+4
properly-formatted Authentication header with the expected username and nonce but an incorrect response (which indicates the shared secret does not match)... instead, let's send 403 Forbidden so that the UAS doesn't retry with the same authentication credentials repeatedly git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81442 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-30(closes issue #10514)file1-1/+1
Reported by: casper Patches: chan_sip.c.80129.diff uploaded by casper (license 55) Remove needless check for AUTH_UNKNOWN_DOMAIN. It was impossible for it to ever be that value. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81395 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29(closes issue #9690)file1-9/+6
Reported by: mattv Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81331 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-27(closes issue #10561)file1-1/+1
Reported by: jesselang Patches: chan_sip-ChannelReload-20080825.patch uploaded by jesselang (license 202) Remove an extra \r\n to make the ChannelReload event conform with every other event. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81012 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-22Don't crash when using realtime in chan_sip without an insecure setting in ↵russell1-0/+4
the database. (closes issue #10348, reported by link55, fixed by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80390 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-21Don't record SIP dialog history if it's not turned on. Also, put an upperrussell1-1/+20
limit on how many history entires will be stored for each SIP dialog. It is currently set to 50, but can be increased if deemed necessary. (closes issue #10421, closes issue #10418, patches suggested by jmoldenhauer, patches updated by me) (Security implications documented in AST-2007-020) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17Don't send a semicolon over the wire in sip notify messages.qwell1-1/+1
Caused by fix for issue 9938. I basically took the code that existed before 9938 was fixed, and copied it into a new function - ast_unescape_semicolon There should be very few places this will be needed (pbx_config does NOT need this (see issue 9938 for details)) Issue 10430, patch by me, with help/ideas from murf (thanks murf). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79904 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17Fix some crashes in chan_sip. This patch changes various places that add itemsrussell1-2/+13
to the scheduler to ensure that they don't overwrite the ID of a previously scheduled item. If there is one, it should be removed. (closes issue #10391, closes issue #10256, probably others, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79857 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-15(closes issue #10456)file1-1/+1
Reported by: irroot Patches: sip_timeout.patch uploaded by irroot (license 52) Change hardcoded timer value to defined value. I'm doing this in 1.4 as well so if it needs to be changed in the future this place would not have been forgotten. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79523 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13(closes issue #10437)file1-2/+0
Reported by: haklin Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79174 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-09I broke canreinvite...Now I'm fixing it. I put some new code in the wrong ↵mmichelson1-31/+36
place and so I've reverted the canreinvite section to how it was and put my new code where it should be. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78826 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Allow chan_sip to build in devmodeqwell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78416 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06It is possible for a transfer to occur before the remote device has our tag ↵file1-1/+1
in which case they send none in the transfer. In this case we need to not fail the transfer dialog lookup. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Fixed a mistake I made in realtime_peer which caused it to return NULL every ↵mmichelson1-1/+2
time. Thanks to Jon Fealy for emailing me the correction. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-05If peer is not found, the error message is misleading (should be peer not ↵tilghman1-3/+5
found, not ACL failure) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78139 f38db490-d61c-443f-a65b-d21fe96a405b