summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-30pjproject_bundled: Move to pjproject 2.5George Joseph
Although all the patches we had against 2.4.5 were applied by Teluu, a new bug was introduced preventing re-use of tcp and tls transports This patch removes all the previous patches against 2.4.5, updates the version to 2.5, and adds a new patch to correct the transport re-use problem. Change-Id: I0dc6c438c3910f7887418a5832ca186aea23d068
2016-05-26Merge "app_voicemail: fix bugs, imap mm_status log change to debug" into 13Joshua Colp
2016-05-26pjsip_distributor.c: Use correct rdata info access method.Richard Mudgett
The pjproject doxygen for rdata->msg_info.info says to call pjsip_rx_data_get_info() instead of accessing the struct member directly. You need to call the function mostly because the function will generate the struct member value if it is not already setup. Change-Id: Iafe8b01242b7deb0ebfdc36685e21374a43936d2
2016-05-26app_voicemail: fix bugs, imap mm_status log change to debugAlexei Gradinari
Fixed some bugs: - create dirpath when save downloading message from IMAP storage. - create IMAP folder if not exists when saving to IMAP storage - check if file successfully opened before write to it - some IMAP checks - remove non-standard flag 'Unseen' etc Change to debug IMAP mm_status log instead of verbose. Remove unused X-Asterisk-VM-Caller-channel message header for security reason. The clients should not know name of peer/endpoint. ASTERISK-26045 #close Change-Id: I7f83d88b69b36934e2539c114b9fb612deed971b
2016-05-24threadpool: Fix potential data race.Corey Farrell
worker_start checked for ZOMBIE status without holding a lock. All other read/write of worker status are performed with a lock, so this check should do the same. ASTERISK-25777 #close Change-Id: I5e33685a5c26fdb300851989a3b82be8c4e03781
2016-05-24Merge "func_odbc: single database connection should be optional" into 13zuul
2016-05-23Merge "Makefile: remove OSARCH check for init install" into 13zuul
2016-05-23Merge "func_curl: Don't trim response text on non-ASCII characters" into 13zuul
2016-05-23Merge "parking.h: Update ast_parking_park_call() doxygen to reality." into 13zuul
2016-05-21Makefile: remove OSARCH check for init installTzafrir Cohen
There are more specific checks for the platform. Specifically this allows installing OS/X init scripts. ASTERISK-26038 #close Change-Id: If08933621145b10362a0cfe73c079301d9c13f50 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-21func_curl: Don't trim response text on non-ASCII charactersIvan Poddubny
The characters 0x80-0xFF were trimmed as well as 0x00-0x20 because of a signed comparison. ASTERISK-25669 #close Reported by: Jesper patches: strings.curl.trim.patch submitted by Jesper (License 5518) Change-Id: Ia51e169f24e3252a7ebbaab3728630138ec6f60a
2016-05-20parking.h: Update ast_parking_park_call() doxygen to reality.Richard Mudgett
ASTERISK-26029 Change-Id: I2db14d102a48d3224010e6d1c69e856373cc1260
2016-05-20func_odbc: single database connection should be optionalAlexei Gradinari
func_odbc was changed in Asterisk 13.9.0 to make func_odbc use a single database connection per DSN because of reported bug ASTERISK-25938 with MySQL/MariaDB LAST_INSERT_ID(). This is drawback in performance when func_odbc is used very often in dialplan. Single database connection should be optional. ASTERISK-26010 Change-Id: I57d990616c957dabf7597dea5d5c3148f459dfb6
2016-05-20res_pjsip: Match dialogs on responses better.Mark Michelson
When receiving an incoming response to a dialog-starting INVITE, we were not matching the response to the INVITE dialog. Since we had not recorded the to-tag to the dialog structure, the PJSIP-provided method to find the dialog did not match. Most of the time, this was not a problem, because there is a fall-back that makes the response get routed to the same serializer that the request was sent on. However, in cases where an asynchronous DNS lookup occurs in the PJSIP core, the thread that sends the INVITE is not actually a threadpool serializer thread. This means we are unable to record a serializer to handle the incoming response. Now, imagine what happens when an INVITE is sent on a non-serialized thread, and an error response (such as a 486) arrives. The 486 ends up getting put on some random threadpool thread. Eventually, a hangup task gets queued on the INVITE dialog serializer. Since the 486 is being handled on a different thread, the hangup task can execute at the same time that the 486 is being handled. The hangup task assumes that it is the sole owner of the INVITE session and channel, so it ends up potentially freeing the channel and NULLing the session's channel pointer. The thread handling the 486 can crash as a result. This change has the incoming response match the INVITE transaction, and then get the dialog from that transaction. It's the same method we had been using for matching incoming CANCEL requests. By doing this, we get the INVITE dialog and can ensure that the 486 response ends up being handled by the same thread as the hangup, ensuring that the hangup runs after the 486 has been completely handled. ASTERISK-25941 #close Reported by Javier Riveros Change-Id: I0d4cc5d07e2a8d03e9db704d34bdef2ba60794a0
2016-05-19res_sorcery_astdb: Filter fields to only the registered ones.Joshua Colp
This change introduces the same filtering that is done in res_sorcery_realtime to the res_sorcery_astdb module. This allows persisted sorcery objects that may contain unknown fields to still be read in from the AstDB and used. This is particularly useful when switching between different versions of Asterisk that may have introduced additional fields. ASTERISK-26014 #close Change-Id: Ib655130485a3ccfd635b7ed5546010ca14690fb2
2016-05-19Merge "res_pjsip_empty_info: Respond to empty SIP INFO packets" into 13Joshua Colp
2016-05-19Merge "res_pjsip_outbound_publishing: After unloading the library won't load ↵Joshua Colp
again" into 13
2016-05-19Merge "res_pjsip: Endpoint IP Access Controls" into 13Joshua Colp
2016-05-19res_pjsip_empty_info: Respond to empty SIP INFO packetssnuffy
Some SBCs require responses to empty SIP INFO packets after establishing call via INVITE, if not responded to they may drop your call after unspecified timeout of X minutes. They are identified by having no Content-Type, check for this and respond with 200 - OK message. ASTERISK-24986 #close Reported-by: Ilya Trikoz, Federico Santulli Change-Id: Ib27e4f07151e5aef28fa587e4ead36c5b87c43e0
2016-05-19Merge "res_pjsip_outbound_publish: Ref leak in off nominal callback paths" ↵Joshua Colp
into 13
2016-05-19Merge "udptl: Don't eat sequence numbers until OK is received" into 13Joshua Colp
2016-05-19Merge "res/res_hep_pjsip: Fix reported local IP address when bound to 'any'" ↵Joshua Colp
into 13
2016-05-19Merge "res_pjsip_outbound_publish: state potential dropped on ↵Joshua Colp
reloads/realtime fetches" into 13
2016-05-19Merge "res_pjsip_outbound_publish: Potential crash due to off nominal path" ↵Joshua Colp
into 13
2016-05-18Merge "res_pjsip_outbound_publish: Won't unload if condition wait times out" ↵Joshua Colp
into 13
2016-05-18Merge "chan_sip: Prevent extra Session-Expires headers from being added" ↵Joshua Colp
into 13
2016-05-18udptl: Don't eat sequence numbers until OK is receivedGeorge Joseph
Scenario: Local fax -> Asterisk w/ firewall -> Provider -> Remote fax * Local fax starts rtp call to remote fax * Remote fax starts t38 call back to local fax. * Local fax sends t38 no-signal to Asterisk before sending an OK. * udptl processes the frame and increments the expected sequence number. * chan_sip drops the frame because the call isn't up so nothing goes out the external interface to open the port for incoming packets. * Local fax sends OK and Asterisk sends OK to the remote fax. * Remote fax sends t38 packets which are dropped by the firewall. * Local fax re-sends t38 no-signal with the same sequence number. * udptl drops the frame because it thinks it's a dup. * Still no outgoing packets to open the firewall. * t38 negotiation fails. The patch drops frames t38 received before udptl sequence processing when the call hasn't been answered yet. The second no-signal frame is then seen as new and is relayed out the external interface which opens the port and allows negotiation to continue. ASTERISK-26034 #close Change-Id: I11744b39748bd2ecbbe8ea84cdb4f3c5943c5af9
2016-05-17chan_sip: Prevent extra Session-Expires headers from being addedGeorge Joseph
When chan_sip does a re-INVITE to refresh a session and authentication is required, the INVITE with the Authorization header containes a second Session-Expires header without the ";refersher=" parameter. This is causing some proxies to return a 400. Also, when Asterisk is the uas and the refresher, it is including the Session-Expires and Min-SE headers in OPTIONS messages which is not allowed per RFC4028. This patch (based on the reporter's) Checks to see if a Session-Expires header is already in the message before adding another one. It also checks that the method is INVITE or UPDATE. ASTERISK-26030 #close Change-Id: I58a7b07bab5a3177748d8a7034fb8ad8e11ce1d9
2016-05-16res_pjsip_outbound_registration: Clean up state when registration is deletedGeorge Joseph
Nothing was cleaning up the registration state object when ast_sorcery_delete was called on a registration. So, the registration was deleted from sorcery but the state object went right on refreshing the registration (or failing to refresh the registration) with the peer. * Added a 'deleted' observer on registration that removes the state object. ASTERISK-25964 #close Reported-by Matt Jordan Change-Id: I2db792145cdb1f72ebbf57dd9099596dbbf12c23
2016-05-16Merge "configs/samples/pjsip.conf.sample: Fix typo" into 13zuul
2016-05-15res_pjsip: Set TCP_NODELAY on TCP transportsGeorge Joseph
Although it's perfectly legal to place multiple SIP messages in the same packet, it can cause problems because the Linux default is to enable Path MTU Discovery which sets the Don't Fragment bit on the packets. If adding a second message to the packet causes the MTU to be exceeded, and the destination isn't equipped to send a FRAGMENTATION NEEDED response to a large packet, the packet will just be dropped. We can't specifically tell the stack to send only 1 message per packet, but we can turn on TCP_NODELAY when we create the transport. This will at least tell the stack to send packets as soon as possible. ASTERISK-26005 #close Reported-by: Ross Beer Change-Id: I820f23227183f2416ca5e393bec510e8fe1c8fbd
2016-05-14configs/samples/pjsip.conf.sample: Fix typoMatt Jordan
A ':' is not a valid token for starting a comment. Change-Id: I123592d93a83d1bdde3e352822881eb9da85e5ad
2016-05-14res/res_hep_pjsip: Fix reported local IP address when bound to 'any'Matt Jordan
When bound to an 'any' address, e.g., 0.0.0.0, PJSIP reports as its local address the 'any' address, as opposed to the IP address we actually received the packet on. This can cause some confusion in Homer, as it will dutifully report what we send it. This patch uses the PJSIP inspection routines to determine which IP address we probably received the packet on based on the remote party's IP address. In the event that this fails, it falls back to the IP address natively reported by the transport. Change-Id: I076f835d2aef489e1ee1d01595b211eb2ce62da3
2016-05-14Merge "logger: Add PID to syslog messages." into 13zuul
2016-05-14res_ari: Correct Location headers returned by some ARI resourcesSean Bright
The Location headers returned by: * /bridges/{bridgeId}/play * /bridges/{bridgeId}/record * /channels/{channelId}/play * /channels/{channelId}/record Did not have the '/ari' prefix, and in the case of the 'play' resources, were using 'playback' instead of 'playbacks.' Change-Id: I957c58a3a1471bf477dae7c67faa1b74fcd9241c
2016-05-14Merge "res_hep: Provide an option to pick the UUID type" into 13zuul
2016-05-13Merge "config_transport: Tell pjproject to allow all SSL/TLS protocols" into 13zuul
2016-05-13res_pjsip: Endpoint IP Access ControlsAlexei Gradinari
With the old SIP module we can use IP access controls per peer. PJSIP module missing this feature. This patch added next configuration Endpoint options: "acl" - list of IP ACL section names in acl.conf "deny" - List of IP addresses to deny access from "permit" - List of IP addresses to permit access from "contact_acl" - List of Contact ACL section names in acl.conf "contact_deny" - List of Contact header addresses to deny "contact_permit" - List of Contact header addresses to permit This patch also better logging failed request: add custom message instead of "No matching endpoint found" add SIP method to logging ASTERISK-25900 Change-Id: I456dea3909d929d413864fb347d28578415ebf02
2016-05-13res_hep: Provide an option to pick the UUID typeMatt Jordan
At one point in time, it seemed like a good idea to use the Asterisk channel name as the HEP correlation UUID. In particular, it felt like this would be a useful identifier to tie PJSIP messages and RTCP messages together, along with whatever other data we may eventually send to Homer. This also had the benefit of keeping the correlation UUID channel technology agnostic. In practice, it isn't as useful as hoped, for two reasons: 1) The first INVITE request received doesn't have a channel. As a result, there is always an 'odd message out', leading it to be potentially uncorrelated in Homer. 2) Other systems sending capture packets (Kamailio) use the SIP Call-ID. This causes RTCP information to be uncorrelated to the SIP message traffic seen by those capture nodes. In order to support both (in case someone is trying to use res_hep_rtcp with a non-PJSIP channel), this patch adds a new option, uuid_type, with two valid values - 'call-id' and 'channel'. The uuid_type option is used by a module to determine the preferred UUID type. When available, that source of a correlation UUID is used; when not, the more readily available source is used. For res_hep_pjsip: - uuid_type = call-id: the module uses the SIP Call-ID header value - uuid_type = channel: the module uses the channel name if available, falling back to SIP Call-ID if not For res_hep_rtcp: - uuid_type = call-id: the module uses the SIP Call-ID header if the channel type is PJSIP and we have a channel, falling back to the Stasis event provided channel name if not - uuid_type = channel: the module uses the channel name ASTERISK-25352 #close Change-Id: Ide67e59a52d9c806e3cc0a797ea1a4b88a00122c
2016-05-13Merge "pjsip_distributor: Add missing newline to NOTICE" into 13zuul
2016-05-13Merge "basic-cfg: asterisk.conf: don't set languages" into 13Joshua Colp
2016-05-12Merge "basic-cfg: asterisk.conf: defaults of options" into 13zuul
2016-05-12Merge "basic-cfg: asterisk.conf: remove [directories]" into 13zuul
2016-05-12Merge "basic-cfg: asterisk.conf: debug level 5 spams" into 13zuul
2016-05-12Merge "followme: delete the right recorded name file" into 13zuul
2016-05-12Merge "Use doubles instead of floats for conversions when comparing ↵Joshua Colp
strings." into 13
2016-05-12basic-cfg: asterisk.conf: remove [directories]Tzafrir Cohen
A minimal configuration does not need to explicitly spell out the directories. The built-in defaults will do just fine. In many cases they are wrong. Change-Id: Id1a671e5c5e9923765a4156b57f9f7e263fdd26c Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-12basic-cfg: asterisk.conf: defaults of optionsTzafrir Cohen
Note the default of remmed-out options. To clarify that those values are not the defaults. Change-Id: I849c29b7a710f0abc37355fcb5bfee335ae30738 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-12basic-cfg: asterisk.conf: debug level 5 spamsTzafrir Cohen
Don't suggest users to use debug level 5, which spews (usually non-useful) debug information. Reduce the suggestion to (an arbitrarily-selected) level 2. Change-Id: Ib53195f78945970956ff59ef13fa89b90e0fcd60 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-12basic-cfg: asterisk.conf: don't set languagesTzafrir Cohen
* No need to set language in a miniml configuration. 'en' will do just fine. * It would be useful to have an example of setting it to a different language. * Setting the documentation language explicitly is likewise not required. Setting it to a different value is not common. At least until there is a set of translated documentation. Change-Id: I94d91ea34e129925f25af81ef8dc0906fb568cb7 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>