Commit Graph

53 Commits

Author SHA1 Message Date
marian 39bd797dc0 Fixed bugs. Avoid adding an executed slave which already lost its master, avoid adding a slave to list if it is going to be destroyed (avoid re-entering in call continue). Made ForkMaster and ForkSlave debug enablers, allow setting a debug level in master. Improved debug.
git-svn-id: http://yate.null.ro/svn/yate/trunk@6497 acf43c95-373e-0410-b603-e72c3f656dc1
2021-05-28 11:50:18 +00:00
paulc a1f3b06d52 Added support for manipulating the id of backward messages.
git-svn-id: http://yate.null.ro/svn/yate/trunk@6457 acf43c95-373e-0410-b603-e72c3f656dc1
2021-01-14 15:40:40 +00:00
paulc 11a02cf913 Resolved or silenced a number of compile warnings.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5891 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-31 16:30:15 +00:00
paulc 37a72e4bc1 Added copyright notices to sources and scripts missing them.
Updated copyright notices for 2014.
Fixed end of lines in many files.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5755 acf43c95-373e-0410-b603-e72c3f656dc1
2014-02-05 11:42:17 +00:00
marian e0942e7e65 Changed im.execute relay id. Removed im.route message relay. Route chat using call.route message.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5618 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-13 07:54:00 +00:00
paulc cf5d0fd71a Changed license terms in each source file to reference an external file.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5609 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-06 13:38:10 +00:00
paulc 3b49b78ecb Added a shared static list of Atom strings and an YATOM macro.
This speeds up signifficantly the Yate RTTI on compilers that HAVE_BLOCK_RETURN.
Made the String comparison operator inline to shave off a few cycles.
Fast handle the comparison in identity case.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5449 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 13:19:14 +00:00
marian 94b6e06060 Make sure the user data pointer carried by handled message is a CallEndpoint one.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5287 acf43c95-373e-0410-b603-e72c3f656dc1
2012-10-01 11:00:30 +00:00
paulc 31155b34db Properly clean up a fork slave whose call.execute succeeded but connect() failed.
This fixes a dangling pointer crash caused by some misconfigurations.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5261 acf43c95-373e-0410-b603-e72c3f656dc1
2012-09-14 12:01:53 +00:00
paulc bf57830c7f Added possibility to track message progress through handlers.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5107 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-12 23:47:01 +00:00
paulc 648d122d96 Reset the timer and exec flags at start of each fork block.
Display debug information if call.execute from fork fails.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5053 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-10 08:39:12 +00:00
paulc f75aceca2a Clear the ringing slave ID when the slave is disconnected on timer too.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4792 acf43c95-373e-0410-b603-e72c3f656dc1
2012-01-04 15:52:58 +00:00
paulc d67564675c Preserve the last fork disconnect reason in the fork.reason parameter.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4789 acf43c95-373e-0410-b603-e72c3f656dc1
2011-12-21 16:06:17 +00:00
paulc 334f8ff84b When exiting a fork by |exec suppress chan.disconnected and emit instead chan.replaced.
This should fix incorrect interactions with PBX functions.


git-svn-id: http://yate.null.ro/svn/yate/trunk@4703 acf43c95-373e-0410-b603-e72c3f656dc1
2011-11-15 18:47:43 +00:00
paulc fdafbb2132 Assume chan.dtmf=peerid in the [messages] relay list of callfork.conf
Commented out the [messages] section in the sample file.
To debugging of relay messages set level INFO and added display of priority.


git-svn-id: http://yate.null.ro/svn/yate/trunk@4680 acf43c95-373e-0410-b603-e72c3f656dc1
2011-11-04 21:25:20 +00:00
paulc 8bf08bcd20 Added possibility to reverse the fork.stop match rule.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4527 acf43c95-373e-0410-b603-e72c3f656dc1
2011-07-28 11:15:55 +00:00
marian 1b226080a1 The call fork module can now handle separate parameters for each fork target.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4485 acf43c95-373e-0410-b603-e72c3f656dc1
2011-07-12 14:18:39 +00:00
paulc 2b6e6b3b8c Added possibility to configure messages to be forked by the callfork module.
Priority of all handlers in callfork is now configurable.


