summaryrefslogtreecommitdiff
path: root/res/res_pjsip_outbound_publish.c
AgeCommit message (Collapse)Author
2015-05-13AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.Rodrigo Ramírez Norambuena
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-04-29res_pjsip_outbound_registration: Don't fail on delayed processing.Mark Michelson
Odd behaviors have been observed during outbound registrations. The most common problem witnessed has been one where a request with authentication credentials cannot be created after receiving a 401 response. Other behaviors include apparently processing an incorrect SIP response. Inspecting the code led to an apparent issue with regards to how we handle transactions in outbound registration code. When a response to a REGISTER arrives, we save a pointer to the transaction and then push a task onto the registration serializer. Between the time that we save the pointer and push the task, it's possible for the transaction to be destroyed due to a timeout. It's also possible for the address to be reused by the transaction layer for a new transaction. To allow for authentication of a REGISTER request to be authenticated after the transaction has timed out, we now hold a reference to the original REGISTER request instead of the transaction. The function for creating a request with authentication has been altered to take the original request instead of the transaction where the original request was sent. ASTERISK-25020 Reported by Mark Michelson Change-Id: I756c19ab05ada5d0503175db9676acf87c686d0a
2015-01-30res_pjsip_outbound_publish: eventually crashes when no response is ever receivedKevin Harwell
When Asterisk attempts to send SIP outbound publish information and no response is ever received (no 200 okay, 412, 423) the system eventually crashes. A response is never received because the system Asterisk is attempting to send publish information to is not available. The underlying pjsip framework attempts to send publish information. After several attempts it calls back into the Asterisk outbound publish code. At this point if the "client->queue" is empty Asterisk attempts to schedule a refresh which utilizes "rdata" and since no response was received the given "rdata" struture is NULL. Attempting to dereference a NULL object of course results in a crash. The fix here removes the dependency on rdata for schedule_publish_refresh. Instead param->expiration is now passed to it as this is set to -1 if no response is received. Also added a notification when no response is received. ASTERISK-24635 #close Reported by: Marco Paland Review: https://reviewboard.asterisk.org/r/4384/ ........ Merged revisions 431490 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-14Prevent slow graceful shutdown when outbound publications never started.Mark Michelson
The code was missing the case for explicitly destroying an outbound publication when Asterisk had never actually published anything. The result was that Asterisk would hang for a while on a graceful shutdown. With this change, the case is taken into account, and on a graceful shutdown, these publications are destroyed without the need to actually send a PUBLISH request. ASTERISK-24655 #close Reported by Kevin Harwell Review: https://reviewboard.asterisk.org/r/4325 ........ Merged revisions 430608 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12Fix crash for sorcery misconfigsDavid M. Lee
res_pjsip_outbound_publish was missing the CHECK_PJSIP_MODULE_LOADED() call in load_module, and would crash with a segfault if res_pjsip declined to load. Review: https://reviewboard.asterisk.org/r/4258/ ........ Merged revisions 429457 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09res_pjsip_outbound_publish: stack overflow when using non-default sorcery wizardKevin Harwell
When using a non-default sorcery wizard (in this instance realtime) for outbound publishes Asterisk will crash after a stack overflow occurs due to the code infinitely recursing. The fix entails removing the outbound publish state dependency from the outbound publish sorcery object and instead keeping an in memory container that can be used to lookup the state when needed. ASTERISK-24514 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/4178/ ........ Merged revisions 429175 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07res_pjsip_outbound_publish: Add module which provides outbound PUBLISH support.Joshua Colp
This module implements the core parts required for doing outbound PUBLISH. It takes care of configuration, lifetime management, and authentication. Additional modules implement the specific events that are published. Review: https://reviewboard.asterisk.org/r/3780/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420314 65c4cc65-6c06-0410-ace0-fbb531ad65f3