git-svn-id: http://yate.null.ro/svn/yate/trunk@4275 acf43c95-373e-0410-b603-e72c3f656dc1
2011-04-07 21:00:09 +00:00
paulc fb46e164fb Emit new message "chan.replaced" when a fork is answered so other modules can synchronize their state.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4206 acf43c95-373e-0410-b603-e72c3f656dc1
2011-03-24 11:57:47 +00:00
paulc 062ff961be Do not emit chan.disconnected for the master of a fork already answered.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4154 acf43c95-373e-0410-b603-e72c3f656dc1
2011-03-04 14:25:08 +00:00
paulc d1304625df Copy more parameters in the chan.startup of the fork master.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4139 acf43c95-373e-0410-b603-e72c3f656dc1
2011-02-28 18:10:51 +00:00
paulc 1f7cec2d2e Enable sending chan.startup/disconnected/hangup messages from the fork master, they are required for proper PBX operation.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4138 acf43c95-373e-0410-b603-e72c3f656dc1
2011-02-28 17:58:26 +00:00
paulc e158895878 Delete "peerid" parameter from a forked call.execute as it is incorrect for the new context - the fork master did already replace that peer.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4136 acf43c95-373e-0410-b603-e72c3f656dc1
2011-02-28 16:18:21 +00:00
oana 47a1e9df45 Avoid leaking call parameters from one fork leg to another by using a copy of the original call.execute message for every fork leg.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3669 acf43c95-373e-0410-b603-e72c3f656dc1
2010-09-24 15:04:22 +00:00
paulc 597d369054 Use a RefPointer for DataEndpoint when it could be obtained from setEndpoint instead of being carried (and referenced) by a message.
Prevents crashes caused by race conditions when a CallEndpoint is having its DataEndpoints deleted or replaced.
Bug spotted and patch idea provided by Matthew.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3654 acf43c95-373e-0410-b603-e72c3f656dc1
2010-09-15 10:30:35 +00:00
paulc 13123d8539 Added special targets "|exec" and timed version "|exec=NNNNN" to terminate a fork and dispatch call.execute directly to a target.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3310 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-11 15:10:44 +00:00
paulc 8074248ace Use CallEndpoint::commonMutex() instead of CallFork's private mutex.
Prevents deadlocks when trying to lock them in different order.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3026 acf43c95-373e-0410-b603-e72c3f656dc1
2010-01-17 17:44:35 +00:00
paulc bc1f58e164 Added next=... and drop=... timer modifiers to fork separators.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2896 acf43c95-373e-0410-b603-e72c3f656dc1
2009-11-04 17:14:56 +00:00
paulc a2812051f2 Added Semaphore class, made Mutex derive from (new class) Lockable, made Lock able to get a lock on any Lockable - Mutex or Semaphore.
Use pthread_mutex_timedlock and sem_timedwait if available on platform.
Fixed a bug in the IAX channel exposed by Mutex having virtual methods.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2761 acf43c95-373e-0410-b603-e72c3f656dc1
2009-07-22 12:57:14 +00:00
paulc 3ede8c9d0f Added parameter "cdrcreate" to prevent creation of new CDR records but allow updating existing ones.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2642 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-20 17:30:08 +00:00
paulc 231333d87c Protect with the global mutex not only creation of the fork master but also its slaves list while it starts calling.
Solves potential race conditions with call legs that start but very quickly hangup in another thread.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2641 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-20 14:43:16 +00:00
paulc 6e1972c72e Fixed searching fork slaves for chan.locate and chan.masquerade
git-svn-id: http://yate.null.ro/svn/yate/trunk@2640 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-20 14:40:02 +00:00
paulc 29294e0d8b Keep pushing the message to forkmaster until the message is no longer for a fork.
Fixes nesting of forked calls.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2638 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-20 13:08:01 +00:00
paulc 180bc22b03 Fixed a race condition in the destruction of master and audio proxying slave.
Implement chan.locate and chan.masquerade mainly for picking up one of the legs of a forked call.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2636 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-20 12:34:43 +00:00
paulc c669a24f90 Added mutex names to most Yate modules.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2613 acf43c95-373e-0410-b603-e72c3f656dc1
2009-05-05 14:06:39 +00:00
paulc 045d5bae9f Made call fork module unloadable.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2472 acf43c95-373e-0410-b603-e72c3f656dc1
2009-02-04 14:35:12 +00:00
paulc 0e9e481f49 Keep the fork master referenced while the slave executes disconnect.
git-svn-id: http://yate.null.ro/svn/yate/trunk@2471 acf43c95-373e-0410-b603-e72c3f656dc1
2009-02-04 14:08:54 +00:00
paulc e39385fdd5 Use TelEngine::destruct(obj) or GenObject::destruct() wherever applicable.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1325 acf43c95-373e-0410-b603-e72c3f656dc1
2007-05-15 15:40:50 +00:00
paulc 817e3f9097 The "autorepeat" parameter is copied to the replacement media attach message.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1293 acf43c95-373e-0410-b603-e72c3f656dc1
2007-05-04 12:41:58 +00:00
paulc e4db7b25f1 Added support for generating fake early media if real one isn't available.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1287 acf43c95-373e-0410-b603-e72c3f656dc1
2007-04-30 22:39:03 +00:00
paulc f27b1a2a2c Added "fork.calltype" to define classes of fork call legs: auxiliars and
persistents. These are not counted when deciding to move to the next group
and persistents survive until the end of fork.


git-svn-id: http://yate.null.ro/svn/yate/trunk@1204 acf43c95-373e-0410-b603-e72c3f656dc1
2007-02-27 23:31:33 +00:00
paulc d55a69ecb4 Added ability to automatically generate a ringing message on behalf on one
of the outgoing call legs.


git-svn-id: http://yate.null.ro/svn/yate/trunk@1203 acf43c95-373e-0410-b603-e72c3f656dc1
2007-02-27 21:54:33 +00:00
paulc c046365845 Fixed a bug that prevented proxying forked early media from some channels.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1200 acf43c95-373e-0410-b603-e72c3f656dc1
2007-02-23 20:14:25 +00:00
paulc 320fbc4aa1 Renamed "forkringer" -> "fork.ringer" and "stoperror" -> "fork.stop".
Disconnect reason is picked from "reason" parameter of answered call leg,
defaults to "pickup".


git-svn-id: http://yate.null.ro/svn/yate/trunk@1151 acf43c95-373e-0410-b603-e72c3f656dc1
2006-12-27 16:03:39 +00:00
paulc 36e27b0985 Forker can inherit the audio data endpoint from its ringing slave.
Ringing slave can be enforced in the call.execute return parameter.


git-svn-id: http://yate.null.ro/svn/yate/trunk@1150 acf43c95-373e-0410-b603-e72c3f656dc1
2006-12-22 16:50:20 +00:00
paulc fefaf77fcb Set proper time in call.execute message and added "forkmaster" parameter.
Added minimal status counters.


git-svn-id: http://yate.null.ro/svn/yate/trunk@1144 acf43c95-373e-0410-b603-e72c3f656dc1
2006-12-21 22:36:32 +00:00
paulc cda2d9f1c2 Updated copyright and FSF address.
git-svn-id: http://yate.null.ro/svn/yate/trunk@815 acf43c95-373e-0410-b603-e72c3f656dc1
2006-05-27 15:08:43 +00:00
paulc 4a292bd06b Moved all classes in all modules in anonymous namespaces.
Added RTLD_GLOBAL dlopen()ing so symbols exported by libraries loaded by
modules will be available.


git-svn-id: http://yate.null.ro/svn/yate/trunk@813 acf43c95-373e-0410-b603-e72c3f656dc1
2006-05-27 14:53:18 +00:00
paulc 5f80c17528 Added missing callfork project.
Worked around a template related VC++ bug.
Added several new components to the installer.


git-svn-id: http://yate.null.ro/svn/yate/trunk@733 acf43c95-373e-0410-b603-e72c3f656dc1
2006-04-01 11:04:03 +00:00
paulc c44947b6a1 Added RADIUS client module.
Applied various related and unrelated changes and fixes.


git-svn-id: http://yate.null.ro/svn/yate/trunk@714 acf43c95-373e-0410-b603-e72c3f656dc1
2006-03-22 18:22:34 +00:00